What are macros?

Macros are a string of text that can be included in any code that’s processed by Kayzen ad server (third-party HTML tags, VAST tags, click-through URLs, impression pixels, etc.) and are dynamically replaced with their corresponding values.

Required macro for tracking URLs: {CONVERSION_ID} bid id

Unlike the name, this does not necessarily have to only be implemented on campaigns that are tracking conversions/installs. When this macro is implemented, it will be replaced by a unique ID that is generated each time a bid takes place for an impression.

Tracking Impressions

Impression pixels are tiny, transparent, 1x1 pixel-sized images embedded in everything from static banner to dynamic or video ads during creative production. 

§ For example https://rover.abc.com/ar/1/707-220017-51246-358/4?size=1x1&ipn=admain2&placement=473053&mpvc=


Kayzen by default embeds impression pixels for all creative types (Image, Native, Video and HTML) whereas client can also use their third-party or in-house impression pixel on their respective creative types.

Tracking Clicks

The click URL should have the Client Placeholder = {CONVERSION_ID}

{CAMPAIGN_NAME} This macro will be replaced by the campaign name. The old macro for this is {CAMPAIGN}. It is functional at the moment and will be deprecated in the near future.

{CAMPAIGN_ID} This macro will be replaced by Kayzen's internal campaign ID.

{CREATIVE_NAME} This macro will be replaced by the creative name. The old macro for this is {CREATIVE}. It is functional at the moment and will be deprecated in the near future.

{CREATIVE_ID} This macro will be replaced by Kayzen's internal creative ID.

{ORDER_ID} This macro will be replaced by Kayzen's internal order ID.

{APP_NAME} This macro will be replaced by the publisher's app name (including special characters).

{APP_ID}This macro will be replaced by the exchange specific unique ID corresponding to the publisher app.

{APP_DOMAIN} – This macro will be replaced by the domain of the publisher site/app.

{EXCHANGE_NAME} – This macro will be replaced by the exchange name.

{EXCHANGE_ID} – This macro will be replaced by Kayzen's internal exchange id. This will be helpful to form {EXCHANGE_ID}_{APP_ID} combination and used in the campaign for whitelisting/blacklisting of app ids.

{MANUFACTURER_NAME} – This macro will be replaced by the Device Manufacturer’s Name.

{MODEL_NAME} – This macro will be replaced by the Device Model Name.

{DEVICE_ID} – This macro will be replaced by the Device IMEI number.

{DEVICE_PLATFORM_ID} – This macro will be replaced by the unique OS-specific Advertising ID of the Device (For e.g, iOS it will be IOS_IDFA and for Android, it will be GAID). This macro might fetch you the advertising ID in RAW, SHA1 or MD5 format depending on what is received in the bid request.

{DEVICE_RAW_ID}  – This macro will be replaced by the Device ID in RAW format if it is available in the RAW format in the bid request.

{DEVICE_SHA1_ID} – This macro will be replaced by the Device ID in SHA1 format if it is available in the SHA1 format in the bid request.

{CARRIER_NAME} – This macro will be replaced by the Carrier Name of the user's network.

{DEVICE_OS_NAME} – This macro will be replaced by the name of the Operating System of the user's device.

{TIMESTAMP} – This macro will be replaced by the Time Stamp the click or impression is served.

{USER_IP} – This macro will be replaced by the user's IP Address.

{COUNTRY_CODE} – This macro will be replaced by the user's Country Code as defined by ISO-3166-1 alpha 3 standard.

{STATE_NAME} – This macro will be replaced by the user's State name.

{STATE_CODE} – This macro will be replaced by the user's State Code as defined by ISO-3166-2 standard of all countries coded in ISO 3166-1.

{CITY_NAME} - This macro will be replaced by the user's City Name.

{ZIP_CODE} - This macro will be replaced by the user's Zipcode.

{GPS_LAT} – This macro will be replaced by the Latitude coordinates of the user's device.

{GPS_LON} – This macro will be replaced by the Longitude coordinates of the user's device.

{PUBLISHER_ID} – This macro will be replaced by Exchange Specific alphanumeric ID for publishers.

{ADVERTISER_ID} - This macro will be replaced by Kayzen's internal advertiser ID.

{APP_BUNDLE} – This macro will be replaced by the publisher app bundle.

{APP_NAME_ALPHANUM} – This macro will be replaced by the publisher app name (only alpha, digit,-,_)

{DNT} – This macro will be replaced by the DNT value of a request (TRUE/FALSE).

{CAMPAIGN_ID_CAMPAIGN_NAME} – This macro will be replaced with Campaign ID|Campaign Name.

{CACHEBUSTER} – This macro will be replaced by a random number.

{CLICK_URL} – This macro will be replaced by Kayzen click URL.

{CLICK_URL_ESC} – This macro will be replaced by encoded escaped Kayzen click URL.


You can also combine macros with an underscore, for example, {DEVICE_OS_NAME}_{COUNTRY_CODE}

Sample Macro Implementation for different creative types

HTML

Implement the macros you might need to track in the tag script.
Tag example:

Video

Implement the macros you might need to track in the Client VAST wrapper

VAST XML
Tag example:

Banner / Native

Implement the macros you might need to track in the image click URL

Macros example:

Did this answer your question?