What is a Macro?
A macro is a placeholder (for example: {CLICK_URL}
) that an ad server replaces with actual values when the ad is served. To include real-time data in your tags, you can simply incorporate macros with them.
For example, say you are using this third-party ad tag:
<script type="text/javascript" src="http://example.com/?click=%22">http://example.com?click="></script>
The third-party ad server expects an XPO click tracking URL after "click=
". To get this URL, you need to insert a click-tracking macro in the tag, such as:
<script type="text/javascript" src="http://example.com/?click=%7BCLICK_URL%7D%22">http://example.com?click={CLICK_URL}"></script>
Each time the ad is served, the placeholder {CLICK_URL}
is replaced with the actual click-tracking URL from XPO.
The following are the MACROS that can be used in third-party ad tags to pass information to the relevant third-party ad server:
Tracking/Ad Serving Macros
Macro/Variable | Purpose |
---|---|
{CLICK_URL} |
Used for parallel tracking |
{CLICK_URL_ENC} |
Same as {CLICK_URL} , except that the tracker is encoded.Choose between {CLICK_URL} or {CLICK_URL_ENC} depending on your tag support. |
{CLICK_THROUGH_URL} |
Used for chain tracking. This macro directs users to the Knorex tracking server before redirecting to the Destination URL. Example: {CLICK_THROUGH_URL}https%3A%2F%2Fknorex.com Destination URL has to be added by your/third-party ad. |
{TIMESTAMP} |
UNIX timestamp of RTB auction. |
Device Specific Macros
Macro/Variable | Description |
---|---|
{DEVICE_MODEL} |
The device model. |
{DEVICE_OS} |
Name of the ISP or carrier information. |
{OS_VERSION} |
The version of operating system. |
Device Identifier Macros
Macro/Variable | Description |
---|---|
{DEVICE_ID} |
|
Source Macros
Macro/Variable | Description |
---|---|
{CACHEBUSTER} |
Random value. See also Cachebuster for Google Ads/DoubleClick |
{PUBLISHER_ID} |
Publisher ID, if any |
{SOURCE_URL} |
Source URL, if any |
{SOURCE_URL_ENC} |
Encoded source URL, if any |
{UNIVERSAL_SITE_ID} |
Site ID, if any |
{BUNDLE_ID} |
Bundle ID: Application bundle or package name from iTunes/AppStore. Only available for Apps. |
Targeting Macros
Macro/Variable | Description |
---|---|
{EXCHANGE_ID} |
Ad Exchange ID |
{CAMPAIGN_ID} |
Campaign ID |
{CREATIVE_ID} |
Creative ID |
{LANGUAGE} |
2-letter language code |
{USER_AGENT} |
Browser user agent being used |
{GEO} |
3-letter country code |
{AUDIENCE_ID} |
A random string used to identify the audience. NOTE: For Audience ID, information is sent only if an audience is in use. For RON (Run Of Network) no information will be passed. |
{LAT} |
Latitude ranges from -90.0 to +90.0. Negative values indicate southern coordinates. |
{LON} |
Longitude ranges from -180.0 to +180.0. Negative values indicate western coordinates. |
{IP} |
Device IP address |
{GPS} |
GPS coordinates (up to 6 decimals) |
{POSTAL_CODE} |
Zip code or postal code |
{PLACEMENT_NAME} |
The name of the application where the ad is displayed. |
{TS} |
Timestamp with 10 digits. System.currentTimeMillis() / 1000
|
{GDPR} |
0=GDPR does not apply 1=GDPR applies If not present, callee should do GeoIP lookup, and GDPR applies for EU IP addresses |
{EU_CONSENT} |
URL-safe base64-encoded GDPR consent string. Only relevant if GDPR=1 |
Comments
0 comments
Article is closed for comments.