VASTlint

VAST macros / Ad and pod

[UNIVERSALADID] VAST macro

Short answer: The creative id from the InLine UniversalAdId element. Introduced in VAST 4.1.

What it means

Resolves to the creative identifier declared in UniversalAdId, percent-encoded when it contains a space or other reserved characters. The registry and the id are properties of the creative, not of the impression.

Example value

After the player substitutes the macro, [UNIVERSALADID] becomes something like:

ad-id.org%204AB12345

Before and after the player substitutes it

The first line is the URL in the tag. The second line is the request the player sends once it has a value.

https://t.example.com/i?uaid=[UNIVERSALADID]
https://t.example.com/i?uaid=ad-id.org%204AB12345

The creative id, after the player has the InLine

[UNIVERSALADID] resolves to the creative identifier from the InLine UniversalAdId element. VAST 4.0 added the element. VAST 4.1 added the macro, and it also removed the idValue attribute. On a 4.1 document the registry stays on idRegistry and the id itself is the text of the element. A macro that comes back empty on an otherwise valid 4.1 tag is often an id still sitting on idValue, which a 4.1 player is no longer required to read.

The substituted value identifies the creative across systems, which is what you want for creative-level frequency capping. It is not the impression id. [ADSERVINGID] is a different element, one per serving, and it is the value two companies should share when they compare logs of the same transaction. Mixing them makes a creative cap look like a discrepancy, or a discrepancy look like a creative cap.

Encoding, registries, and a missing element

If the id contains a space, a slash, or another reserved character, the player percent-encodes it inside the URL. ad-id.org 4AB12345 leaves as ad-id.org%204AB12345. A raw space in the log means the encoding step was skipped and the query string is unreliable from that character on.

The registry name is an attribute on the element. The macro is the id. Two creatives can carry the same-looking id under different registries if someone reused a code. The element is what says which registry. The pixel, after substitution, may only have the id, so keep the registry in the tag even when the pixel does not repeat it.

No UniversalAdId element means there is nothing to substitute. The request still contains [UNIVERSALADID], or the parameter is empty. Neither of those is a registry id, and a frequency cap keyed on the empty string will either cap nothing or cap everything, depending on how the vendor treats empty.

4.0 attribute versus 4.1 text

Left is the 4.0 shape. Right is the 4.1 shape the macro is defined against. A tag that bumps the version attribute and leaves idValue in place looks populated in a diff and substitutes nothing.

The 4.1 macro reads the element text. An id that exists only as idValue is invisible to it.

<!-- VAST 4.0 -->
<UniversalAdId idRegistry="Ad-ID" idValue="4AB12345">4AB12345</UniversalAdId>
<!-- VAST 4.1: idValue is gone, the id is the text -->
<UniversalAdId idRegistry="Ad-ID">4AB12345</UniversalAdId>

VAST XML fragment only. This excerpt belongs inside a complete VAST document, so standalone validation will fail until it is wrapped in a full <VAST>response.

Where it is valid

Impression and tracking URLs, after the player has read the InLine UniversalAdId. The element is VAST 4.0. The macro is VAST 4.1.

Macros are case-sensitive and substituted only inside URL fields. A macro written in the wrong case, or placed where it has no defined value, is sent to the server as literal text instead of a value.

Using it in a tag

<UniversalAdId idRegistry="Ad-ID">4AB12345</UniversalAdId>
<Impression><![CDATA[https://t.example.com/i?uaid=[UNIVERSALADID]]]></Impression>

VAST XML fragment only. This excerpt belongs inside a complete VAST document, so standalone validation will fail until it is wrapped in a full <VAST>response.

Related vastlint rules

Related macros

Validate your macros

vastlint flags unknown, mis-cased, deprecated, out-of-context, and unencoded macros in any tracking, click, error, impression, or media URL:

# CLI: exits non-zero on errors, ideal for pipelines
vastlint check creative.xml

Use the right tool for this failure

If you already have the resolved XML, run a pure spec check. If you only have a live tag URL, test that endpoint first. If the failure happens in the wrapper chain, inspect each hop.

Further reading