Implement "Why this ad?" (WTA) functionality

All personalized ads hosted by Google must implement "Why This Ad?" (WTA), a transparency feature that explains to users why they are being shown a particular ad and provides information about how their privacy is protected.

This guide explains how to implement WTA through manually generated VAST tags where a Google Monetization SDK, such as the IMA SDK, is not present on the page.

WTA implementation for publishers using direct VAST calls

1. Parse icons from VAST

Some VAST responses returned from Ad Manager may include "Why This Ad?" privacy disclosures that are required to be surfaced to the end user. These disclosures are returned inside the "AdChoices" element of the VAST response. Parse the attributes in the relevant <Icon> tag in order to render the AdChoices icon. Configure the icon's size with the width and height attributes, and its placement using xPosition and yPosition. Set the timing of the icon using duration and offset values. Finally, set the icon metadata using apiFramework and altText.

2. Display the WTA icon video overlay

After parsing the icon, parse the creative used to render the AdChoices icon. Parse the image URL in the CDATA of the <Static Resource> tag. Specify the type of the image in the URL with the creativeType attribute. Most images use the image/png type.

If correctly configured, the AdChoices icon appears overlaid on your video ad.

3. Configure click-through actions

There are two possible click-through actions for the AdChoices icon. The first is a URL that links to a web page detailing what personal information was used to serve the user an ad. The second is a fallback image, which displays the same information as the web page. Which type of action you implement depends on whether or not the platform supports a browser.

Click-through URL

When using a URL, clicking the AdChoices icon must open a new webview or browser tab and load the URL specified by the CDATA of the <IconClickThrough> tag. Clicking the icon must also pause video playback until the user returns to the original webview or tab.

Fallback image

When using a fallback image, clicking the AdChoices icon must open the fallback image in a full-screen overlay of the video player. The overlay must give the user the ability to exit the overlay. You need to parse the image URL located in the CDATA of the <Static Resource> tag. Specify the type of the image in the URL with the creativeType attribute. Most images use the image/png type.

Clicking the icon must also pause video playback until the user closes the overlay.

WTA implementation for manually created VAST XML

Ad Manager automatically adds WTA support to your VAST XML. However, you can use the following steps to achieve a similar effect with manually created VAST XML.

The guide uses an example VAST file to demonstrate how to implement WTA. You can use the steps in this guide to adding WTA to any VAST creative.

1. Configure the icon

Create the AdChoices icon using a tag with the following configurable attributes:

  • program: Set the icon's program to AdChoices.
  • width and height: Set the icon's size in pixels.
  • xPosition and yPosition: Set the icon's placement as x and y coordinates, in pixels.
  • duration: Set the length of time the icon appears, in seconds.
  • offset: Set when in the video the icon appears, in seconds.
  • apiFramework: Set the icon's API framework to VAST.
  • altText: Set the icon's alt text. This field is required.

2. Configure the icon creative

The <StaticResource> tag holds the image file for the AdChoices icon. The creativeType attribute sets the type of file used for the AdChoices icon (PNG is preferred). The CDATA in the tag must be a URL that points to the AdChoices image.

3. Configure the click-through actions

The <IconClick> tag holds all of the actions that occur when a user clicks the AdChoices icon. In most cases, the user sees the Ad Settings page. The CDATA in the <IconClickThrough> tag must point to this page.

Fallback image

In cases where the WTA icon can not display the Ad Settings page, such as when the platform does not support a browser, WTA can show users a fallback image that contains the same information as the page.

Configure the fallback image using the <IconClickFallbackImage> tag, which specifies the width and height attributes, in pixels. The alt text for the fallback image uses the CDATA of the <AltText> tag.

The <StaticResource> tag holds the image file for the fall back image. The creativeType attribute sets the type of file used for the fallback image (PNG is preferred). The CDATA in the tag must be a URL that points to the fallback image.

Example VAST

<!--  WHY THIS AD SECTION - START  -->

<Icons>

  <Icon program="AdChoices" width="40" height="40" xPosition="right" yPosition="bottom" duration="00:00:10" offset="00:00:00" apiFramework="VAST" altText="Why this ad?">

    <StaticResource creativeType="image/png">

      <![CDATA[ https://storage.googleapis.com/interactive-media-ads/hosted-samples/wta/icon_adchoices.png ]]>

    </StaticResource>

    <IconClicks>

      <IconClickThrough>

        <![CDATA[ https://g.co/adsettings ]]>

      </IconClickThrough>

      <IconClickFallbackImages>

        <IconClickFallbackImage width="950" height="600">

          <AltText>

            <![CDATA[ This ad was shown to you based on: * Google's estimation of your interests, based on your activity on Google on this device (for example, your searches) * the information on the website you were viewing. ]]>

          </AltText>

          <StaticResource creativeType="image/png">

            <![CDATA[ https://storage.googleapis.com/interactive-media-ads/hosted-samples/wta/icon_adchoices_fallback_image.png ]]>

          </StaticResource>

        </IconClickFallbackImage>

      </IconClickFallbackImages>

    </IconClicks>

  </Icon>

</Icons>

<!--  WHY THIS AD SECTION - END  -->

Was this helpful?

How can we improve it?
true
Release notes

Read about the latest Ad Manager features and Help Center updates.

See what's new

Search
Clear search
Close search
Main menu
8863753874492333726
true
Search Help Center
true
true
true
true
true
148
false
false
false
false