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
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.
AGEThe age of the user as reported by the exchange
GENDERThe gender of the user as reported by the exchange
BUZZ_KEYThe Buzz Key
USER_IDDevice ID for mobile, cookie for desktop. This will populate with either a cookie on a desktop OR an iOS/Android ID for mobile (will be pseudo-anonymized when subject to GDPR without explicit consent).
USER_ID_SHA1Device ID for mobile, hashed using the SHA1 algorithm for use with postback providers
IOS_IDiOS Device ID
ANDROID_IDAndroid Device ID
CACHEBUSTERRandom number
DNTWhether the user has Do Not Track or Limit Ad Tracking set
HEIGHTHeight of the Creative
WIDTHWidth of the Creative
MEDIA_HOSTHost the Creative will be served from
IMPRESSION_URLURL to count an impression. This macro must be present in all creative templates.
ACCOUNT_IDAccount ID for the impression
ADVERTISER_IDAdvertiser ID for the impression
ADVERTISER_ID_ALTAlternative advertiser ID for the impression
CAMPAIGN_IDCampaign ID for the impression
CAMPAIGN_ID_ALTAlternative campaign ID for the impression
CREATIVE_IDCreative ID for the impression
CREATIVE_ID_ALTAlternative creative ID for the impression
LINE_ITEM_IDLine Item ID for the impression
LINE_ITEM_ID_ALTAlternative line item ID for the impression
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).
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.
US_PRIVACY_STRINGThe US Privacy String on the bid request used for CCPA compliance.
GDPR_CONSENT_STRINGThe consent string on the bid request used for GDPR compliance.
IS_COPPAWhether the auction is subject to COPPA
ADVERTISER_NAMEAdvertiser name (escaped)
ANDROID_ID_SHA1Android Device ID hashed using the SHA1 algorithm for use with postback providers.
AUCTION_ADGROUP_IDA composite identifier created by combining auction_id.account_id.campaign_id.line_item_id. It is a joining key and is recommended over using auction_id when your goal is deduplication across campaigns and line items.
BID_TIME_UTCTime stamp of the bid time in YYYY-MM-DD HH:MM:SS format, URL-escaped.
CAMPAIGN_NAMECampaign name (escaped)
CREATIVE_NAMECreative name (escaped)
GDPR_CONSENT_STRING_ESCURL-escaped version of the GDPR consent string on the bid request.
HOSTHost domain from which the creative assets are served (equivalent to MEDIA_HOST).
IOS_ID_SHA1iOS Device ID hashed using the SHA1 algorithm for use with postback providers.
IS_GDPR_CONSENTEDWhether the auction is regulated by GDPR AND the customer has been granted consent by the end user
LINE_ITEM_NAMELine Item name (escaped)
AD_IDThe universal creative identifier supported by Ad-ID
CLOCK_NUMBERBroadcast clock number used by the advertiser to identify a specific commercial spot.
CREATIVE_MIME_TYPEMIME type of the primary creative asset (for example, image/png, video/mp4).

Inventory/Content Macros

MacroExpansion
PAGEThe full URL of the page the ad was served on
DOMAINDomain the impression was served on
REFERRERDomain the user came from before landing on domain the impression was served on
SITE_IDSite ID that the impression was served on
SITE_NAMESite Name that the impression was served on
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
PLACEMENT_IDPlacement ID for the impression reported by the exchange.
PUBLISHER_IDPublisher ID for the impression reported by the exchange.
INVENTORY_SOURCEExchange inventory source (i.e. Rubicon, Mopub etc)
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)
REWARDEDWhether the auction was for rewarded video
BW_CONTENT_GENREThe genre of the video content, from the Beeswax genre taxonomy.
DEAL_IDThe private marketplace deal ID targeted for this impression
PUBLISHER_NAMEPublisher name for the impression reported by the exchange.
REFERRER_URL_ESCEscaped version of the REFERRER macro (above)

Location Macros

