> For the complete documentation index, see [llms.txt](https://docs.digitalturbine.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digitalturbine.com/dt-ads-demand/ad-formats/vast-and-end-cards.md).

# VAST and End Cards

VAST is an IAB standard that structures ad tags for video player delivery and uses an XML schema to transfer necessary metadata from the ad server to the video player. Additionally, VAST standardizes in-stream video ad serving and linear videos, such as in-app, full-screen interstitial videos as specified by the IAB. The following steps describe the VAST process.

1. The video player pre-fetches the ad request.
2. The ad server returns an XML ad response, which contains:
   * VAST version
   * Impression tracking pixel
   * Video duration
   * Click tracking pixel
   * Click-through URL
   * Quartile-event tracking pixels fire at video start, 1st quartile, 2nd quartile, 3rd quartile, and video completion
   * URL to video media files
   * `CompanionAd` height, width, and assets

{% hint style="info" %}
The VAST response does not include any information on the placement or timing of video elements. To see the video player elements, see [DT SDK Video Player](#dt-sdk-video-player).
{% endhint %}

3. A VAST ad markup is either INLINE, which contains all the elements necessary to display the video, or VAST Wrapper, which points to a downstream VAST document requested by another ad server.
4. A single click-through on the ad is expected, but multiple named click-tracking URIs (`CustomClick`) allow per-publisher customization. In addition, separate URIs can be provided for tracking the (`CustomClickTracking`) and for the destination page to open upon a click-through (`ClickThrough`).
5. The video player reports the quartile tracking URLs.
6. The ad server(s) record the impressions.

## VAST Versions Supported by DT

* DT accepts VAST 2.0 and higher.
* DT supports some VAST 3.0 and VAST 4.x tracking event elements, including:
  * `Fullscreen`: The user activated a control to extend the video player to the edges of the viewer’s screen.
  * `Expand`: The user activated a control to expand the creative.
  * `Exitfullscreen`: The user activated the control to reduce the video player size to its original dimensions.
  * `Collapse`: The user activated a control to reduce the creative to its original dimensions..
  * `Closelinear`: The user clicked the close button on the creative.
  * `Progress`: (iOS only) The creative played for a duration at normal speed that is equal to or greater than the value provided in an additional attribute for offset, starting from SDK 8.2.3.
  * `CompanionClickTracking`: Available for both VAST wrappers and inline formats. For more information, see [Companion Click Events](#companion-click-events-and-companionclicktracking).
  * The DT SDK manages firing the VAST tracking pixels and rendering video playback.

{% hint style="info" %}

* VAST 2.0 is not entirely backward compatible with VAST 1.0
* Events are only relevant for the use case where the video starts in a non-full-screen mode.
  {% endhint %}

#### VAST Wrapper Handling Capabilities

When VAST 2.0 is supported and a bid request contains `video.protocol:5` , DT provides the following VAST handling capabilities:

| Number of VAST Wrappers Supported | Video MIME Types                      | VAST Filter Types                     |
| --------------------------------- | ------------------------------------- | ------------------------------------- |
| 5 or less                         | <p>Android:</p><p>mp4, webM, 3gpp</p> | <p>Android:</p><p>mp4, webM, 3gpp</p> |

When VAST 3.0 is supported and a bid request contains `video.protocol:6` , DT provides the following VAST handling capabilities:

<table><thead><tr><th valign="top">Number of Wrappers</th><th valign="top">Video MIME Types</th><th valign="top">VAST Filter Types</th></tr></thead><tbody><tr><td valign="top"><p>5 or less.</p><p>DT discards ads with more than 5 wrappers.</p></td><td valign="top"><p>iOS:</p><p>mp4, m4v, Quicktime, 3gp2, 3gpp2, 3gp4, 3gpp4, application/javascript</p></td><td valign="top"><p>iOS:</p><p>QuickTime, mp4, m4v, 3gpp, 3gpp2, x-m4v, 3gp2, 3gp4, 3gpp4</p></td></tr></tbody></table>

When VAST 3.0 wrapper is supported and a bid request contains `video.protocol:8` , DT provides the following VAST handling capabilities:

| Number of Wrappers                               | Video MIME Types                  | VAST Filter Types |
| ------------------------------------------------ | --------------------------------- | ----------------- |
| DT recommends using as few wrappers as possible. | Flash and .mov are not supported. |                   |

## Video Media File Size Limits

<table><thead><tr><th valign="top">Specification</th><th valign="top">Requirements</th></tr></thead><tbody><tr><td valign="top">Optimal Performance</td><td valign="top">DT recommends running video file sizes under 3MB.</td></tr><tr><td valign="top">File Type</td><td valign="top">The file types considered for prioritization include MP4, 3GPP, and WebM.<br>The order of file type preference is applied to Android and, similarly, to iOS based on their supported MIME types. DT respects the MIME types passed under the video object.</td></tr><tr><td valign="top">Bitrate</td><td valign="top">Maximum bitrate of 5000kbps.<br>Preferred max bit rate is up to 2000kbps.<br>Videos above 5000kbps are discarded.</td></tr><tr><td valign="top">Video Duration</td><td valign="top">Recommended duration of 30s.</td></tr><tr><td valign="top">Timeout</td><td valign="top">If DT cannot retrieve the video file within approximately 10 seconds, the video times out.</td></tr><tr><td valign="top">Aspect Ratios</td><td valign="top">The DT SDK runs videos with any aspect ratio; no constraints affect the aspect ratio.<br>But recommends the following video aspect ratios:<br>- 16:9 (for interstitial phone and tablet)<br>- 4:3 (for iPad), 3:2, or 16:10 (Video Asset Algorithm).</td></tr></tbody></table>

## Tracking Click Events on VAST

DT enriches the `TrackingEvents` object with the DT click tracking URL and fires the click when the user taps the call-to-action (CTA) button or a video without a CTA button. The video pauses if the user leaves the app and returns to it.

### DT SDK Video Player

The following sections provide an overview of the features related to the DT video player.

#### Sound

The sound icon is always available for users to toggle and appears on the upper left of the user's screen. DT supports the device sound settings. If the device is on mute, the ad plays with sound off; otherwise, it plays with the sound on. Publishers can override sound settings per user session.

#### Skip

For non-rewarded videos that are 15 seconds or less in duration are not skippable. No Skip button appears, and DT attempts to show the end card immediately after video completion.

For non-rewarded videos that are longer than 15 seconds in duration, a Skip button appears in the upper right corner after 5 seconds. DT attempts to show the end card immediately after video completion.

#### Countdown Timer

A countdown timer displays at the bottom left corner based on the video duration specified in the VAST XML.

#### Call To Action

The default text on the Call to Action button is **Install Now**. When the system detects the app store as a landing page, the text on the Call to Action button is **Download**.

#### Video Close Behavior

Tapping the Close (X) button on the video end card returns the user to the app and resumes gameplay. Clicking the CTA button during video playback takes the user to the DSP landing page (app store, in-app browser, deep link). After closing the landing page, the video resumes on the Skip and Close logic.

#### End Card Behavior

Appears after video completion or when the user skips the video. The Close button (X) on the end card appears after 7 seconds. If no DSP-provided end card is available or if it fails to load, DT displays a [default end card](#digital-turbine-default-end-cards).

## End Cards (Companion Ads)

An end card appears alongside or after the video content, when the user completes or closes the video. End cards may be interactive and often feature a call-to-action for the user. DT recommends using end cards with all video types to improve performance. For Playable End Cards, we recommend a maximum file size of 2MB.

The following specifications describe DT criteria for identifying End Card support in bid requests and implementing End Cards with video ads.

### End Card Types

The end card types that the SDK can render are passed in `video.companiontype` field of the bid request:

* `1` — static (`image/gif`, `image/jpeg`, `image/png` MIME types)
* `2` — HTML
* `3` — iframe

### MRAID End Card Support

The bid request reflects whether the SDK can render an MRAID end card by the value of `video.ext.mraidendcard` field:

* `0` = MRAID end card is not supported
* `1` = MRAID end card is supported

### End Card Ad Sizes

* The minimum ad size is 300x250.
* There is no maximum size for static end cards; static assets larger than the screen are automatically scaled down and centered.
* HTML and iFrame end cards should not exceed the height and width passed in the bid request.

### End Card Selection Algorithm

Assets are sorted and selected as follows:

1. First, the resource type is considered — HTML > iframe > static.
2. Then, for static images, the ad size is considered — the closest match to the device height and width.

### Other End Card Criteria

* If a media file fails to load, DT proceeds to the next one in the sequence. If no ad loads, DT tracks the error internally.
* If no valid end card appears, DT blurs the last video frame and overlays a default end card with a CTA button.
* After receiving the ad markup in the bid response, DT fetches the end card immediately after the video finishes playing.
* End cards do not apply to Native ads.

### Digital Turbine Default End Cards

DT pauses on the last frame of the video and adds a green call-to-action button with "Install Now" text.

### Companion Click Events Tracking

* The DT Exchange SDK handles the `CompanionClickThrough` when a user clicks the end card.
* DT supports `CompanionClickTracking`, a VAST 3.0 component, for VAST wrappers and VAST inline ads.

## Video Click Tracking Enhancements

Understanding user engagement in real time is critical for creative optimization. DT supports the following substitution macros to add to your click tracking URLs for `ClickTracking` and `CompanionClickTracking`.

* `[ADPLAYHEAD]`: Macro passes a value in `HH:MM:SS.mmm` format, indicating the time the video ad played before the user clicked on the VAST CTA or Skip button.
* `[CLICKAREA]`: Macro passes a string value describing where the user clicks on the VAST ad:
  * `CTA`: The user clicks on the CTA button on the video player.
  * `COMPANION`: The user clicks on the end card.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digitalturbine.com/dt-ads-demand/ad-formats/vast-and-end-cards.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
