Create a master video tag manually

A master video tag is a URL used by the video player to retrieve the video ad. Here's a sample master video tag:

http://pubads.g.doubleclick.net/gampad/ads?
env=vp&
gdfp_req=1&
impl=s&
output=xml_vast2&
iu=/6062/video-demo&
sz=400x300&
unviewed_position_start=1&
url=http://www.simplevideoad.com&
ciu_szs=728x90,300x250&
correlator=7105

To assemble a master video tag using the correct URL parameters, refer to the tables below.

Once you've assembled a master video tag, test it with the VAST Suite Inspector.

Required parameters

The following parameters are required for all master video tags. Each of these parameters has a constant value. For example, the env parameter always equals vp to indicate that the request is from a video player.

Parameter Description Value
env Indicates that the request is from a video player. vp
gdfp_req Indicates that the user is on the DFP schema and is not a legacy Google Ad Manager (GAM) publisher. 1
impl Request mode, whether syncSRA (ss), sync (s) or iframe (ifr). Always s for v1.
output Output format of ad. xml_vast2
unviewed_position_start Setting this to 1 turns on delayed impressions for video. 1

Required parameters with variable values

The following parameters are required for all master video tags. These parameters have variable values, so please refer to the description and sample values for guidance.

Parameter Description Sample value
iu Current ad unit. Follow this format: /network id/directory tree.../ad unit /6062/videodemo
sz Size of master video ad slot. Multiple sizes aren't supported. Important: Don't include "v" after the size. 400 x 300
url The address from which the ad request is being sent. By default, this is the same URL as that of the page that will display the ads, but you can change it. If you're not using the Google IMA SDK, see note below.* http://www.simplevideoad.com
correlator A random number, typically the time stamp of the page view, that's shared by multiple requests coming from the same page view. If you're not using the Google IMA SDK, see note below.* Correlator is used to implement competitive exclusions, including in cookieless environments. 4345645667
description_url The URL of the page that contains the player that is making the request. Required if you use Ad Exchange or AdSense for dynamic allocation. description_url should be a video-specific URL (not the domain for all ad requests). http://www.simplevideoad.com
/golf.html
hl The language code used to request ads in that language. Used for language of ad selection and video ad rendering in dynamic allocation to video in the AdExchange or AdSense Video. The language can be any ISO 639-1 (two-letter) or ISO 639-2 (three-letter) code. Defaults to English (en). Please refer here for a list of valid codes: http://www.loc.gov/standards/iso639-2/php/English_list.php. it

*If you aren't using the Google IMA SDK: When you generate tags in the DFP UI, be aware that the tag generator inserts the url and correlator parameters as macros, for which you'll need to insert the appropriate information. (If you're using the Google IMA SDK, the SDK automatically inserts the information for these macros.)

  • url=[referrer_url] - the URL of the page where the ad will appear.
  • correlator=[time stamp] - typically the time stamp of the page view.

Optional parameters

The following parameters are optional. These parameters have variable values, so please refer to the description and sample values for guidance.

Parameter Description Sample value
ciu_szs Comma-separated list of companion sizes 728 x 90, 300 x 250
cust_params Customised targeting parameters Learn how to add key-value pairs to an ad tag.
scp slot-specific customised parameters &scp=excl_cat%3Dairline_
exclusion_label%7C

Customised SDK parameters

The following parameters are the defaults set by the Google IMA SDK (Interactive Media Ads Software Development Kit). Only include the parameters below in your master video tag if you're not using the IMA SDK.

The current DFP architecture requires that video ad requests include information about ads previously shown in the stream and on the page. This information helps build a picture of past activity while accounting for ad exclusions and duplicates.

SDK parameters related to ad rules and video positions

Parameter Description Sample value Required
pod Represents a pod within a video. Pass &pod=1 for first pod, &pod=2 for second pod and so on. Used for competitive exclusions, frequency capping and related features. 3 No, but must be passed for features such as competitive exclusions, frequency capping and related features to work correctly.
ppos Represents position within a pod. Necessary for companion autofill. Pass &ppos=1 for the first position, &ppos=2 for the second position and so on. Used for competitive exclusions, frequency capping and related features. 2 No, but must be passed for features such as competitive exclusions, frequency capping and related features to work correctly.
vpos Indicates whether the ad request is being sent from pre-roll,mid-roll or post-roll. preroll
midroll
postroll
No
mridx 1-based index that indicates from which mid-roll (1st, 2nd, 3rd, etc.) a request is made. 2 No
lip=true Needs to be added for a request from the last position in a pod in case of standardised pods. true Yes, for standardised pods
min_ad_duration
max_ad_duration
Taken together, these specify the duration range that an ad must match, in milliseconds.
Used to request a single ad.
15,000
30,000
No
pmnd
pmxd
Taken together, these specify the duration range that a pod must match, in milliseconds.
Used to request multiple ads (i.e. pods).
0
60,000
Yes, for optimised pods
pmad Max number of ads in a pod 4 No

Other SDK parameters

Parameter Description Sample value Required
scor An integer generated for each video stream; the number needs to be the same within a stream and unique within a page view. Used for competitive exclusions, frequency capping and related features if a user is watching multiple videos on the same page. 17 No, but must be passed for features such as competitive exclusions, frequency capping and related features to work correctly.
vad_type Indicates whether a linear or non-linear ad should be returned for the request. linear
nonlinear
No
excl_cat Ad exclusion category. Blocks any line items containing the exclusion label in question from being eligible for a given ad request; works with scp and cust_params. &scp=excl_cat%3Dairline_
exclusion_label%7C
No