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:

Required parameters

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


  • 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.


  • &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.


(String) The Web Property ID of the publisher.

Example: &client=ca-video-afvtest


(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: &

URL Example

The following is a URL example containing the minimum required parameters. afvtest&ad_type=video& e%26key2%3Dvalue2

Requests video ads for the publisher, ca-video-afvtest, with a description URL of http://

Optional parameters


(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


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


  • 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


(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.


  • 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


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


  • -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. 


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


(Integer) Specifies the age of the user. Exact age is supported, as well as an age group defined in


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


(Integer) Specifies the gender of the user as defined in


  • 1 --Male
  • 2 -- Female


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


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

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


(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.


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

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


(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.


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


(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.


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


  • &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. 


(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.


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


  • &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?
Clear search
Close search
Google apps
Main menu