Markup Substitution Macros

BidCore supports the use of macros in Display HTML creative markup, native creatives, and VAST markup. When you use any of the following macros in the supported formats, BidCore will substitute the actual value for the macro if it is available before the content is rendered.

Important

For VAST Markup, macros are expanded before the wrapped VAST XML is rendered. Therefore only URL safe macros should be used to prevent VAST player rendering issues. The URL Safe versions of a macro in the following table have _ESC as part of their name, e.g USER_AGENT_ESC.

Substitution Macros

BidCore Substitution Macros

Macros

Description

${ADVERTISER_ID}

Returns the creative’s advertiser ID. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details. For example,

example.com/win?impid=102&ssp=${INVENTORY_SOURCE}&agency=${ADVERTISER_ID}

${APP_BUNDLE}

Returns the application bundle from the bid request, app.bundle. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.. For example,

example.com/win?cid=${CAMPAIGN_ID}&ref=${APP_BUNDLE}&app=${APP_NAME}

${APP_ID}

Returns the application ID from the bid request, app.id. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details. For example,

example.com/win?cid=${CAMPAIGN_ID}&ref=${APP_BUNDLE}&app=${APP_ID}

${APP_NAME}

Returns the application name from the bid request, app.name. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details. For example,

example.com/win?cid=${CAMPAIGN_ID}&ref=${APP_BUNDLE}&app=${APP_NAME}

${APP_STORE_URL}

Returns the app store URL from the bid request, app.storeurl. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details. For example,

example.com/win?play=${APP_STORE_URL}&ref=${APP_BUNDLE}

${CACHEBUSTER}

This is used to prevent a creative from caching, a random integer up to 1000000000. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${CAMPAIGN_ID}

Returns the creative’s campaign ID. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details. For example,

example.com/win?cid=${CAMPAIGN_ID}&clktr=${CLICK_URL}&adid=${CREATIVE_ID}

${CAMPAIGN_NAME}

Returns the name of the campaign, for example, campaign_1

${CLICK_URL}

Tracks clicks and redirects to the landing page. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${CLICK_URL_ESC}

Tracks clicks and redirects to the landing page escape. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${CLICK_TRACKER_URL}

Tracks clicks without redirecting to the landing page.

${CLICK_TRACKER_URL_ESC}

Tracks clicks without redirecting to the landing page escape.

${CLIENT_BID_ID}

Returns the bid response ID. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${CREATIVE_ID}

Returns the creative ID. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${CREATIVE_NAME}

Returns the name of the creative, for example, creative_1

${DE_CITY}

Returns the city ID, for example, 105

${DE_CITY_NAME}

Returns the city name, for example, Chicago

${DE_COUNTRY}

Returns the country ID, for example, us

${DE_COUNTRY_NAME}

Returns the country name, for example, United States

${DE_REGION}

Returnd the region ID, for example, us-il

${DE_REGION_NAME}

Returns the region name, for example, Illinois

${DE_ZIP}

Returns the postal code, for example, 60609-2106

${DEVICE_MAKE}

Returns the make of the device on which the ad was served (e.g. Apple, Samsung). Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details., For example,

example.com/win?manufacturer=${DEVICE_MAKE}&model=${DEVICE_MODEL}

${DEVICE_MODEL}

Returns the model of the device on which the ad was served, e.g. iPhone 6s, Galaxy S6. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details. For example,

example.com/win?manufacturer=${DEVICE_MAKE}&model=${DEVICE_MODEL}

${GDPR}

Returns the GDPR consent value 1/0. 0 GDPR does not apply; 1 GDPR applies

${GDPR_CONSENT}

Returns the TC string, as obtained from the OpenRTB request

${GENDER}

Returns the user gender value from the bid request, user.gender. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${HEIGHT}

Returns the height of the creative in pixels. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${IFA}

Returns the device.ifa from the bid requests. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

