What VAST macros are, in one minute
A macro is a placeholder token inside an ad tag URL that the video player (or an ad server, or an SSAI stitcher) replaces with a real value the instant the ad is requested. One static tag becomes a per-request tag carrying a cache-buster, a timestamp, the device advertising ID, the consent string, the page URL, the player size, and more. Without macros, every request would look identical - caches would collapse them, impression counts would be wrong, targeting and privacy signals would be missing.
Same idea, three syntaxes
| Ecosystem | Syntax | Cache-buster example |
|---|---|---|
| IAB VAST 4.x (cross-platform standard) | [MACRO] | [CACHEBUSTING] |
| Google Ad Manager / IMA | %%MACRO%% and ${MACRO} | %%CACHEBUSTER%% |
| Roku Advertising Framework (RAF) | bare ROKU_ADS_* token as a param value | ROKU_ADS_CACHE_BUSTER |
The Macro reference tab above lists every macro from all three, with what the player substitutes and an example value. The Tag builder tab lets you assemble a tag and preview the filled request. For the full walkthrough - syntax rules, escaping, privacy signals, and a worked example - read VAST ad-tag macros explained.
Frequently Asked Questions
What are VAST macros?
VAST macros are placeholder tokens in an ad tag URL - like [CACHEBUSTING] or %%CACHEBUSTER%% - that the video player or ad server replaces with real values (a cache-buster, timestamp, device ID, consent string, page URL) at the moment the ad is requested. They let one static tag carry per-request context.
How does IAB, Google, and Roku macro syntax differ?
IAB VAST macros use square brackets, e.g. [CACHEBUSTING]. Google Ad Manager uses %%CACHEBUSTER%% and ${GDPR} for privacy. Roku RAF uses bare tokens such as ROKU_ADS_CACHE_BUSTER that you place as a query-parameter value. The concept is identical - only the delimiters differ.
Which macro is the cache-buster?
IAB VAST: [CACHEBUSTING]. Google Ad Manager: %%CACHEBUSTER%%. Roku RAF: ROKU_ADS_CACHE_BUSTER. It inserts a random value so caches and CDNs cannot dedupe the request, which keeps impression counting accurate.
How do I pass GDPR or CCPA consent in a VAST tag?
In IAB VAST use [GDPRCONSENT] (TCF string), [REGULATIONS], and [GPPSTRING]/[GPPSECTIONID] for the Global Privacy Platform. In Google Ad Manager use ${GDPR}, ${GDPR_CONSENT_XXXX}, ${ADDTL_CONSENT}, and %%TAG_PARAM:us_privacy%% for US Privacy/CCPA.
Does the player or the ad server replace the macros?
Whichever component owns the tag at that hop. The player or SSAI stitcher fills client macros like device ID, IP, and player size before calling the ad server; the ad server can fill or forward macros to downstream wrapped tags. Unfilled macros should be dropped or left blank, never sent literally.