Tag parameters and macros
Every parameter a /vast tag accepts and the IAB VAST 4.x macro a player or stitcher fills into it, how to use a partner's own macro format, what a server-to-server caller must send, what a no-ad answer looks like, and every macro Riptide fills into a demand partner's VAST tag.
Supply tags: parameters and IAB macros
A supply tag is a GET /vast URL on the account's serving domain (see the
VAST tag guide). The tag the console generates for a video placement writes the
placement address and then one param=[MACRO] pair per value a CTV request should carry. A value
the IAB defines a macro for uses the IAB VAST 4.x name (us_privacy uses ${US_PRIVACY}
from the IAB US Privacy spec). The rest (app name, device details, content details, COPPA, the supply chain and
the inventory partner domain) have no IAB macro, so the tag writes a named placeholder such as
[APP_NAME] for the partner to swap for its own macro. The player or stitcher replaces each macro
before it calls the tag:
https://ads.acme.example/vast?pub=acme-pub&tag=acme-preroll&mimes=video%2Fmp4&ifa=[IFA]&ifa_type=[IFATYPE]&ua=[DEVICEUA]&ip=[DEVICEIP]&devicetype=[DEVICE_TYPE]&make=[DEVICE_MAKE]&model=[DEVICE_MODEL]&os=[DEVICE_OS]&osv=[DEVICE_OSV]&playersize=[PLAYERSIZE]&protocols=[VASTVERSIONS]&plcmt=[PLACEMENTTYPE]&api=[APIFRAMEWORKS]&bundle=[APPBUNDLE]&storeid=[STOREID]&storeurl=[STOREURL]&appname=[APP_NAME]&ipd=[IPD]&url=[PAGEURL]&domain=[DOMAIN]&content_id=[CONTENTID]&content_url=[CONTENTURI]&content_title=[CONTENT_TITLE]&content_series=[CONTENT_SERIES]&content_season=[CONTENT_SEASON]&content_episode=[CONTENT_EPISODE]&genre=[CONTENT_GENRE]&rating=[CONTENT_RATING]&language=[CONTENT_LANGUAGE]&content_livestream=[CONTENT_LIVESTREAM]&content_len=[CONTENT_LENGTH]&network=[NETWORK_NAME]&channel=[CHANNEL_NAME]&gdpr_consent=[GDPRCONSENT]&gpp=[GPPSTRING]&gpp_sid=[GPPSECTIONID]&us_privacy=${US_PRIVACY}&coppa=[COPPA]&schain=[SCHAIN]&lmt=[LIMITADTRACKING]&breakpos=[BREAKPOSITION]&poddur=[BREAKMAXDURATION]&maxseq=[BREAKMAXADS]&min_dur=[BREAKMINADLENGTH]&max_dur=[BREAKMAXADLENGTH]&tid=[TRANSACTIONID]&cb=[CACHEBUSTING]
A macro left unfilled, or filled with the IAB values -1 (unknown) or -2 (withheld),
reads as unset: numbers take their defaults and the auction runs without that value. Privacy values are the
exception and fail closed: an unfilled lmt or dnt reads as 1, an unfilled
gpp or us_privacy as no consent, and an unfilled gdpr or an unknown
regs as GDPR applies.
Fill the privacy macros or remove those pairs. An unfilled us_privacy reads as an opt-out even
when gpp is filled, so a platform that sends GPP but no US Privacy string drops the
us_privacy pair. Values that can hold &, #,
+, % or a space (ua, url, storeurl,
content_url, appname, content_title, content_series,
content_season, genre, network, channel, kw,
schain) must be URL-encoded.
To see which macros a player leaves unfilled, open the placement's Tags tab, or
Diagnose › Serving with the placement picked. Both show how many recent tag requests
arrived with unfilled macros, and which ones. Privacy macros are flagged, since those requests earn
lower CPMs. The same counts are in the API as tag_signals on
getPlacementDecisionFunnel, and per request as unreplaced_tag_params on
getDecisionTrace. If a player can't fill a macro, ask your platform to render the tag
through a macro profile that leaves it out.
Placement address (required)
| Parameter | Meaning | Macro in the default tag |
|---|---|---|
pub | Publisher public id, shown on the publisher's console page. | |
tag | Placement public id. | |
mimes | Comma-separated media types the player accepts, for example video/mp4. The generated tag writes video/mp4. |
Device and viewer
| Parameter | Meaning | Macro in the default tag |
|---|---|---|
ip | The viewer's IP address. Required on a server-to-server call. | [DEVICEIP] |
ua | The viewer's device user agent, URL-encoded. Required on a server-to-server call. | [DEVICEUA] |
ifa | Device advertising id. The IAB values -1 and -2 read as no id. | [IFA] |
ifa_type | The identifier type of ifa (rida, aaid, idfa, and so on). | [IFATYPE] |
lmt | Limit ad tracking, 1 or 0. Unfilled or unknown reads as 1. | [LIMITADTRACKING] |
dnt | Do not track, 1 or 0. Unfilled or unknown reads as 1. | |
gpc | Global Privacy Control, 1 when the viewer's browser or device sends it (the Sec-GPC header). Send it on a server-to-server call. | |
devicetype | AdCOM device type: the number 1 to 8, the AdCOM name (CONNECTED_TV), or ctv, mobile, desktop, pc, stb. | [DEVICE_TYPE] |
make | Device make. | [DEVICE_MAKE] |
model | Device model. | [DEVICE_MODEL] |
os | Device operating system. | [DEVICE_OS] |
osv | Device operating system version. | [DEVICE_OSV] |
pubuid | The publisher's own user id for the viewer. |
App and site
| Parameter | Meaning | Macro in the default tag |
|---|---|---|
bundle | App bundle or package name. 0 reads as not applicable. | [APPBUNDLE] |
storeurl | App store URL, URL-encoded. | [STOREURL] |
storeid | Store-assigned app id (the IAB [STOREID]: a Roku channel id, an Amazon ASIN, a Samsung G id). It is the bundle when bundle is absent. | [STOREID] |
appname | App name, URL-encoded. | [APP_NAME] |
domain | Site or app domain. 0 reads as not applicable. | [DOMAIN] |
url | Page URL, URL-encoded. 0 reads as not applicable. | [PAGEURL] |
ipd | Inventory partner domain (OpenRTB inventorypartnerdomain). | [IPD] |
Slot and ad break
| Parameter | Meaning | Macro in the default tag |
|---|---|---|
w | Player width in pixels. Without w and h the tag gets the CTV/app or web default. | |
h | Player height in pixels. | |
playersize | Player size as w,h (the IAB [PLAYERSIZE]). w and h win when both are set. | [PLAYERSIZE] |
min_dur | Shortest ad length in seconds. | [BREAKMINADLENGTH] |
max_dur | Longest ad length in seconds. | [BREAKMAXADLENGTH] |
poddur | The ad break's maximum duration in seconds. | [BREAKMAXDURATION] |
maxseq | The most ads the break can hold. | [BREAKMAXADS] |
breakpos | Where the break plays (the IAB [BREAKPOSITION]): 1 or pre (pre-roll), 2 or mid (mid-roll), 3 or post (post-roll). Sent to buyers as video.startdelay; 4 (standalone) and 0 declare none. | [BREAKPOSITION] |
pod | Ad break id, shared by the requests that fill one break. | |
podseq | The break's position in the content (OpenRTB podseq), a positive integer. | |
slotinpod | This slot's position in the break (OpenRTB slotinpod), a positive integer. | |
plcmt | OpenRTB 2.6 video placement subtype: 1 instream, 2 accompanying content, 3 interstitial, 4 standalone. | [PLACEMENTTYPE] |
skip | 1 when the player can offer a skip, 0 when it cannot. | |
protocols | Comma-separated AdCOM protocol ids the player supports. Sets the VAST version of the answer. | [VASTVERSIONS] |
api | Comma-separated AdCOM API framework ids the player supports (7 OMID 1, 8 SIMID 1.0, 9 SIMID 1.1). | [APIFRAMEWORKS] |
ssai | Server-side ad insertion, as OpenRTB imp.ssai: 0 unknown, 1 client-side, 2 stitched server-side with client tracking, 3 all server-side. |
Price and auction
| Parameter | Meaning | Macro in the default tag |
|---|---|---|
floor | Floor as a decimal CPM in the account's settlement currency. 0 or less is no floor. | |
mincpmpersec | Floor per second of ad, for breaks, in the same currency. | |
cur | Accepted for compatibility and not read: floors are in the account's settlement currency. | |
tmax | Auction deadline in milliseconds, clamped to the platform's bounds. | |
tid | The caller's transaction id, sent to buyers as OpenRTB source.tid. | [TRANSACTIONID] |
badv | Comma-separated advertiser domains to block. | |
bcat | Comma-separated IAB content categories to block. | |
k1 | Custom key value 1, which line item targeting can match. | |
k2 | Custom key value 2. | |
k3 | Custom key value 3. | |
k4 | Custom key value 4. |
Content
| Parameter | Meaning | Macro in the default tag |
|---|---|---|
content_id | Content id, kept as sent (including the IAB "registry id" form). | [CONTENTID] |
content_url | Content URL (the IAB [CONTENTURI]), URL-encoded, up to 2048 bytes. | [CONTENTURI] |
content_title | Content title, URL-encoded, up to 256 bytes. | [CONTENT_TITLE] |
content_series | Series name, up to 256 bytes. | [CONTENT_SERIES] |
content_season | Season, up to 256 bytes. | [CONTENT_SEASON] |
content_episode | Episode number, a positive integer. | [CONTENT_EPISODE] |
content_livestream | 1 or true for live content. | [CONTENT_LIVESTREAM] |
content_len | Content length in seconds. | [CONTENT_LENGTH] |
content_prodq | AdCOM production quality: 1 professional, 2 prosumer, 3 user generated. | |
genre | Content genre, up to 256 bytes. | [CONTENT_GENRE] |
rating | Content rating. | [CONTENT_RATING] |
language | Content language. | [CONTENT_LANGUAGE] |
network | Network name. | [NETWORK_NAME] |
channel | Channel name. | [CHANNEL_NAME] |
cat | Comma-separated IAB content categories. | |
kw | Comma-separated keywords. |
Privacy and regulation
| Parameter | Meaning | Macro in the default tag |
|---|---|---|
gdpr | 1 when GDPR applies, 0 when it does not. Absent, the viewer's country decides. Unfilled or unknown reads as GDPR applies. | |
gdpr_consent | IAB TCF consent string. | [GDPRCONSENT] |
us_privacy | IAB US Privacy string. Unfilled or unknown reads as no consent (the US opt-out), even beside a filled gpp: remove this pair when the platform fills gpp but not us_privacy. | ${US_PRIVACY} |
gpp | IAB GPP string. Unfilled or unknown reads as no consent. | [GPPSTRING] |
gpp_sid | GPP section ids: n,m or the bracketed [n,m] form. | [GPPSECTIONID] |
coppa | 1 when the request is subject to COPPA. | [COPPA] |
regs | The VAST 4.1 [REGULATIONS] list (gdpr, coppa). It can add GDPR or COPPA, never remove them. Unknown reads as GDPR applies. | |
schain | The upstream IAB supply chain in its serialized form, URL-encoded. | [SCHAIN] |
dsarequired | EU DSA transparency: whether DSA information is required, as OpenRTB regs.ext.dsa.dsarequired. Its presence declares the DSA request. | |
dsapubrender | EU DSA: whether the publisher renders the transparency information (regs.ext.dsa.pubrender). | |
dsadatatopub | EU DSA: whether to send transparency data to the publisher (regs.ext.dsa.datatopub). | |
dsatransparency | EU DSA transparency chain, in the same serialized form as schain. |
Transport and test
| Parameter | Meaning | Macro in the default tag |
|---|---|---|
cb | Cache buster. Accepted and not read. | [CACHEBUSTING] |
test | 1 marks test traffic: the canned test creative, never billed. | |
demo | 1 answers the platform's demo creative without calling demand. | |
nolog | 1 leaves this request out of the request log (never out of billing events or metrics). |
Partner macro formats
An upstream ad server that calls the tag fills values only into tokens written in its own macro format. A
tag macro profile holds that format as account data: one entry per parameter, pairing the
parameter with the upstream's literal token and how the upstream encodes the value (RAW or
URL_ENCODED). Create one under Ad tags & testing, Tag macro profiles, or through the Admin API
and MCP tools, then pick it on the placement's Tags tab. The tag is then rendered with the upstream's tokens
in place of the IAB macros. The tokens below are illustrative; the upstream's own documentation lists its real ones.
ip,{{IP}},RAW
ua,{{UA}},URL_ENCODED
ifa,{{IFA}},RAW
bundle,{{BUNDLE}},RAW
cb,{{CACHEBUSTER}},RAW - A profile holds 1 to 64 entries, each for a different public parameter from the tables above.
pub,tag,mimes,test,demoandnologare written by Riptide and cannot be mapped, so an upstream can never change the placement or turn live traffic into test traffic.- A token is 1 to 128 printable ASCII characters with no spaces,
&or#, and must be a placeholder in one of six forms:[NAME],[%NAME%],%%NAME%%,{{NAME}},{NAME}or${NAME}. That way a token the upstream leaves unfilled reads as unset, as above. - Mapping a free-text parameter (such as
ua) to aRAWtoken is allowed, with a warning on the tag: an unencoded value can break the query string.
Server-to-server callers
When a stitcher or another ad server calls the tag from its own servers, set the publisher's inbound delivery to server-to-server. Riptide then reads nothing about the viewer from the connection, because the connection is the partner's server:
- Device
ipanduaare required. A request without either is not auctioned; it is answered with an empty VAST document whoseX-Riptide-No-Bid-Reasonheader ismissing_device_ipormissing_device_ua. - Caller IP ranges. The publisher can list the address ranges its partner calls from (up to 32). A call from any other address is refused with HTTP 403
caller_not_allowedbefore any auction. With no list, every caller is accepted and the account's health page warns about it. protocolssets the VAST version. The answer uses the highest VAST version the list declares; without a list, or with no VAST id in it, a filled answer is VAST 4.3. Wrapper ids declare the same version as their inline pair.ssaidescribes the stitch. Send2when ad media is stitched server-side and the client fires tracking, or3when everything is server-side. A declared server-side stitch is scored as such by traffic-quality checks (a data-center caller is expected), and buyers receive it as OpenRTBimp.ssai.
| protocols ids | Answer version |
|---|---|
2, 5 | VAST 2.0 |
3, 6 | VAST 3.0 |
7, 8 | VAST 4.0 |
11, 12 | VAST 4.1 |
13, 14 | VAST 4.2 |
15, 16 | VAST 4.3 |
The no-ad answer
When no ad fills, /vast answers HTTP 204 with no body and no reason header by
default. A player or stitcher that needs a document can get one instead: set the publisher's no-fill answer to
empty VAST (vast_no_fill_response EMPTY_VAST in the Admin API). The answer is then
HTTP 200, application/xml, a <VAST> element with no <Ad>, in
the version the request's protocols select (4.2 when it declares none).
An empty VAST document names its reason in the X-Riptide-No-Bid-Reason header and in an XML comment.
Three answers come back as an empty VAST document whatever the no-fill setting, because the integrator can fix
them: a paused placement or publisher (vast_paused) and a server-to-server request missing its
device context (missing_device_ip, missing_device_ua). Every other reason reads
no_fill.
A malformed tag also answers an empty VAST document, always version 4.2, whose reason is
bad_input:<code> naming the problem with the request. An account that turns on typed HTTP errors
while debugging an integration gets a 400 with the typed error envelope instead.
Demand tags: macros Riptide fills
A demand partner that serves a VAST tag instead of taking OpenRTB requests is connected as a VAST-tag demand route. Its tag URL carries macros, and for each ad opportunity Riptide fills them in, URL-encoded, and calls the URL within the route's deadline:
https://tags.partner.example/vast?pid=[PUBLISHER_ID]&ip=[IP]&ua=[UA]&ifa=[IFA]&w=[WIDTH]&h=[HEIGHT]&schain=[SCHAIN]&cb=[CACHEBUSTER] - A tag URL without
[CACHEBUSTER]gets acb=parameter appended, so every call is unique. - The console refuses a tag URL that carries a macro not listed below. At serve, an unknown
[TOKEN]is sent empty, never as literal text. - Personal and privacy values follow the viewer's privacy choices for this partner: the device id, precise location and full IP address are sent only when allowed, otherwise the macro is empty.
- A value the request does not carry is sent empty.
- Most macros are written
[NAME], and some of those also have a{{NAME}}spelling with the same value. A few route values exist only as{{NAME}}:{{TAG_ID}},{{TARGET_CPM}},{{REV_SHARE}}and{{MARKETPLACE_ID}}.
Price. By default the bid is the CPM in the document's <Pricing model="cpm">
(on the InLine or the Wrapper), else the route's fixed CPM. A route with price source FIXED always
bids its fixed CPM, whatever the document declares, for a contracted rate; the console requires that fixed CPM
and refuses one below the route's floor. A tag bid clears at exactly its price. A document with no usable
price is not a bid only when the route has no fixed CPM to fall back to, and a document that does not arrive
in time is not a bid.
Request and placement
| Macro | Value |
|---|---|
[REQUEST_ID] | Riptide's id for this ad request. |
[TRANSACTIONID] | The transaction id shared by every party bidding on this ad break (the source.tid OpenRTB demand receives). Empty when a tag request arrives without one. |
[CACHEBUSTER] | A cache buster unique to this ad opportunity. A tag URL without it gets a cb= parameter appended. |
[TIMESTAMP] | When the auction started, in Unix milliseconds. |
[PUBLISHER_ID] | The publisher's seller id, as listed in sellers.json and ads.txt; its public id only when it has no seller id. |
[PLACEMENT_ID] | The placement's public id. |
[WIDTH] | Player width in pixels. |
[HEIGHT] | Player height in pixels. |
[MIN_DURATION] | Shortest ad the slot takes, in seconds. |
[MAX_DURATION] | Longest ad the slot takes, in seconds. |
Device and network
| Macro | Value |
|---|---|
[IP] | The viewer's IP address (IPv4, else IPv6), truncated unless the partner may receive precise location. |
[UA] | The viewer's device user agent. |
[IFA] | The device advertising id, when privacy allows it to reach this partner; empty otherwise. |
[IFA_TYPE] | The identifier type of [IFA] (for example rida, aaid, idfa); only together with [IFA]. |
[LMT] | 1 when the device limits ad tracking, declares do-not-track, or its iOS tracking status is restricted or denied; else 0. |
[DNT] | The declared do-not-track flag, 1 or 0; empty when the request declares none. |
[DEVICE_TYPE] | The AdCOM device type number (3 is connected TV, 7 set-top box). |
[DEVICE_MAKE] | Device make. |
[DEVICE_MODEL] | Device model. |
[DEVICE_OS] | Device operating system. |
[DEVICE_OSV] | Device operating system version. |
Geo
| Macro | Value |
|---|---|
[COUNTRY] | The viewer's country, as OpenRTB device.geo.country. |
[REGION] | The viewer's region, as OpenRTB device.geo.region. |
[ZIP] | Postal code; only when the partner may receive precise location. |
[DMA] | Metro (DMA) code; only when the partner may receive precise location. |
[LAT] | Latitude; only when the partner may receive precise location. |
[LON] | Longitude; only when the partner may receive precise location. |
App and site
| Macro | Value |
|---|---|
[APP_BUNDLE] | The app bundle or package name. |
[APP_NAME] | The app name. |
[STORE_URL] | The app's store URL. |
[STORE_ID] | The app's store id. |
[SITE_DOMAIN] | The site or app domain. |
[IPD] | The inventory partner domain (OpenRTB app.inventorypartnerdomain). |
Content
| Macro | Value |
|---|---|
[CONTENT_ID] | The content id the publisher sent. |
[CONTENT_TITLE] | Content title. |
[CONTENT_SERIES] | Series name. |
[CONTENT_SEASON] | Season. |
[CONTENT_EPISODE] | Episode number. |
[CONTENT_GENRE] | Genre. |
[CONTENT_RATING] | Content rating. |
[CONTENT_LANGUAGE] | Content language. |
[CONTENT_LIVESTREAM] | 1 for live content, else 0. |
[CONTENT_LENGTH] | Content length in seconds. |
[CHANNEL_NAME] | Channel name. |
[NETWORK_NAME] | Network name. |
Ad break
| Macro | Value |
|---|---|
[POD_MAX_DURATION] | The ad break's duration budget in seconds. |
Privacy
| Macro | Value |
|---|---|
[GDPR] | 1 when GDPR applies, 0 when it does not; empty when the request declares no privacy context. |
[GDPR_CONSENT] | The IAB TCF consent string. |
[US_PRIVACY] | The IAB US Privacy string. |
[GPP] | The IAB GPP string. |
[GPP_SID] | The GPP section ids that apply, comma-separated. |
[COPPA] | 1 when the request is subject to COPPA, else 0. |
[GPC] | 1 when the viewer sent a Global Privacy Control signal, else 0. |
Price and deals
| Macro | Value |
|---|---|
[FLOOR] | The floor this tag is offered at, a decimal CPM in [CURRENCY]. |
[CURRENCY] | The settlement currency (USD unless the account settles in another). |
[DEAL_IDS] | The route's deal ids, comma-separated. |
Supply chain
| Macro | Value |
|---|---|
[SCHAIN] | The IAB serialized supply chain (the OpenRTB SupplyChain object in its URL form): the same chain an OpenRTB request carries. |
[SCHAIN_ASI] | The account's own supply chain node domain (asi). Blank when the request carries no node of the account's own (no seller id, or a domain another account claims). |
{{...}} spellings
| Macro | Value |
|---|---|
{{PUBLISHER_ID}} | Same as [PUBLISHER_ID]. |
{{PLACEMENT_ID}} | Same as [PLACEMENT_ID]. |
{{TAG_ID}} | Same as [PLACEMENT_ID]. |
{{APP_BUNDLE}} | Same as [APP_BUNDLE]. |
{{SITE_DOMAIN}} | Same as [SITE_DOMAIN]. |
{{SCHAIN_ASI}} | Same as [SCHAIN_ASI]. |
{{DEAL_IDS}} | Same as [DEAL_IDS]. |
{{FLOOR}} | Same as [FLOOR]. |
{{GPC}} | Same as [GPC]. |
{{TARGET_CPM}} | The route's target CPM. |
{{REV_SHARE}} | The route's marketplace revenue share. |
{{MARKETPLACE_ID}} | The route's marketplace id; only when the route belongs to a marketplace. |
Connect through OpenRTB
Partners that exchange OpenRTB requests use the OpenRTB guide for request fields, bid responses and no-bid codes. The VAST tag guide covers the request and response of a single tag.