Search Images Maps Play YouTube News Gmail Drive More »
Sign in

Inventory and tagging

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 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. 400x300
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 the publisher 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 timestamp 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

*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=[timestamp] - typically the timestamp 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. 728x90,300x250
cust_params Custom targeting parameters. Learn how to add key-value pairs to an ad tag.

Custom 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 standardized pods. true Yes, for standardized pods.

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 pageview. 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.
min_ad_duration
max_ad_duration
Taken together, these specify the duration range that an ad must match, in milliseconds. 15000
30000
No.