Notification

Please make sure to visit Your AdSense Page where you can find personalized information about your account to help you succeed with AdSense.

AdSense for video (AFV)

AdSense for video tag parameters for IMA

The AdSense for video and AdSense for games products use a very different tagging structure from AdSense for content. They require an Interactive Media Ads (IMA) tag, and only return ads when called with a video player or game launcher capable of Google IMA SDK integration, and/or VAST and VPAID compliance (for example, the IMA Adapter).

You can typically create these tags through the AdSense for video tag generator. Below, you'll find a comprehensive list of the different criteria you can set up for these ad tags. There are only a few required parameters for an AdSense for video tag to serve ads, but you can achieve the desired ad responses by adding optional parameters such as channel IDs, min/max ad duration, language, etc.

IMA ad tag parameter Required parameter
ad_type Yes
client Yes
description_url Yes - must be URL encoded
channel No - Recommended if available
adsafe No - Recommended
videoad_start_delay No - Recommended
hl No - Recommended
max_ad_duration No - Recommended
min_ad_duration No - Recommended
sdmax No - Recommended
adtest No
cust_age No
cust_gender No
host No
h_ch No
overlay No

Base URL

The following URL provides the base for all query parameters described below:
https://googleads.g.doubleclick.net/pagead/ads?

Required parameters

ad_type
(String) Specifies the type of ad desired. These should be concatenated using an underscore (‘_’).

Values

  • video: All video ads: equivalent to standardvideo_skippablevideo_bumpervideo.
  • skippablevideo: Only skippable video ads. This may require additional publisher permissions to receive skippable ads. 
  • bumpervideo: Allows six-second non-skippable video ads.
  • standardvideo: Only non-skippable video ads. 
  • image: Allows image ads that fit within the specified non-linear slot size. 
  • text: Allows text ads.

Examples

  • &ad_type=video_text_image
    • Allows all formats.
  • &ad_type=video_text
    • Allows any video format and text ads.
  • &ad_type=standardvideo_image
    • Allows only standard, non-skippable video and image ads.

client

(String) The Web Property ID of the publisher.

Example: &client=ca-video-afvtest


description_url

(String) A full, URL-encoded URL of an HTML page that describes the video. The description_url value can be created dynamically using your server-side programming language, or manually by using an online URL-encoding tool.

Example: &description_url=http%3A%2F%2Fmyurl.com%2Fpage%3Fkey%3Dvalue%26key2%3Dvalue2


URL Example

The following is a URL example containing the minimum required parameters. https://googleads.g.doubleclick.net/pagead/ads?client=ca-video- afvtest&ad_type=video&description_url=http%3A%2F%2Fmyurl.com%2Fpage%3Fkey%3Dvalu e%26key2%3Dvalue2

Requests video ads for the publisher, ca-video-afvtest, with a description URL of http:// myurl.com/page?key=value&key2=value2

Optional parameters

channel

(String) A plus delimited list of channels used for AdSense targeting and reporting. Up to five channels may be passed in per ad request.

Example: &channel=mychannel+otherchannel+targetingchannel


adsafe

(String) Determines the setting used to filter ads that display. Default is “high.”

Values

  • high --(Default) Returns family-safe ads. Does not return non-family-safe or adult sexual content.
  • medium --Returns family-safe and non-family-safe ads (such as ads for gambling or prescription drugs). Does not return adult sexual content ads. 

Example: &adsafe=high


adtest

(String) Specifies whether this is a test implementation. Possible values are "on" or "off". If set to "on", impressions and clicks will not be recorded in AFV account. This parameter MUST be used during testing. Defaults to "off" if not set.

Values

  • off --(Default) All ads bill normally. This is the setting that should be used for production. 
  • on --This setting ensures that no ads log impressions or clicks for use during testing.

Example: &adtest=on


videoad_start_delay

(Integer) The number of milliseconds into the video at which the ad will play. Defaults to a midroll value, “1,” specifically.

Values:

  • -1 --Specifies a post-roll ad that will be displayed at the end of the content
  • 0 --Specifies a pre-roll ad that will be displayed before content playback begins
  • Any positive integer --Specifies a mid-roll that will play after this number of milliseconds of content playback. 

Example:

  • &videoad_start_delay=-1 --Post-roll.
  • &videoad_start_delay=15000 --The ad will play at 15 seconds into the content.

cust_age

(Integer) Specifies the age of the user. Exact age is supported, as well as an age group defined in com.google.ads.ima.api.Demographics.

Example:

  • &cust_age=1001 --Age 18 to 24
  • &cust_age=38 --Exactly 38

cust_gender

(Integer) Specifies the gender of the user as defined in com.google.ads.ima.api.Demographics.

Values:

  • 1 --Male
  • 2 -- Female

Example:

  • &cust_gender=1 --Male 
  • &cust_gender=2 --Female

host

(String) Host ID to use for 3-way revenue sharing.

Example: &host=ca-host-test --Splits revenue with this host.


h_ch

(String) A plus delimited list of strings representing AdSense targeting/reporting channel IDs for the host.

Example: &h_ch=channel1+channel2+channel3 --Reports and targets these additional channels for the host.


ht_id

(Number) Tier ID used to specify the level of revenue sharing between publisher and host.

Example: &ht_id=2 --Tier 2 host.


hl

(String) A language code used to request ads in that language. This may be any ISO 639-1 (two-letter) or ISO 639-2 (three-letter) code. List of valid codes.

Example:

  • &hl=en --English.
  • &hl=es --Spanish

max_ad_duration

(Integer) Specifies the maximum video length that must be returned in milliseconds. Defaults to 100 seconds if not set.

Example: &max_ad_duration=30000 --The maximum duration of any non-skippable ad will be 30 seconds.


min_ad_duration

(Integer) Specifies the minimum video length that must be returned in milliseconds. Defaults to 0 seconds if not set.

Example:

  • &min_ad_duration=15000 --The duration of a returned non-skippable ad must be 15 seconds or longer.
  • &min_ad_duration=0 --The duration will only be restricted by the max_ad_duration value. 

sdmax

(Integer) Specifies the maximum video length for skippable ads in milliseconds. Defaults to unlimited if not set.

Example: &sdmax=120000 --The duration of the returned skippable ad cannot exceed 2 minutes.


overlay

(Integer) Used to limit the requested overlay size to non-linear bottom-third overlays only. By defaults, no limit will be set.

Example:

  • &overlay=1 --Only bottom-third overlay sizes are eligible in the ad request. Full-slot overlays will not be requested.
  • &overlay=0 --Default value, which doesn’t set any limit for overlay sizes. Overlay sizes will serve based on AdsRequest.nonLinearAdSlotWidth and adsRequest.nonLinearAdSlotHeight.

 

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu
10646788127404829369
true
Search Help Center
true
true
true
true
true
157
false
false