The Brid player has support for the following macros regarding ad tags:
- [referrer_url] - Will replace with the referrer URL
- [page_url] - Will replace with the page URL
- [description_url] - Will be replaced with the description URL which should typically be the same as the referrer URL
- [video_title] - Will replace with the title of the video
- [video_tags] - Will replace with comma-separated tags of the video
- [description] - Will be replaced with the video's description
- [video_duration] - Will replace with the video duration in seconds
- [vpmute] - Will return 0 or 1 depending on the mute state of the player
- [video_id] - Will replace with the ID of the video
- [timestamp] - Use as a cachebuster
- [player_width] - Will return the player's width in pixels
- [player_height] - Will return the player's height in pixels
- [player_id] - Will return the ID of the player used
- [autoplay] - Will return 1 or 0 depending on if the player autoplays or not
- [player_type] - Will return p or o, indicating a player or an outstream player
- [mediafile_url] - Will be replaced with the full URL to the video file
- [user_agent] - Will be replaced with the browser user agent
- [user_ip] - Will be replaced with the IP address of the viewer (premium plans only)
- [latitude] - Will be replaced with a viewers Geo latitude value (premium plans only)
- [longitude] - Will be replaced with a viewers Geo longitude value (premium plans only)
- [viewability] - Will return 1 or 0 depending on if the player is in view when your ad tag gets called
- [dnt] - A do not track macro. Will return 0 or 1 depending on the user.
- [gdpr] - A flag for European Union traffic consenting to advertisements.
- [consent] - A consent string passed from various Consent Management Platforms (CMP's).
- [us_privacy] - A mandatory string for all publishers in which they must pass the privacy consent for users from California
- [uid] - Will be substituted with the session ID of a user.
- [nonce] - Used for setting PPID's from Nonce Loaders.
- [paln] - Used for setting PPID's from Nonce Loaders.
- [video_iab_categories] - Used for substituting the IAB categories a video belongs to.
- [brid_ppid] - Used for substituting the publishers PPID. Make sure that there is a global JavaScript variable with the name "brid_ppid" which has the PPID value.
- [plcmt] - Indicates whether a player is a click-to-play player or not, returning a value of 1 (instream) or 2 (accompanying content) accordingly.
- [ppsj] - Will return a base64-encoded value containing audience and contextual data provided by the publisher to improve programmatic monetization.
PrebidJS only macros (used for advanced bidder setups)
- __playerId__ - Will be replaced with the unique ID of the player used
- __playerWidth__ - Will be replaced with the current player width in pixels
- __playerHeight__ - Will be replaced with the current player height in pixels
- __pageUrl__ - Will be replaced with the URL where the player is being rendered
- __videoId__ - Will be replaced with the unique ID of the embedded video
- __videoTitle__ - Will be replaced with the title of the video that is embedded
- __videoUrl__ - Will be replaced with the direct URL to the video file
- __plcmt__ - The value will be replaced with either 1 or 2, indicating whether the player is a click-to-play player with sound (1) or a muted click-to-play player or autoplay player (2). A value of 4 will be returned in the case of an outstream player.
- __placement__ - Will be replaced with one of the following values: 1 (above-the-fold), 2 (sticky), 3 (below-the-fold), 7 (full-screen).
- __videoIabCategories__ - Will be replaced with genre that best describes the content, e.g., rock, pop, etc. There’s a few taxonomies for defining the genre, the IAB Content taxonomy being the most standard one at the moment.
- __videoIabKeywords__ - Will be replaced with genre that best describes the content, e.g., rock, pop, etc. There’s a few taxonomies for defining the genre, the IAB Content taxonomy being the most standard one at the moment.
- __contentLanguage__ - Will be replaced with appropriate content language.
- __videoDuration__ - Will be replaced with video duration in seconds.
- __prerollStart__ - Will be replaced with autoplay/clicktoplay
- __playbackMethod__ - Will be replaced with OpenRTB playback values ( https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf ).
- __playbackMethodStr__ - Will be replaced with "auto_play_sound_on"; "auto_play_sound_off"; "click_to_play"; "viewport_sound_on"; "viewport_sound_off".
- __gdpr__ - Will be replaced with value of 0 or 1 depending on users’ IP (0 : Non-EU, 1 : EU).
- __gdprConsent__ - Will be replaced with a code provided by your CMP.
- __usPrivacy__ - Will be replaced with CCPA privacy value ( applies only on California inventory )
Mobile IN-APP only macros
- [app_bundle] - app bundle
- [app_name] - app name
- [device_make] - device make
- [device_model] - device model
- [device_id] - user device id for all device types
Dynamic macros
The Brid player also has support for dynamic macros. If you set up a Brid dynamic macro object on your page, the player can read it and insert dynamic strings into your ad tag URL.
Example
Here's an example config object that the player expects on your web page:
<script type="text/javascript">
var bridMacros = {
cat: "Category",
label: "Label"
};
</script>
In your ad tag URL that you have set up in the CMS, you can now use a dynamic macro like this:
https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=cat%3D[brid_cat]%26label%3D[brid_label]
NOTE: Make sure that the bridMacros object exists on your page where the player is present The player needs to have access to this object to properly populate dynamic macros. Make sure that this object is present and loaded before the player on your page.
Dynamic macros are always in the form of [brid_{propertyName}]. Make sure to properly match them between what you set up on your page and what you entered in the CMS.
There is no limit to how many dynamic macros you can pass to the player this way.
Partner custom macros
Partner custom macros are site-wide macros that you can set on a per site/partner basis in your account so they can be used network wide to pass custom values in your ad sources.
Read more about partner custom macros.
Comments
0 comments
Please sign in to leave a comment.