The system has the ability to add macros in URL parameters. It allows you to get more information for analysis (ext. information in UTM-tags), to deal with caching, etc.

Common Macros


[[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
[[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
[[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.
Use only for secure creatives.

[[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


Macros For Mobile In-app Traffic

[[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]]
[[BUNDLE_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


Click Macros (Tracking Macros)

[[CLICK_PREFIX]]
[[CLICK_PREFIX_ENCODED]]

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).
And we need 2 creatives: one for Google/Adx and one for other SSPs.

<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>

Example of a URL With a Macros:

http://getintent.ru/?utm_source=[[DOMAIN]]&utm_medium=[[SSP]]&utm_term=[[CREATIVE_SIZE]]&utm_content=[[CREATIVE_NAME]]&utm_campaign=[[CAMPAIGN_NAME]]



After Clicking the UTM-tag Will Look Like This:

http://getintent.ru/?utm_source=avito.ru&utm_medium=google&utm_term=240x400&utm_content=banner3&utm_campaign=predict_campaign

Macros can also be used for 3rd-party analytic systems in counting banner impressions pixels and clicking links (parameters transmission to the 3rd-party analytic system is to be set up).