MacroExpansion
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).
ZIP_CODEThe zip code of the device/user.
METRO_CODEThe metro code of the device/user. Metro code is the OpenRTB equivalent of DMA.
COUNTRY_CODETwo-character country code of the device/user.
CITY_CODEThe city of the device/user, using United Nations Code for Trade and Transport locations , as defined in the oRTB spec for the geo.city object.
REGIONThe state/region of the device/user. In the US, this is the 2 letter state code (I.e. CT). For other countries this is the 2 letter country or region code (i.e. AU for Australia).

Mobile/Device Macros

MacroExpansion
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.
PLATFORM_OSOperating system of the device the ad was served on (i.e. iOS, Android)
PLATFORM_CARRIERMobile carrier of the device the ad was served on (i.e. Verizon, AT&T)
DEVICE_HEIGHTPhysical device screen height in pixels as reported by the exchange.
DEVICE_HWVDevice hardware version string as reported by the exchange (for example, model build or hardware revision).
DEVICE_WIDTHPhysical device screen width in pixels as reported by the exchange.
EXCHANGE_DEVICE_MAKEDevice make as provided by the exchange, before normalization (for example, "Apple", "Samsung").
EXCHANGE_DEVICE_MODELDevice model as provided by the exchange, before normalization (for example, "iPhone 14", "SM-G991B").
PLATFORM_CONNECTION_TYPEConnection type used by the device for the impression (for example, wifi, 4g, 5g).
PLATFORM_OS_VERSIONThe version of the operation system of the device the ad was served on (i.e. 17.0)

Video Macros

MacroExpansion
EVENT_START_URLURL for tracking video starts
EVENT_Q1_URLURL for tracking first quartile video plays
EVENT_MID_URLURL for tracking video midpoints
EVENT_Q3_URLURL for tracking third quartile video plays
EVENT_COMPLETE_URLURL for tracking video completes
EVENT_SKIP_URLURL for tracking video skips
EVENT_MUTE_URLURL for tracking video mutes
EVENT_UNMUTE_URLURL for tracking video unmutes
EVENT_PAUSE_URLURL for tracking video pauses
EVENT_RESUME_URLURL for tracking video resumes
EVENT_FULLSCREEN_URLURL for tracking video fullscreen events
EVENT_CLOSE_URLURL for tracking close events
PLAYER_HEIGHTVideo content player height
PLAYER_WIDTHVideo content player width
DURATION_FORMATTEDHuman-readable formatted duration of the video creative (for example, mm:ss).
EVENT_AUDIBLE_IMPRESSIONTracking URL fired when the video impression is considered audible (volume greater than zero).
EVENT_COMPANION_VIEW_URLTracking URL fired when the companion creative (banner or overlay) is viewed.
EVENT_CUSTOM_EVENTTracking URL fired for a custom, template-defined video event.
EVENT_VIEWABLE_IMPRESSIONTracking URL fired when the ad impression meets viewability criteria (for example, 50% in view for 1 second).
IMP_ON_MRAID_IS_VIEWABLEBoolean flag indicating whether an MRAID impression is viewable according to MRAID viewability rules.
VAST_ERROR_URLTracking URL fired when a VAST error occurs during ad playback.
VAST_NURL_ESCEscaped version of the VAST win-notification URL (nurl) for use in VAST XML.
VAST_VERSIONVersion of the VAST specification for the served ad (for example, 3.0, 4.1).

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_URLClick-through URL, including both the CLICK_DESTINATION and CLICK_TRACKING components
CLICK_DESTINATIONResolves to the destination click URL, can include other macros when expanded
CLICK_TRACKING_URLTracking-only URL, will not redirect to destination page
CLICK_URL_ESCEscaped version of the CLICK_URL macro, for use when being redirected by another ad server
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
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
CLICK_URL_ESC_ESCEscaped version of CLICK_URL_ESC for use when the click URL must be escaped twice during redirect chains.
COMPANION_CLICK_URLClick-through URL for the companion creative (banner or overlay).

Did this page help you?