Using Sub IDs
In addition to adding sites and ad zones, you can use Sub IDs to segment the traffic, such as by traffic source for example.
This information will then be displayed in the Statistics tab, in the Sub IDs sub-tab.
Putting Sub IDs into your ad zone code
Once you have clicked on Create in the New Zone screen, you will be presented with the code for your new ad zone.
To use Sub IDs, add the parameter corresponding to the format you selected and the number you wish to use as Sub ID:
Parameter | Used in |
---|---|
sub | Banners (iframe), Popunder (inline script), Direct Links, Email Clicks, In-Video Banner (VAST), In-Stream Video, Video Slider |
ad_sub | Popunder (remote script) |
data-sub | Banners (async), Sticky Banners, Outstream Video, In-Page Push, Instant Message, Native, Fullpage Interstitials |
Note: Sub IDs should be a number between 1 and Int32: Do not use zeroes at the beginning of Sub IDs.
Use in different ad zone formats
Here is an extensive list of examples showing how to add the parameters needed to register Sub IDs.
Asynchronous ad zones: Banners, Instant Messages, Sticky Banners and others
Added data-sub="123456789"
-<script async type="application/javascript" src="https://a.magsrv.com/ad-provider.js"></script>
<ins class="adsbynetwork" data-zoneid="1234567" data-sub="123456789"></ins>
<script>(AdProvider = window.AdProvider || []).push({"serve": {}});</script>
iFrame
Added &sub=123456
<iframe src="//a.examplesite.com/iframe.php?idzone=1234567&size=300x250&sub=123456" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>
Popunder (inline)
Added "sub":"123456"
<script type="application/javascript">
(function() {
//version 1.0.0
var adConfig = {
"ads_host": "a.examplesite.com",
"syndication_host": "syndication.examplesite.com",
"idzone": 1234567,
"popup_fallback": false,
"popup_force": false,
"chrome_enabled": true,
"new_tab": false,
"frequency_period": 720,
"frequency_count": 1,
"trigger_method": 3,
"trigger_class": "",
"only_inline": false,
"sub": "123456"
};
Popunder (remote)
Added ad_sub = "123456"
<script type="application/javascript">
var ad_idzone = "1234567",
ad_popup_fallback = false,
ad_popup_force = false,
ad_chrome_enabled = true,
ad_new_tab = false,
ad_frequency_period = 720,
ad_frequency_count = 1,
ad_trigger_method = 3,
ad_sub = "123456";
</script>
<script type="application/javascript" src="https://a.examplesite.com/popunder1000.js"></script>
VAST ads (In-Stream and In-Video) )
Added &sub=123456
https://syndication.examplesite.com/splash.php?idzone=1234567&sub=123456
Video Slider
Added "sub": 123456
<script type="application/javascript" src="https://a.examplesite.com/video-slider.js"></script>
<script type="application/javascript">
var adConfig = {
"idzone": 1234567,
"frequency_period": 1440,
"close_after": 0,
"sound_enabled": 0,
"on_complete": "repeat",
"branding_enabled": 1,
"sub": 123456
};
ExoVideoSlider.init(adConfig);
</script>
Push Notifications
This format does not currently support the use of subids.