example.com/win?uuid={USER_ID}&ifa=${IFA}

${INVENTORY_SOURCE}

Returns the Supplier ID from whom you bought the inventory. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${INVENTORY_TYPE}

Returns the inventory type, either website or application

${IP_ADDRESS}

For user-to-server(U2S) requests, returns the request header. For server-to-server(S2S) requests, returns the bidding device IP address. Use IP_ADDRESS_ESC for VAST Markup.

${IP_ADDRESS_ESC}

URL safe IP address. For U2S requests, returns the request header. For S2S requests, returns the bidding device IP address. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${IP_ADDRESS_IPV6}

For U2S requests, returns the request header. For S2S requests, returns the bidding device IPv6 address. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${LAT}

Returns the geographic latitude from the bid request. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${LINE_ITEM_ID}

Returns the line item ID associated with the creative. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${LINE_ITEM_NAME}

Returns the name of the line item, for example, line_item_1

${LON} or {LONG}

Returns the geographic longitude from the bid request. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details. For example,

example.com/win?lat=${LAT}&lon=${LONG}&ip=${IP_ADDRESS_ESC}

${ONLINE_CONVERSION_CONTEXT}

Required in display creative content or video creative vast_url for S2S conversion tracking. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${PAGE}

Returns the site page from the bid request, site.page. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${PAGE_DOMAIN}

Returns the site domain from the site.page value. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${PLATFORM_OS}

Returns the Operating System of the device on which the ad was served, e.g. iOS. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${PLAYER_HEIGHT}

Returns the video player height in pixels from the bid request. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${PLAYER_WIDTH}

Returns the video player width in pixels from the bid request. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${PUBLISHER_ID}

Returns the publisher ID using the ssp-name_pub-id format, e.g. emxdigital_855.

${REFERRER}

Returns the referral site from the bid request, site.ref. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${SITE_DOMAIN}

Returns the site domain from the bid request, site.domain. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${SITE_ID}

Returns the site ID from the bid requests, site.id. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${SITE_NAME}

Returns the site name from the bid request, site.name. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${TAGID}

Returns the tag ID from the bid request, imp.tagid. This is an identifier for a specific ad placement or ad tag that was used to initiate the auction. This value is prefixed with the exchange name followed by underscore, for example, if Rubicon SSP sends a bid request for a placement ID “43256”, this value becomes “rubicon_43256”. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${USER_AGENT}

Returns the user agent string, for U2S requests returns the request header and for S2S requests returns the bid request device user agent. For VAST markup use USER_AGENT_ESC}

${USER_AGENT_ESC}

Returns the user agent string in a URL safe manner, for U2S requests returns the request header and for S2S requests returns the bid request device user agent. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${USER_ID}

Returns the User ID from the bid request. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details. For example,

example.com/win?uuid=${USER_ID}&ua=${USER_AGENT_ESC}&os=${PLATFORM_OS}

${WIDTH}

Returns the creative’s width in pixels. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

${WRAPPED_VAST_URL}

Returns the original VAST URL. Can be used for VAST markup. See the Video Creatives section for details.

${YEAR_OF_BIRTH}

Returns the user year of birth from the bid request. Can be used in Display and Native HTML and VAST markup. See the Creative Management for more details.

Example Usage

# pixel usage
https://adserver.com/winnotice?impid=102&ssp=${INVENTORY_SOURCE}&crid=${CREATIVE_ID}

# Creative Markup
<iframe src=\"http://dsp.com/imp?li=${LINE_ITEM_ID}&os=${PLATFORM_OS}\"><\/iframe>

# VAST URL
http://adserver.com/vast?impid=102&$conversion=${ONLINE_CONVERSION_CONTEXT}

# Vast Markup
<Impression><![CDATA[http://dsphost.net/sync?ssp=${INVENTORY_SOURCE}&display_unit=${DEVICE_MAKE}&model=${DEVICE_MODEL}]]></Impression>