| [[TIMESTAMP]] | the time when the impression has occurred |
| [[RANDOM]] | the random number (13 numeric characters min), eg.forcachebuster |
| [[CAMPAIGN_NAME]] | the campaign name that won the impression |
| [[CAMPAIGN_ID]] | the campaign ID that won the impression |
| [[ADVERTISER_ID]] | the advertiser ID that won the impression |
| [[HASH_ADV_ID]] | Hashed advertiser Id |
| [[CREATIVE_NAME]] | the creative name that won the impression |
| [[CREATIVE_ID]] | the creative ID that won the impression |
| [[CREATIVE_SIZE]] | the creative size that won the impression |
| [[CREATIVE_SIZE_X]] | Creative width |
| [[CREATIVE_SIZE_Y]] | Creative height |
| [[AUCTION_ID]] | the auction identifier |
| [[WIDTH]] | the width of a video player where the impression was bought |
| [[HEIGHT]] | the height of a video player where the impression was bought |
| [[PROTOCOL]] | If SSP returns secure opportunity, replaces itself with https:// otherwise http:// is used by default. |
| [[IP]] | the user IP |
| [[SSP]] | the exchange where the impression was bought |
| [[URL]] | the URL where the impression was bought |
| [[DOMAIN]] | the domain where the impression was bought |
| [[TOP_LEVEL_DOMAIN]] | the top level domain where the impression was bought |
| [[CLICK_ID]] | the unique click identifier that won impressions |
| [[PUBLISHER_ID]] | id of the publisher |
| [[TAG_ID]] | the placement identifier where the impression was bought |
| [[SEGMENT_BILLED_NAME]] | the segment name that was billed with the impression |
| [[SEGMENT_BILLED_ID]] | the segment ID that was billed with the impression |
| [[EVENT_ID]] | the bid request identifier |
| [[CITY]] | the user's city, where the impression was bought |
| [[REGION]] | the user's region, where the impression was bought |
| [[ALT_UID]] | Alternative user Id |
| [[FUNCTION_NAME]] | Callback function name |
| [[LANDING_PAGE]] | Landing page |
| [[LATITUDE]] | the latitude where the impression was bought |
| [[LONGITUDE]] | the longitude where the impression was bought |
| [[APP_NAME]] | the application name where the impression was bought |
[[APP_ID]] | the application identifier where the impression was bought, eg. com.appid.android for Android applications and 9 numeric characters for iOS applications |
| [[APP_STORE_URL]] | the application store URL |
| [[DEVICE_MAKE]] | the device make (e.g., "Apple") |
| [[DEVICE_MODEL]] | the device model (e.g., "iPhone") where the impression was bought |
| [[DEVICE_TYPE]] | the general type of device (e.g., "SMARTPHONE", "SMART_TV") |
| [[CARRIER_ID]] | the carrier where the impression was bought |
| [[RAW_ADV_ID]] | the AAID or IDFA of the device that won the impression |
| [[USER_AGENT]] | the user agent of the device that won the impression |
| [[URL_ENCODED_USER_AGENT]] | the encoded user agent of the device that won the impression |
| [[UID]] | User Id |
[[CLICK_PREFIX]] | returns URL with a possibility to redirect to a URL after the macro |
| [[CLICK_TRACKING_BEACON]] | returns transparent gif pixel |
Depending on what macro returns we should implement one of the following.
1) The easiest way is to use [[CLICK_TRACKING_BEACON]] macro.
Because this macro returns GIF we just need to implement HTML/JS code to open this image.
(new Image).src ='[[CLICK_TRACKING_BEACON]]'; |
<script>
function clickOnBanner() {
var i = new Image();
i.src = "[[CLICK_TRACKING_BEACON]]";
console.log("Click gif URL: " + i.src)
window.open("http://getintent.com/", "_blank");
}
</script>
<div onclick="clickOnBanner()" style="background-color: #00AEFF; width: 300px; height: 250px; display: flex; align-items: center; justify-content: center;">
Getintent
</div> |
2) We can use redirection URL with [[CLICK_PREFIX]] macro.
This macro can be in 2 states: [[CLICK_PREFIX]] = %getintent_click_url%[[CLICK_PREFIX]] = %google_click_url%%getintent_click_url_ENCODED% -- if a bid comes from Google/Adx.
So we can use this macro in these cases to create a URL:[[CLICK_PREFIX]]%landing_page_ENCODED%%tracker_url%[[CLICK_PREFIX_ENCODED]]
%tracker_url%[[CLICK_PREFIX_ENCODED]]%landing_page_DOUBLE_ENCODED%
The biggest problem is what %landing_page% may need to be encoded (if unsupportable signs are used). |
<script>
function clickOnBanner() {
var cp = "[[CLICK_PREFIX]]";
var lp = "http://getintent.com/";
var click_url = cp + lp;
console.log("Click URL: " + click_url)
window.open(click_url, "_blank");
}
</script>
<div onclick="clickOnBanner()" style="background-color: #00AEFF; width: 300px; height: 250px; display: flex; align-items: center; justify-content: center;">
Getintent
</div> |
<SCRIPT language='JavaScript1.1' SRC="https://ad.doubleclick.net/ddm/adj/N2375.2383476GOOGLE/B10229977.435656087;sz=300x250;click=[[CLICK_PREFIX_ENCODED]];ord=1495201965;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?">
</SCRIPT>
<NOSCRIPT>
<A HREF="[[CLICK_PREFIX]]https%3A%2F%2Fad.doubleclick.net%2Fddm%2Fjump%2FN2375.2383476GOOGLE%2FB10229977.435656087%3Bsz%3D300x250%3Bord%3D1495201965%3F">
<IMG SRC="https://ad.doubleclick.net/ddm/ad/N2375.2383476GOOGLE/B10229977.435656087;sz=300x250;ord=1495201965;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=?"
BORDER=0 WIDTH=300 HEIGHT=250 ALT="Advertisement">
</A>
</NOSCRIPT> |
| http://getintent.ru/?utm_source=[[DOMAIN]]&utm_medium=[[SSP]]&utm_term=[[CREATIVE_SIZE]]&utm_content=[[CREATIVE_NAME]]&utm_campaign=[[CAMPAIGN_NAME]] |
| http://getintent.ru/?utm_source=avito.ru&utm_medium=google&utm_term=240x400&utm_content=banner3&utm_campaign=predict_campaign |