System1 has the capability to create and host websites on the behalf of partners, however it's possible for us to embed ads within sites hosted by you. Lam.js templates allow you to embed ads within a specified portion of your website. You can do this by adding a snippet of javascript (which we call lam.js) and passing the appropriate parameters in the div on the site you wish the ads to be inserted to. The examples below will get you up and running quickly and easily.
If you'd like to configure lam.js to your requirements, please refer the Advanced Web Implementation article.
To implement lam.js, your page must be built with placeholders where System1 ads can be held. How It Works Lam.js works by living on your own hosted website. Lam.js works by generating a search engine results page (SERP) within an iframe on your website.
This is a visual representation of what the user will experience.
<div style="height: 650px" id="the_categories"></div>
<script src="https://[PARTNER_ID].lamtrigger.com/lam.js"></script>
<script>
var pageOptions = {
'campaign': 'DEMO_CAMPAIGN'
'impression_track_url': 'http://example.com/impression'
'click_track_url': 'http://example.com/click'
'search_track_url': 'http://example.com/search'
};
var categories = {
type: 'category_page',
container: 'the_categories'
};
lam.partner.render(pageOptions, categories);
</script>
The 'pageOption' variable allows you to pass parameters regarding your campaign and more. The parameters that partners can pass are the following:
Parameter Name | Parameter Function | Parameter Example |
---|---|---|
campaign (required) |
This identifies the campaign so that you can get paid for the traffic. | demo_campaign1 |
sub_id (optional) |
You can use the sub_id parameter to distinguish between different sources monetizing on a campaign. This is the most granular reporting for accurate revenue tracking. Sub_ids are an alphanumeric string. | aXskd_1093 |
impression_track_url (optional) |
This url will be embedded on the category page as a tracking pixel. | http://example.com/impression |
click_track_url (optional) |
This is a url that will be pinged when the user clicks on an ad via an onclick handler. | http://example.com/click |
search_track_url (optional) |
This url will be embedded on the search page as a tracking pixel for supported templates. Contact us if you would like this feature enabled for a campaign. | http://example.com/search |
The 'categories' variable gives System1 context about the type of campaign and template being used. You can leave these as they are in the example configuration.
Category Name | Category Function |
---|---|
type |
This should be set to the string 'category_page' to indicate this is an embedded template. |
container |
The id of the div in which the ads will be rendered. |
You can use this sample implementation as a guide on the proper way to invoke embedded templates.