For a better selection of ads, you need to add variables to the ad tag that you place on your sources. It might look like this:
<script src="//link.com/v2/loader.js?_t=52468" data-ts="1574069688" data-token="9aa65c5f78e5f1a225e4cd606ef25f1602f1637e" data-promo-cdn="link.com" data-q="QUERY" data-s1="S1" data-s2="S2" data-s3="S3"></script>
Variables are divided into types:
- “data-q=”QUERY“” — in the link, instead of “QUERY”, you need to pass a keyword or phrase that is used to improve targeting. The setting is applied as you wish. Our ad scripts automatically take the keyword from the page title.
- “data-s1=”S1″” — instead of “S1” the traffic source is substituted. If the script is hosted on a specific site, “S1” does not need to be specified. When the same script is added to different sites, the domain of the site where the script is located is entered in the “S1” parameter.
- “data-s2=”S2″” — instead of “S2”, a sub-traffic source is assigned. Let’s look at two examples of auxiliary sources:
○ In the first case, there is a site with categories located on sub-domains. Therefore, in the “S1” parameter, we indicate the main domain, and in “S2” – the sub-domain.
<script src="//link.com/v2/loader.js?_t=52468" data-ts="1574069688" data-token="9aa65c5f78e5f1a225e4cd606ef25f1602f1637e" data-promo-cdn="link.com" data-s1="website.com" data-s2="movie.website.com"></script>
<script src="//link.com/v2/loader.js?_t=52468" data-ts="1574069688" data-token="9aa65c5f78e5f1a225e4cd606ef25f1602f1637e" data-promo-cdn="link.com" data-s1="website.com" data-s2="music.website.com"></script>
○ In the second case, there is an ad network that sells traffic from various sites. Then in “S1” you can substitute the name of the advertising network, and in “S2” – the domain or site ID where the advertising script is located. It will look like this:
<script src="//link.com/v2/loader.js?_t=52468" data-ts="1574069688" data-token="9aa65c5f78e5f1a225e4cd606ef25f1602f1637e" data-promo-cdn="link.com" data-s1="adnetwork.com" data-s2="website_1.com"></script>
<script src="//link.com/v2/loader.js?_t=52468" data-ts="1574069688" data-token="9aa65c5f78e5f1a225e4cd606ef25f1602f1637e" data-promo-cdn="link.com" data-s1="adnetwork.com" data-s2="website_2.com"></script>
- “data-s3=”S3″” — instead of the “S3” parameter, you can set
click_id
if you plan to use postback. You set the values for “S3” as you wish. When “S3” is not specified, Affiliate independently generatesclick_id
.
Parameters “S1” and “S2” apply if the same ad tag is used on different sites or in projects with a large number of content categories. There are no strict usage rules for the “S3” and “query” parameters.
You can place one ad tag on two different sites. If you enter site names or their domains in the “S1” parameter (data-s1=”website1″ and data-s1=”website2″), the Affilight will be able to find out which site the traffic came from and most of the conversions. You will also be able to understand how to optimize websites. Without this information, Affilight will not be able to determine the site with the best result and select high-quality ads.
Now that you know how to work with the variables that are necessary for traffic optimization, you can easily integrate ad scripts into your sites. We covered integration in detail in our blog for popups and banners.