Macros for Dynamic Ad Insertion

See more information about macros, including how they work with Ad Manager, and a complete list of rendering, tracking, and other video macros.

Jump to a specific macro in the list

Ad request macros                
User agent
User IP address
Stream ID

 

Asset key
Break duration
SCTE-35

 

CMS ID
Video duration
Non-personalized ads

 

VAST tracking macros               
Cachebusting
Error code

     

Ad request macros

The ad request macros shown here can only be used in an ad tag for Dynamic Ad Insertion for a video on demand content source or live stream. They do not work in the context of VAST creatives.

Square bracket macros are generally required to pass Ad Manager macro validation for redirects.

User agent
 
Macro
%%USER_AGENT%%
 

Expands to the user agent.

User IP address
 
Macro
%%USER_IP%%
[IP_ADDRESS]
 

Expands to the user IP address.

[IP_ADDRESS] should only be used for Ad Manager redirects where %%USER_IP%% is not allowed.

Stream ID
 
Macro
%%STREAM_ID%%
 

Expands to the session stream ID for the content source currently playing.

Asset key
 
Macro
%%ASSET_KEY%%
 

Expands to the live stream event code.

Break duration, in seconds
 
Macro
%%BREAK_DURATION%%
 

Expands to the cue-out duration, in seconds.

SCTE-35
 
Macro
%%SPLICE_INSERT_EVENT_ID%%
%%SPLICE_INSERT_UPID%%
%%TIME_SIGNAL_EVENT_ID%%
%%TIME_SIGNAL_UPID%%
 

Expands to SCTE-35 signals.

CMS ID
 
Macro
%%CMS_ID%%
 

Expands to the Ad Manager content source ID ("CMS ID") currently playing. This value does not appear in your MRSS feed, but is visible in the Ad Manager interface.

Video duration, in seconds
 
Macro
%%VIDEO_DURATION_SEC%%
 

Expands to the duration of the video in seconds.

Non-personalized ads
 
Macro
%%NPA%%
 

Expands to the value of 1 to tag the request as non-personalized.

This macro is used with ad requests subject to GDPR. See all ad request macros for GDPR.

VAST tracking macros

Both the [CACHEBUSTING] and [ERRORCODE] macros adhere to the VAST 4.0 spec (see "2.3.7 Macros").

Cachebusting
 
Macro
[CACHEBUSTING]
 

Expands to an 8-digit random number.

Errorcode
 
Macro
[ERRORCODE]
 

Expands to the VAST error code.

 

For any issues related to DAI troubleshooting or outages, contact publisher support.

Was this helpful?
How can we improve it?