Macros
Macros
The following Macros are supported by Buzz. These macros may be included in Creative Templates, the content of the Creatives or the click_url
field of the Creative. Macros are case-sensitive and should be surrounded by double curly brackets on both sides to be properly recognized. For example, the macro FOO should be represented in the creative as {{FOO}}
, not {{Foo}}
.
Basic Macros
Macro | Expansion |
---|---|
ACCOUNT_ID | Account ID for the impression |
AD_ID | The Ad-ID of the creative: https://www.ad-id.org |
ADVERTISER_ID | Advertiser ID for the impression |
ADVERTISER_ID_ALT | Alternative advertiser ID for the impression |
ADVERTISER_NAME | The advertiser name for the impression |
AGE | The age of the user as reported by the exchange |
ANDROID_ID | The unique Android identifier of the user |
ANDROID_ID_SHA1 | The SHA1 of the user ID for Android requests |
AUCTION_ID | Unique id for every bid request. It is a joining key for all the events associated with the bid request such as impression, clicks, and activities. |
BID_TIME_UTC | Time of bid request sent in UTC timezone |
CACHEBUSTER | Random number for cache busting |
CAMPAIGN_ID | Campaign/Order ID for the impression |
CAMPAIGN_ID_ALT | Alternative ID for the campaign |
CAMPAIGN_NAME | The campaign name for the impression |
CREATIVE_ID | Creative ID for the impression |
CREATIVE_ID_ALT | Alternative creative ID for the impression |
CREATIVE_NAME | The creative name for the impression |
DEAL_ID | The deal id |
DNT | Whether the user has Do Not Track or Limit Ad Tracking set |
GDPR_CONSENT_STRING | The consent string on the bid request used for GDPR compliance |
GDPR_CONSENT_STRING_ESC | URL-safe GDPR consent string |
GENDER | The gender of the user (M or F) |
HEIGHT | Height of the Creative |
HOST | Host URL for impressions, clicks, events |
IMP_ON_MRAID_IS_VIEWABLE | Trigger mraid imp on isViewable event or on load |
IMPRESSION_URL | URL to count an impression. This macro must be present in all creative templates. |
IOS_ID | The unique iOS identifier of the user |
IOS_ID_SHA1 | The SHA1 of the user ID for iOS requests |
IP_ADDRESS | IP address of the device, base 64 encoded (will be pseudo-anonymized when subject to GDPR without explicit consent) |
IP_ADDRESS_ESC | IP address of the device, URL-escaped (will be pseudo-anonymized when subject to GDPR without explicit consent) |
IP_ADDRESS_IPV6 | IP address of the device when IPV6 is present, always URL-escaped (will be pseudo-anonymized when subject to GDPR without explicit consent) |
IS_GDPR | Whether the auction is subject to GDPR |
IS_GDPR_CONSENTED | Whether customer received user's consent for GDPR auction |
LINE_ITEM_ID | Line Item ID for the impression |
LINE_ITEM_ID_ALT | Alternative line item ID for the impression |
LINE_ITEM_NAME | The line item name for the impression |
MEDIA_HOST | Host the Creative will be served from |
US_PRIVACY_STRING | The US Privacy String on the bid request used for CCPA compliance. |
USER_AGENT | Full user agent of the device, base 64 encoded (will be blank when subject to GDPR without explicit consent). |
USER_AGENT_ESC | Full user agent of the device, URL-escaped (will be blank when subject to GDPR without explicit consent). |
USER_ID | Mobile/device ID for mobile, cookie for desktop |
USER_ID_SHA1 | The SHA1 of the user ID |
WIDTH | Width of the Creative |
Inventory/Content Macros
Macro | Expansion |
---|---|
APP_BUNDLE | Mobile application bundle the impression was served on |
APP_ID | Unique ID of the app within the exchange |
APP_NAME | Mobile application name the impression was served on |
APP_STORE_URL | URL the mobile application on the app store |
DOMAIN | Domain the impression was served on |
EXCHANGE_HANDLE | The exchange abbreviation for each inventory source (i.e. "rp" for Rubicon). Exchange handles are used in conjunction with exchange specific IDs in targeting (i.e. rp/12345 for a Rubicon specific site ID) |
INVENTORY_SOURCE | Exchange inventory source (i.e. Rubicon, Mopub etc) |
PAGE | The full URL of the page the ad was served on |
PLACEMENT_ID | Placement ID for the impression reported by the exchange |
PUBLISHER_ID | Publisher ID for the impression reported by the exchange |
PUBLISHER_NAME | The publisher name that the impression was served on |
REFERRER | Domain the user came from before landing on domain the impression was served on |
REFERRER_URL_ESC | The encoded referring URL |
REWARDED | Whether the auction was for rewarded video |
SITE_ID | Site ID that the impression was served on |
SITE_NAME | Site Name that the impression was served on |
Location Macros
Macro | Expansion |
---|---|
COUNTRY_CODE | Two-character country code of the device/user |
LAT | The latitude of the device/user (will be truncated to three decimal places when subject to GDPR without explicit consent) |
LONG | The longitude of the device/user (will be truncated to three decimal places when subject to GDPR without explicit consent) |
METRO_CODE | The metro code of the device/user. Metro code is the OpenRTB equivalent of DMA |
ZIP_CODE | The zip code of the device/user |
Mobile/Device Macros
Macro | Expansion |
---|---|
DEVICE_HEIGHT | Device height in pixels |
DEVICE_HWV | Device hardware model |
DEVICE_MAKE | The device make that the ad was served on (i.e. Apple, Samsung) |
DEVICE_MODEL | The device model that the ad was served on (i.e. iPhone 6s, Galaxy S6) |
DEVICE_TYPE | The type of device the impression was served on |
DEVICE_WIDTH | Device width in pixels |
EXCHANGE_DEVICE_MAKE | Device make as passed by the exchange |
EXCHANGE_DEVICE_MODEL | Device model as passed by the exchange |
PLATFORM_CARRIER | Mobile carrier of the device the ad was served on (i.e. Verizon, AT&T) |
PLATFORM_CONNECTION_TYPE | Type of internet connection |
PLATFORM_OS | Operating system of the device the ad was served on (i.e. iOS, Android) |
PLATFORM_OS_VERSION | Version of the device OS |
Video Macros
Macro | Expansion |
---|---|
AUTOPLAY_BLOCKED | Whether or not the video ad can be autoplayed |
DURATION_FORMATTED | Video duration formated to hh:mm:ss |
EVENT_AUDIBLE_IMPRESSION | URL for tracking whether the audio was playing |
EVENT_CLOSE_URL | URL for tracking close events |
EVENT_COMPANION_VIEW_URL | URL for tracking companion views |
EVENT_COMPLETE_URL | URL for tracking video completes |
EVENT_CUSTOM_EVENT | URL for tracking a user-defined custom event |
EVENT_FULLSCREEN_URL | URL for tracking video fullscreen events |
EVENT_MID_URL | URL for tracking video midpoints |
EVENT_MUTE_URL | URL for tracking video mutes |
EVENT_PAUSE_URL | URL for tracking video pauses |
EVENT_Q1_URL | URL for tracking first quartile video plays |
EVENT_Q3_URL | URL for tracking third quartile video plays |
EVENT_RESUME_URL | URL for tracking video resumes |
EVENT_SKIP_URL | URL for tracking video skips |
EVENT_START_URL | URL for tracking video starts |
EVENT_UNMUTE_URL | URL for tracking video unmutes |
PLAYER_HEIGHT | Video content player height |
PLAYER_WIDTH | Video content player width |
VAST_ERROR_URL | URL for VAST3 errors |
VAST_NURL_ESC | URL pointing back at stinger |
VAST_VERSION | Version of VAST to use |
URL Macros
NOTE: These macros cannot be included in the click_url field of the Creative. They may only be included in the creative_content or inside a Creative Template.
Macro | Expansion |
---|---|
CLICK_DESTINATION_URL | Destination URL |
CLICK_TRACKING_URL | Click-through tracking URL without destination URL |
CLICK_URL | Click-through URL including tracking and destination |
CLICK_URL_ESC | The escaped CLICK_URL macro |
CLICK_URL_ESC_ESC | The double escaped CLICK_URL macro |
COMPANION_CLICK_URL | URL for tracking companion clicks |
EVENT_VIEWABLE_IMPRESSION | URL for tracking whether an impression was viewable |
NUM_DEST_URL_ESC_ESCAPES | Number of escapes to be used by your ad server when escaping the final destination URL. Required by some 3rd party ad servers to correctly handle destination URL redirection. Use this macro in conjunction with the CLICK_URL_ESC macro |
NUM_DEST_URL_ESCAPES | Number of escapes to be used by your ad server when escaping the final destination URL. Required by some 3rd party ad servers to correctly handle destination URL redirection. Use this macro in conjunction with the CLICK_URL macro |