Radiant Media Player

Ad Tag Variables & Macros



Ad tag variables & macros documentation sections


Ad tag variables

Ad-servers may use ad tag variables to optimise fill rate and ad-targeting. Since version 4.5.10 Radiant Media Player supports several variables that can be added to your ad tag URL. Those ad tag variables will be replaced automatically by Radiant Media Player just before the ad tag URL is requested to the ad-server. This is supported for both Google IMA and rmp-vast.

Note that the below ad tag variables are only replaced when the player attempts to load the ad tag URL from the server - the player will not replace those variables within the body of the VAST or VMAP response for tracking URIs or redirects. See the VAST macros section for variables that can be replaced within the body of a VAST response.

The following ad tag variables are supported:

  • __domain__: the Internet domain where the player stands
  • __page-url__: the full page URL where the player stands
  • __referrer__: the page URL that brought the viewer to the page where the player stands
  • __player-width__: current player width in pixels
  • __player-height__: current player height in pixels
  • __random-number__: a 12-digits random number (generally used for cache busting)
  • __timestamp__: the number of milliseconds elapsed since 1 January 1970 00:00:00 UTC (UNIX timestamp)
  • __mobile__: writes "mobile" if player is rendered on a mobile device
  • __ima__: writes "ima" if video ads are rendered with Google IMA
  • __item-title__: title for the currently playing video (taken from contentTitle setting) - for playlist/related this variable is pulled from the JSON file for each item
  • __item-description__: description for the currently playing video (taken from contentDescription setting) - for playlist/related this variable is pulled from the JSON file for each item
  • __item-duration__: duration in seconds for the currently playing video - only for on-demand streaming where mid/post rolls are used
  • __current-time__: current player time in seconds - only for on-demand streaming where mid/post rolls are used

All variables are replaced with string values - an empty string is used if they cannot be filled

The ad tag variables are automatically RFC3986 URI encoded when replaced as recommended in the VAST 3 specifications

Only the first instance of a given variable will be replaced - use JavaScript for multiple replacements or to append custom ad tag variables

Only use ad tag variables when your ad-server support them to avoid unnecessary computing at run time

Example:

https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml?height=__player-height__&width=__player-width__&url=__page-url__&title=__item-title__

When making the ad request the player will try to load:

https://www.radiantmediaplayer.com/vast/tags/inline-linear.xml?height=360&width=640&url=https%3A%2F%2Fwww.radiantmediaplayer.com%2Fdocs%2Flatest%2Fad-tag-variables-macros.html&title=Ad%20Tag%20Variables%20And%20Macros

VAST macros

VAST macros as defined in the VAST 3 specifications enable the video player to provide certain details to the ad server at the time tracking URIs are accessed. Macros will automatically be replaced by the player when pinging tracking URIs.

Supported macros with Google IMA:

  • [ERRORCODE]
  • [CACHEBUSTING]
  • [ASSETURI]

Additional macros may be supported for Google DoubleClick users through the IMA SDK.

Supported macros with rmp-vast:

  • [ERRORCODE]
  • [CONTENTPLAYHEAD]
  • [CACHEBUSTING]
  • [ASSETURI]

See the VAST 3 specifications for more information on VAST macros.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.