Background
A macro is effectively a placeholder within a tag where values will be automatically inserted by the platform.
A common example of a macro is the cache buster macro, where a random number is inserted into the ad tag at the time the ad tag is called, to ensure tags are not cached by the browser.
Considerations on Improve Digital
- Macros are always enclosed in braces and should always be uppercase, e.g.
{CLICK_URL}
- The platform inserts impression and click macros automatically in the correct spaces for campaign creatives from the following vendors: Adform; DV360; MediaMind.
- Creatives from other vendors should macros to be added manually. If you are unsure where to place a macro, read 'Click Tracking on Third Party Tags' or contact your creative tag vendor.
- Clicks are automatically tracked for creative files hosted in Improve Digital.
Available Macros
The following macros can be inserted into creative tags booked. In some cases the macro should be placed after a specific parameter in the tag, allowing a platform to process the inserted values; this location is specified by the vendor themselves.
Description Definitions
- Vendoring
- Improve Digital provides the possibility to connect your viewability or analytics vendor code to served impressions. The macros indicated for vendoring show what data can be shared with vendors.
- Creative content
- Applies to any tags hosted in Improve Digital campaigns.
Macro | Description | Availability* |
ADVERTISER_ID | The advertiser id | Creative content of all types except for TextVideo and Composite. Vendoring. |
AUCTION_AD_ID | The adid of the won bid | Content of RTB creatives, nurl. |
AUCTION_BID_ID | The id of the won bid | Content of RTB creatives, nurl. |
AUCTION_ID | The impression id | Content of RTB creatives, nurl. |
AUCTION_IMP_ID | The impid of the won bid | Content of RTB creatives, nurl. |
AUCTION_PRICE | Auction price | Content of RTB creatives, nurl. |
AUCTION_PRICE:B64 | Encrypted auction price | Content of RTB creatives, nurl. |
AUCTION_PRICE:GPD | GPD encrypted auction price | Content of RTB creatives. |
AUCTION_SEAT_ID | The seat id | Content of RTB creatives, nurl. |
BUNDLE | Set to the value of GET parameter bundle. If the parameter is not specified, the macro is not expanded. | Creative content of all types. Vendoring. |
CACHEBUSTER | A random float value | Creative content of all types. Vendoring. |
CALLBACK | Callback URL of vendor | Vendoring content for video. |
CAMPAIGN_ID | The campaign id | Creative content of all types except for TextVideo and Composite. Vendoring. |
CARRIER | Creative content on mobile traffic. | |
CLICK_URL | is replaced by the click url defined in the creative settings | Creative content of all types |
CLICK_URL_ENC | if the click url is encoded this macro should be used instead | Creative content of all types |
COOKIES_ALLOWED | Indicates whether cookies are allowed under the current request or not. Set to 1 if cookies are allowed, otherwise set to 0. | Creative content of all types |
CREATIVE_ID | The creative id | Creative content of all types except for TextVideo and Composite |
DENSITY | Creative content on mobile traffic | |
GDPR | Will be replaced with the value received or interpreted in the ad request | Creative content of all types |
GDPR_CONSENT_XXX | Will be replaced by the TCF consent string - 'XXX' should be changed by the user to be the IAB vendor ID of the vendor receiving the request (this is not mandatory) | Creative content of all types |
HEIGHT | The height of the won creative | Creative content of all types except for TextVideo and Composite. Vendoring. |
IMPRESSION_ID | Used as a cache buster - this inserts the unique impression identified from the 360 Polaris auction into the tag. | Creative content of all types. Vendoring content. |
LATITUDE | The latitude determined based on the user IP | Creative content on mobile traffic |
LINEITEM_ID | The line item id | Creative content of all types except for TextVideo and Composite. Vendoring. |
LONGITUDE | The longitude determined based on the user IP | Creative content on mobile traffic |
PLACEMENT_ID | The placement id | Creative content of all types. Vendoring. |
PROTOCOL | The http protocol that is being used under the current request, can be 'http' or 'https', and should be implemented as: {PROTOCOL}://ad.360yield.com/adi?w=468&h=60&p=49 | Creative content of all types. Vendoring. |
PSID | Creative content on mobile traffic | |
PUB_USER_ID | The UUID of the current user | Redirection URL on /match and /server_match handlers |
PUBLISHER_ID | The publisher id | Creative content of all types. Vendoring. |
PUBLISHER_NAME | The publisher name | Creative content of all types. Vendoring. |
PUBLISHER_NAME_ENC | The publisher name with URI escaping applied | Creative content of all types |
QS_% | Dynamic macros, any GET param except the reserved ones (Query Parameters List). Additional strings can be added to 360 Polaris tags as a parameter using the 'QS_' (query string) macro. The tag parameter can be in any case, however lowercase as a standard keeps the setup tidy. For example: auction_metric={QS_ANY_VALUE}. The 360 tag parameter does not have the 'QS' part, this is only in the creative tag itself. | Creative content of all types |
QS_W | width specified in the ad request | Creative content of all types |
QS_H | height specified in the ad request | Creative content of all types |
QS_P | ID of the 360 Polaris placement tag | Creative content of all types |
QS_PLACEMENT | The placement key specified as imp.pkey on DynTag or HB requests, or placement_key in tags. | Creative content of all types |
RAW_GDPR | The raw GDPR value. This is deprecated but still functioning- use {GDPR} and {GDPR_CONSENT} instead. | Creative content of all types |
REFERRER_DOMAIN | The referrer domain of the current request. Only the root domain of page referrer. | Creative content of all types. Vendoring. |
REFERRER_PATH | The full page referrer | |
RTB_ADVERTISER | BidResponse.seatbid.bid.ext.advertiser, otherwise the first item of BidResponse.seatbid.bid.adomian | Vendoring. |
SITE_ID | The site id | Creative content of all types. Vendoring. |
SITE_NAME | The site name | Creative content of all types |
SITE_NAME_ENC | The site name with URI escaping applied | Creative content of all types |
UD_ID | Device id | Creative content on mobile traffic |
USER_AGENT | The User-Agent of the current request | Creative content on mobile traffic, Vendoring. |
VENDOR_ACCOUNT | The account of vendor | Vendoring. |
WIDTH | The width of the won creative | Creative content of all types except for TextVideo and Composite. Vendoring. |
ZONE_ID | The zone ID corresponded to placement | Creative content of all types. Vendoring. |
Macro examples
The Improve Digital placement tag contains the following when called from the ad server or page:
<script type="text/javascript">
document.write('<scr'+'ipt type="text/javascript"
src="http://ad.360yield.com/adj?p=123456&w=300&h=250&
passback=hull123&weather_today=sunny
</script>
The campaign creative in the platform can be setup containing the following macros:
<script src=”http://adcreativeventor.com/tag?id=6832&
size={QS_W}x{QS_H}&improve_id={QS_P}&page={QS_PASSBACK}
&weather={QS_WEATHER_TODAY}”</script>
When the third party receives the ad call, the macros will autofill the values as pulled from the initial Improve Digital tag call, as follows:
<script src=”http://adcreativeventor.com/tag?id=123456&
size=300x250&improve-id=123456&page=hull123&
weather=sunny”</script>
- {QS_W}
- will expand to 300
- {QS_H}
- will expand to 250
- {QS_P}
- will expand to the placement ID: 123456
- {QS_PASSBACK}
- will expand to hull123
- {QS_WEATHER_TODAY}
- will expand to sunny
Other QS_ macros will expand to empty strings as there is no parameter defined in the initial ad call. If multiple query string parameters are named the same, the last occurrence is used, for the following example, the platform will only read 'hot':
http://ad.360yield.com/adj?p=123456&w=468&h=60&
weather_today=sunny&weather_today=hot