Notification

Only available in Google Ad Manager 360.

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.

Expand all  Collapse all

Ad request macros

The ad request macros shown here can only be used in an ad tag for Dynamic Ad Insertion (DAI) 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.

API frameworks
 
Macro
[APIFRAMEWORKS]
 

The sdk_apis param.

 
APP bundle
 
Macro
[APPBUNDLE]
 

The an param.

Asset key
 
Macro
%%ASSET_KEY%%
 

Expands to the live stream event code.

Break position
 
Macro
[BREAKPOSITION]
 

VAST 4.1 macro. Returns values:

1: for pre-roll
2: for mid-roll
3: for post-roll
4: for standalone
0: for none of the above/other
Break max duration
 
Macro
%%BREAK_DURATION%%
[BREAKMAXDURATION]
 

Current Ad Break duration, in seconds.

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

Cachebusting
 
Macro
[CACHEBUSTING]
 

A random number.

Client ID
 
Macro
[CLIENTUA]
 

The ID of the player and VAST client used.

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.

Domain
 
Macro
[DOMAIN]
 

VAST 4.1 macro.  Domain of the stream creation referer URL.

FW CAID
 
Macro
%%FW_CAID%%
 

For VOD only - FreeWheel Custom Assed ID from the MRSS feed

GDPR
 
Macro
%%GDPR%%
 

The gdpr param.

GDPR consent
 
Macro
[GDPRCONSENT]
 

The gdpr_consent param.

Google in-stream video nonce
 
Macro
[GOOGLE_INSTREAM_VIDEO_NONCE]
 

The givn param.

IFA
 
Macro
[IFA]
 

A resettable advertising ID that is taken from the rdid param. The advertising ID is only passed to primary ad requests if allowed by privacy flags (such as tfcd and is_lat).

IFA type
 
Macro
[IFATYPE]
 

DAI idtype param. The IFA type is only passed to primary ad requests if allowed by privacy flags (such as tfcd and is_lat).

Limited tracking
 
Macro
[LIMITEDTRACKING]
 

The ltd param.

Mediamime
 
Macro
[MEDIAMIME]
 

VAST 4.1 macro: comma-delimited list of supported media MIME types.

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, and only in an ad tag for Dynamic Ad Insertion. See other macros for GDPR.

OMID Partner
 
Macro
[OMIDPARTNER]
 

VAST 4.1 macro: the omid_p param.

Page URL
 
Macro
[PAGEURL]
 

VAST 4.1 macro: the stream creation referer URL.

Placement Type
 
Macro
[PLACEMENTTYPE]
 

VAST 4.1 macro: for DAI it's value will always be 1 (In-Stream).

See AdCOM Placement Subtypes Video.

Regulations
 
Macro
[REGULATIONS]
 

VAST 4.1 macro: comma-delimited list of applicable regulations, based on params. The presence of tfcd=1 will add "coppa", gdpr=1 will add "gdpr".

Server side
 
Macro
[SERVERSIDE]
  VAST 4.1 macro - always 1.
SCTE-35
 
Macro
%%SPLICE_INSERT_EVENT_ID%%
%%SPLICE_INSERT_UPID%%
%%TIME_SIGNAL_EVENT_ID%%
%%TIME_SIGNAL_UPID%%
%%TIME_SIGNAL_UPID_RAW%%
%%AFMM_CBC%%
 

Expands to SCTE-35 signals.

Stream ID
 
Macro
%%STREAM_ID%%
 

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

TFCD
 
Macro
%%TFCD%%
 

Expands to the value of the tfcd parameter.

TFUA
 
Macro
%%TFUA%%
 

The tfua param.

Timestamp
 
Macro
[TIMESTAMP]
 

VAST 4.0 macro - current timestamp formatted according to ISO 8601.

Transaction ID
 
Macro
[TRANSACTIONID]
 

VAST 4.1 macro -  an identifier used to correlate a chain of ad requests from the origination end.

US privacy
 
Macro
%%US_PRIVACY%%
 

Expands to the value of the us_privacy parameter.

User agent
 
Macro
%%USER_AGENT%%
[DEVICEUA]
 

User agent of the device that is rendering the ad to the end user.

In the case of VAST redirects, only the [DEVICEUA] macro will provide the expected functionality.
User IP address
 
Macro
%%USER_IP%%
[DEVICEIP]
[IP_ADDRESS]
 

Expands to the user IP address.

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

Video duration
 
Macro
%%VIDEO_DURATION%%
 

VOD only - duration of the video in milliseconds, from MRSS feed.

Video duration, in seconds
 
Macro
%%VIDEO_DURATION_SEC%%
 

Expands to the duration of the video in seconds.

Video ID
 
Macro
%%VIDEO_ID%%
 

VOD only - CMS Content ID from MRSS feed.

Video title
 
Macro
%%VIDEO_TITLE%%
 

VOD only - video title from MRSS feed.

VAST tracking macros

Both the [CACHEBUSTING] and [ERRORCODE] macros adhere to the VAST 4.0 spec (see section "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.

Macros in URL encoded strings

If you need to use a macro in a section of the ad tag that should be URL encoded, the macro itself should not be URL encoded to ensure that macro replacement works properly.

Example
Using the Google in-stream video nonce macro in a query parameter that needs to be URL encoded:
 

Correct
http://some-adtag.com?encoded_param=[GOOGLE_INSTREAM_VIDEO_NONCE]%3D5
 

Incorrect
http://some-adtag.com?encoded_param=%5BGOOGLE_INSTREAM_VIDEO_NONCE%5D%3D5

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
10236346155379742005
true
Search Help Center
true
true
true
true
true
148
false
false