Table of contents
Macros
Macros are components that may be added to Click and Impression-tracking URLs within double curly braces. At the time of banner display, these components get replaced by the corresponding value.
For instance, the macro {{adsetid}} will be replaced by the ID of the Ad Set from which the ad originated. Thus, including the macro {{adsetid}} in an impression tracking URL or click tracking URL allows you to track which campaign’s Ad Set was the source of a given ad display. For example, given the following click tracking URL: http://mylandingpage.com/tracking?campaign={{adsetid}}, for an ad display for Ad Set 257842, the actual landing URL would translate into: http://mylandingpage.com/tracking?campaign=257842
The macros that may be used in click and impression tracking URLs are in the table below.
Macro name | Description | Example value |
adsetid | The numerical ID of the campaign (Ad set) The banner originated from | 257842 |
creative_type |
| 1 |
device_id | Apple device identifier (IDFA, uppercase) If available, or Android device identifier (GAID, E57293961239 (OS device) lowercase) if available, or empty | 01234567-89AB-CDEF-0123-456789ABCDEF on iOS OR 01234567-89ab-cdef-0123-456789abcdef on Android |
domain | Domain name of the publisher where the ad is displayed on web (empty on app supply) | https://exampledomain.com/ |
gdpr (*) | To determine whether the ad display is subject to GDPR regulations | 0 (GDPR does not apply) 1(GDPR applies) |
gdpr_consent_kv (*) | Criteo-specific GDPR consent parameter with associated IAB TCF v2 consent parameter string if the consent is not empty. More info here. | This macro resolves to gdpr_consent=XXX (where XXX is the IAB TCF v2 consent string) when the consent string is not empty. |
OS | Operating system of the device | IOS |
random | Pseudo-random value to be used as a cache buster | 116htg738y |
timestamp | Current Epoch timestamp | 1553097335 |
adid | Ad Id, the unique Ad Identifier | 12356 |
criteo_campaign_id | The numerical ID for the Criteo Marketing Campaign | 213682 |
height | Impression slot height in pixels | 600 for a 160*600 banner |
width | Impression slot width in pixels | 160 for a 160*600 banner |
display_env | Display environment of the display |
|
bundle_id | Bundle/App ID of the publisher app where the ad is displayed when in-app | com.opera.mini.native (android) 1207472156 (iOS) |
bundle_name | User-readable name of the publisher app where ad is displayed when in-app | Opera Mini - fast web browser (for com.opera.mini.native on android) Wordscapes (for 1207472156 on iOS) |
user_agent | User-agent header as received by the service generating the URL (e.g. ads.criteo.com or cat.criteo.com) | Mozilla/5.0 (Android 4.4; Mobile; rv:41.0) Gecko/41.0 Firefox/41.0 |
(*): To correctly configure GDPR variables on your 3rd party tracking Click and Impression URLs, please refer to the examples provided in the GDPR section.