VAST Support For Attribution Reporting - 2023 07 12
VAST Support For Attribution Reporting - 2023 07 12
VAST Support For Attribution Reporting - 2023 07 12
This solution was submitted by Jon Guarino, Software Engineer, Google, and approved by the
Advanced TV Working Group.
Background
As part of its Privacy Sandbox initiative, Chrome has developed the Attribution Reporting API,
which provides a privacy-preserving mechanism to link conversion events back to the
impressions or clicks that may have led to them, without the use of direct cross-site tracking via
third-party cookies. To leverage Chrome’s API, events must be registered in the browser as
potential "attribution source" events. Other mechanisms may exist in other apps or devices to
register such events and enable attribution reporting, without cookies, for a safer and more
private online ad experience.
For video ads in particular, cooperation between video ad players and SDKs are needed to
trigger these events, as well as with the parties receiving the events for conversion tracking. IAB
Tech Lab’s Video Ad Serving Template (VAST) is releasing this addendum to facilitate
registration of attribution events.
These two attributes can be used for all trackable events, as applicable in all VAST versions, for
the following elements:
• <Impression>
• <ClickThrough>
• <ClickTracking>
• <NonLinearClickThrough>
• <NonLinearClickTracking>
• <CompanionClickThrough>
• <CompanionClickTracking>
• <Tracking>
• SINGLE-PING: the provided event URL is registered as the attribution source event.
• DOUBLE-PING: a second URL provided along with the standard event tracking URL is
registered. If double-ping registration type is used, a second URL must be provided as
the value for attributionsrc, which is registered as the attribution source.
the video ad SDK may record this event at impression time by adding the attributionsrc
attribute to the <img> element used to send the ping as follows:
const attributionReportingOptions = {
eventSourceEligible: true,
triggerEligible: false,
};
const options = {
keepalive: true,
method: 'get',
redirect: 'follow',
attributionReporting: attributionReportingOptions
};
window.fetch('https://adserver.com/impression?id=123', options);
<Impression attributiontype="DOUBLE_PING"
attributionsrc="https://adserver.com/registerAttrSrc?id=123&t=1">
<![CDATA[https://adserver.com/impression?id=123]]>
</Impression>
the video ad SDK may record this at impression time by using attributionsrc on the <img>
element to report and register the URL from the attributionsrc attribute of the <Impression>
element:
<img src="https://adserver.com/impression?id=123"
attributionsrc="https://adserver.com/registerAttrSrc?id=123">
Important! When using DOUBLE_PING attribution registration, you must ensure all URLs are
properly escaped for use as XML attributes. Specifically, any ampersand characters must be
encoded ('&' instead of '&').
Alternatively, two separate calls to the fetch method may be used, one for the standard
impression event and another specifically for the URL intended for attribution registration, as
demonstrated below:
const attributionReportingOptions = {
eventSourceEligible: true,
triggerEligible: false,
};
const options = {
keepalive: true,
method: 'get',
redirect: 'follow',
attributionReporting: attributionReportingOptions
};
window.fetch('https://adserver.com/impression?id=123', options);
window.fetch('https://adserver.com/registerAttrSrc?id=123', options);
when responding to a user click event, the video ad SDK can make the clickthrough eligible for
attribution registration by adding the attributionsrc attribute to the anchor tag:
<a href="https://adserver.com/click?id=123&r=http%3A%2F%2Flanding.page"
attributionsrc>
...
</a>
window.open('https://adserver.com/click?id=123&r=http%3A%2F%2Flanding.page',
'_blank', 'attributionsrc');
when responding to a user click event, the video ad SDK can include the URL from the
attributionsrc attribute on the <ClickThrough> element as the attributionsrc attribute of
the anchor tag in order to have the browser send it an registration-eligible ping during
navigation:
<a href="https://adserver.com/click?id=123&r=http%3A%2F%2Flanding.page"
attributionsrc="https://adserver.com/registerClkAttrSrc?id=123">
...
</a>
or alternatively, by setting that URL as the value of the third argument to the open method as
such:
const encodedAttrSrc =
encodeURIComponent('https://adserver.com/registerClkAttrSrc?id=123');
window.open('https://adserver.com/click?id=123&r=http%3A%2F%2Flanding.page',
'_blank', `attributionsrc=${encodedAttrSrc}`);
Note: The URL from attributionsrc must be URI encoded as in the example above to be
properly loaded.
Tracking Events
Other tracking event types can be handled the same way impression trackers are handled
above.
Some VAST documents may allow click trackers to be properly registered as "navigation"
events. For example, both <ClickThrough> and <ClickTracker> demonstrated as follows:
<VideoClicks>
<ClickThrough>
<![CDATA[https://adserver.com/click?id=123&r=http%3A%2F%2Flanding.page]]>
</ClickThrough>
<ClickTracker attributiontype="SINGLE_PING">
<![CDATA[https://ads3p.com/clkTrack?id=987]]>
</ClickTracker>
</VideoClicks>
can potentially be reported with a single anchor tag in a way that makes the click tracker eligible
for "navigation" event registration:
<a href="https://adserver.com/click?id=123&r=http%3A%2F%2Flanding.page"
attributionsrc="https://ads3p.com/clkTrack?id=987">
...
</a>
Future Attribution Reporting API updates may allow for multiple URLs to be registered via
attributionsrc at once, making this technique more usable for scenarios with multiple click
trackers requesting registration.