What Is A Macro?
A macro is a placeholder (for example: {CLICK_URL}
) that an ad server replaces with a real value when the creative serves. Use macros in your tags when you want XPO to insert information into the tag in real-time.
For example, 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, insert a click tracking macro in the tag:
<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 that third-party ad server:
Tracking / Ad Serving Macros
Macro/Variable | Purpose |
---|---|
{CLICK_URL} |
This is for parallel tracking |
{CLICK_URL_ENC} |
Same as {CLICK_URL} , except that the tracker is encoded.You may want to use {CLICK_URL} or {CLICK_URL_ENC} depending on your tag support. |
{CLICK_THROUGH_URL} |
This is for chain tracking. This will land on Knorex tracking server, and then redirect 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 used |
{GEO} |
3-letter country code |
{AUDIENCE_ID} |
Random string NOTE: For Audience ID, we can send information only if we are using any audience. For RON we will not pass any information. |
{LAT} |
Latitude from -90.0 to +90.0, where negative is south |
{LON} |
Longitude from -180.0 to +180.0, where negative is west |
{IP} |
Device IP address |
{GPS} |
GPS coordinates, up to 6 decimal precision |
{POSTAL_CODE} |
Zip or postal code |
{PLACEMENT_NAME} |
Name of the application that ad would be showed on |
{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 meaningful if GDPR=1 |
Comments
0 comments
Article is closed for comments.