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

MacroExpansion
ACCOUNT_IDAccount ID for the impression
AD_IDThe Ad-ID of the creative: https://www.ad-id.org
ADVERTISER_IDAdvertiser ID for the impression
ADVERTISER_ID_ALTAlternative advertiser ID for the impression
ADVERTISER_NAMEThe advertiser name for the impression
AGEThe age of the user as reported by the exchange
ANDROID_IDThe unique Android identifier of the user
ANDROID_ID_SHA1The SHA1 of the user ID for Android requests
AUCTION_IDUnique 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_UTCTime of bid request sent in UTC timezone
CACHEBUSTERRandom number for cache busting
CAMPAIGN_IDCampaign/Order ID for the impression
CAMPAIGN_ID_ALTAlternative ID for the campaign
CAMPAIGN_NAMEThe campaign name for the impression
CREATIVE_IDCreative ID for the impression
CREATIVE_ID_ALTAlternative creative ID for the impression
CREATIVE_NAMEThe creative name for the impression
DEAL_IDThe deal id
DNTWhether the user has Do Not Track or Limit Ad Tracking set
GDPR_CONSENT_STRINGThe consent string on the bid request used for GDPR compliance
GDPR_CONSENT_STRING_ESCURL-safe GDPR consent string
GENDERThe gender of the user (M or F)
HEIGHTHeight of the Creative
HOSTHost URL for impressions, clicks, events
IMP_ON_MRAID_IS_VIEWABLETrigger mraid imp on isViewable event or on load
IMPRESSION_URLURL to count an impression. This macro must be present in all creative templates.
IOS_IDThe unique iOS identifier of the user
IOS_ID_SHA1The SHA1 of the user ID for iOS requests
IP_ADDRESSIP address of the device, base 64 encoded (will be pseudo-anonymized when subject to GDPR without explicit consent)
IP_ADDRESS_ESCIP address of the device, URL-escaped (will be pseudo-anonymized when subject to GDPR without explicit consent)
IP_ADDRESS_IPV6IP address of the device when IPV6 is present, always URL-escaped (will be pseudo-anonymized when subject to GDPR without explicit consent)
IS_GDPRWhether the auction is subject to GDPR
IS_GDPR_CONSENTEDWhether customer received user's consent for GDPR auction
LINE_ITEM_IDLine Item ID for the impression
LINE_ITEM_ID_ALTAlternative line item ID for the impression
LINE_ITEM_NAMEThe line item name for the impression
MEDIA_HOSTHost the Creative will be served from
US_PRIVACY_STRINGThe US Privacy String on the bid request used for CCPA compliance.
USER_AGENTFull user agent of the device, base 64 encoded (will be blank when subject to GDPR without explicit consent).
USER_AGENT_ESCFull user agent of the device, URL-escaped (will be blank when subject to GDPR without explicit consent).
USER_IDMobile/device ID for mobile, cookie for desktop
USER_ID_SHA1The SHA1 of the user ID
WIDTHWidth of the Creative

Inventory/Content Macros

MacroExpansion
APP_BUNDLEMobile application bundle the impression was served on
APP_IDUnique ID of the app within the exchange
APP_NAMEMobile application name the impression was served on
APP_STORE_URLURL the mobile application on the app store
DOMAINDomain the impression was served on
EXCHANGE_HANDLEThe 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_SOURCEExchange inventory source (i.e. Rubicon, Mopub etc)
PAGEThe full URL of the page the ad was served on
PLACEMENT_IDPlacement ID for the impression reported by the exchange
PUBLISHER_IDPublisher ID for the impression reported by the exchange
PUBLISHER_NAMEThe publisher name that the impression was served on
REFERRERDomain the user came from before landing on domain the impression was served on
REFERRER_URL_ESCThe encoded referring URL
REWARDEDWhether the auction was for rewarded video
SITE_IDSite ID that the impression was served on
SITE_NAMESite Name that the impression was served on

Location Macros

MacroExpansion
COUNTRY_CODETwo-character country code of the device/user
LATThe latitude of the device/user (will be truncated to three decimal places when subject to GDPR without explicit consent)
LONGThe longitude of the device/user (will be truncated to three decimal places when subject to GDPR without explicit consent)
METRO_CODEThe metro code of the device/user. Metro code is the OpenRTB equivalent of DMA
ZIP_CODEThe zip code of the device/user

Mobile/Device Macros

MacroExpansion
DEVICE_HEIGHTDevice height in pixels
DEVICE_HWVDevice hardware model
DEVICE_MAKEThe device make that the ad was served on (i.e. Apple, Samsung)
DEVICE_MODELThe device model that the ad was served on (i.e. iPhone 6s, Galaxy S6)
DEVICE_TYPEThe type of device the impression was served on
DEVICE_WIDTHDevice width in pixels
EXCHANGE_DEVICE_MAKEDevice make as passed by the exchange
EXCHANGE_DEVICE_MODELDevice model as passed by the exchange
PLATFORM_CARRIERMobile carrier of the device the ad was served on (i.e. Verizon, AT&T)
PLATFORM_CONNECTION_TYPEType of internet connection
PLATFORM_OSOperating system of the device the ad was served on (i.e. iOS, Android)
PLATFORM_OS_VERSIONVersion of the device OS

Video Macros

MacroExpansion
AUTOPLAY_BLOCKEDWhether or not the video ad can be autoplayed
DURATION_FORMATTEDVideo duration formated to hh:mm:ss
EVENT_AUDIBLE_IMPRESSIONURL for tracking whether the audio was playing
EVENT_CLOSE_URLURL for tracking close events
EVENT_COMPANION_VIEW_URLURL for tracking companion views
EVENT_COMPLETE_URLURL for tracking video completes
EVENT_CUSTOM_EVENTURL for tracking a user-defined custom event
EVENT_FULLSCREEN_URLURL for tracking video fullscreen events
EVENT_MID_URLURL for tracking video midpoints
EVENT_MUTE_URLURL for tracking video mutes
EVENT_PAUSE_URLURL for tracking video pauses
EVENT_Q1_URLURL for tracking first quartile video plays
EVENT_Q3_URLURL for tracking third quartile video plays
EVENT_RESUME_URLURL for tracking video resumes
EVENT_SKIP_URLURL for tracking video skips
EVENT_START_URLURL for tracking video starts
EVENT_UNMUTE_URLURL for tracking video unmutes
PLAYER_HEIGHTVideo content player height
PLAYER_WIDTHVideo content player width
VAST_ERROR_URLURL for VAST3 errors
VAST_NURL_ESCURL pointing back at stinger
VAST_VERSIONVersion 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.

MacroExpansion
CLICK_DESTINATION_URLDestination URL
CLICK_TRACKING_URLClick-through tracking URL without destination URL
CLICK_URLClick-through URL including tracking and destination
CLICK_URL_ESCThe escaped CLICK_URL macro
CLICK_URL_ESC_ESCThe double escaped CLICK_URL macro
COMPANION_CLICK_URLURL for tracking companion clicks
EVENT_VIEWABLE_IMPRESSIONURL for tracking whether an impression was viewable
NUM_DEST_URL_ESC_ESCAPESNumber 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_ESCAPESNumber 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