Build Google Publisher Tags

Load creative code with a tagless request

Request raw creative code for custom parsing and display

A tagless request can be used in the place of an ad tag to request the raw creative code trafficked in Ad Manager. Tagless requests are generally used when custom parsing and display is needed, such as set-top boxes or other environments without Google tagging or SDK support.

When you make a tagless request, Ad Manager returns only the raw creative code, exactly as trafficked, without executing and displaying the ad. If an ad is not found, a 200/OK status is returned with an empty response.

Your app, player, or site must execute the code to display the ad, and activate impression tracking.

Manually create a tagless request

To construct a tagless request, begin with the base URL, include all of the required parameters, and any additional optional parameters. These parameters specify things like the ad unit, creative size, key-values and other information about the request.

Tagless requests must be made securely using SSL (https://).

Start with a base URL

Use this base URL:  https://securepubads.g.doubleclick.net/gampad/adx?

Specify the parameters of your ad request

Required parameters
Parameter Description
iu

Google Ad Manager ad unit code, including your Google Ad Manager network code. To include multiple levels, use the slash (/) character as a separator.

Example

iu=/123/homepage
iu=/456/sports/baseball

When using Multiple Customer Management (MCM) with tagless requests, use the parent,child structure for the network code.

Example (MCM)

iu=/123,456/homepage

sz

Creative size. To include multiple sizes use the pipe (|) character as a separator between them.

Example

sz=320x50 for a single size
sz=320x50|300x50 for multiple sizes

We recommend you encode pipe (|) characters in tagless requests with %7c.

Example

&sz=216x36|300x50|320x50 becomes &sz=216x36%7c300x50%7c320x50.

url

URL of the domain hosting the initial ad request. Only required for MCM requests.

Example

url=example.com

c

Correlator (or, cache-busting) value. This must be a random number (letters are not permitted) generated by a publisher to ensure a fresh call to the ad server happens each time the page loads to avoid impression-counting discrepancies.

Example

c=8362527364

tile

Position of the tag on a webpage. The value should be a unique integer. For an easier implementation, we recommend a value counting up.

This is only required if multiple ad tags use the same ad unit code (iu=) and correlator (c=) values on the same page.

Example

https://securepubads.g.doubleclick.net/gampad/adx?iu=/1234/homepage&sz=320x50&c=54631&tile=1
https://securepubads.g.doubleclick.net/gampad/adx?iu=/1234/homepage&sz=320x50&c=54631&tile=2

All the requests with the incremented tile (tile=) values must be triggered within 30 seconds to ensure the same creative is not selected again for the same correlator (c=).
Optional parameters
Parameter Description
d_imp

Delayed impression toggle. If included, impression counting upon request is disabled and either the viewed impression macro in the returned creative or the information from the d_imp_hdr parameter is used to record an impression.

Example

d_imp=1
d_imp=0 (This is the default value for Google Ad Manager impression counting.)

d_imp_hdr

Delayed impression header information toggle. If included, the view URL to be used for impression counting is returned in the HTTP header. By default, this header information is not defined. A publisher then needs to manually ping this view URL to count an impression. Learn more about impression counting and tagless requests.

  • The Google-Delayed-Impression header contains the Google Ad Manager impression URL.
  • The Google-3rdParty-Delayed-Impression header contains the third-party impression URL, if present in the creative.

Example

d_imp_hdr=1
d_imp_hdr=0 (Explicitly disables delayed impression header information.)

t

Slot-level key-value pairs. Each key and value is separated by the equal sign = character; key-value pairs are separated by the ampersand & character. Each key and value should be URL encoded individually and then the entire string should be URL encoded. Each key within a set of key-values must be unique; if you provide the same key more than once, only one of the associated values is taken into account.

Example

The parameter t=genre%3Daction%26movie%3DMr+%2526+Mrs+Smith assigns the key "genre" to the value "action" and the key "movie" to "Mr & Mrs Smith".
Note that the "&" between key-value assignments is singly encoded (%26), but doubly encoded (%2526) when it occurs within a value.

Use excl_cat as a special key for competitive exclusions.

Example

t=excl_cat%3Dairlines
t=interest%3Dsports%2Cnews%26excl_cat%3Dairlines

The following characters are not permitted in keys or values: " ' ! + # * ~ ; ^ ( ) < > [ ] = . Spaces are allowed in values, escaped as %20 or +, but not in keys.

Example

Setting the key "a" to the value "b+c" with t=a%3Db%252Bc doesn't work.

m

Mime-type value on the HTTP header.

Example

m=text/wml

mob

Mobile ad request indicator.

Example

mob=js (This is the only accepted value.)

ppid

The Publisher provided identifier (PPID) parameter allows you to send Google Ad Manager an identifier for use in frequency capping, audience segmentation and audience targeting, sequential ad rotation, and other audience-based ad delivery controls across devices.

Example

ppid=12JD92JD8078S8J29SDOAKC0EF230337

u_w

Mobile device screen width, which overrides the automatic detection done by the ad server.

Example

u_w=1024

u_h

Mobile device screen height, which overrides the automatic detection done by the ad server.

Example

u_h=768

submodel

Mobile device hardware information, which overrides the automatic detection done by the ad server.

Example

submodel=iPhone4%2C1 (The comma to delimit the submodel value is encoded.)

Submodel values:

  • iPhone (first gen): iphone1,1
  • iPhone 3G: iphone1,2
  • iPhone 3GS: iphone2,1
  • iPhone 4 (GSM): iphone3,1
  • iPhone 4 (GSM): iphone3,2
  • iPhone 4 (CDMA): iphone3,3
  • iPhone 4S: iPhone4,1
  • iPhone 5 (GSM and LTE): iPhone5,1
  • iPhone 5 (CDMA and LTE): iPhone5,2
  • iPhone 5c: (GSM and CDMA): iPhone5,3
  • iPhone 5c (GSM and CDMA): iPhone5,4
  • iPhone 5s (GSM and CDMA): iPhone6,1
  • iPhone 5s (GSM and CDMA): iPhone6,2
  • iPhone 6 : iPhone7,2
  • iPhone 6 Plus: iPhone7,1
  • iPhone 6s: iPhone8,1
  • iPhone 6s Plus: iPhone8,2
  • iPhone SE: iPhone8,4
  • iPhone 7: iPhone9,1
  • iPhone 7 Plus: iPhone9,2 
  • 1st Gen iPod: iPod1,1
  • 2nd Gen iPod: iPod2,1
  • 3rd Gen iPod: iPod3,1
  • 4th Gen iPod: iPod4,1
  • 5th Gen iPod: iPod5,1
  • 1st Gen iPad (Wi-Fi): iPad1,1
  • 1st Gen iPad (AT&T): iPad1,2
  • 2nd Gen iPad (Wi-Fi): iPad2,1
  • 2nd Gen iPad (AT&T): iPad2,2
  • 2nd Gen iPad (Verizon): iPad2,3
  • 2nd Gen iPad (Wi-Fi): iPad2,4
  • 3rd Gen iPad (Wi-Fi): iPad3,1
  • 3rd Gen iPad (Verizon): iPad3,2
  • 3rd Gen iPad (AT&T): iPad3,3
  • 4th Gen iPad (Wi-Fi): iPad3,4
  • 4th Gen iPad (AT&T): iPad3,5
  • 4th Gen iPad (Verizon): iPad3,6
  • iPad Mini (Wi-Fi): iPad2,5
  • iPad Mini (AT&T-US; GSM & LTE 4, 17): iPad2,6
  • iPad Mini (Verizon-World; GSM, DMA & LTE 1,3,5,13,25): iPad2,7
  • iPad Mini Retina (Wi-Fi): iPad4,4
  • iPad Mini Retina (LTE): iPad4,5
  • iPad Air (Wi-Fi): iPad4,1
  • iPad Air (LTE): iPad4,2
 
You can use resettable device ID (RDID) for frequency capping and audience targeting. Learn more about configuring RDID for tagless requests.

Activate impression tracking

Ad Manager can track downloaded impressions, also known as "delayed" impressions, for tagless requests. Use any of the options below, but not all together. Using all of the options together might cause impressions to be double (or triple) counted.

We recommend Option 1, but you must have access to HTTP response headers and be able to implement a header-based protocol.

Option 1: Read HTTP response header to control impression counting

Add the d_imp=1 and d_imp_hdr=1 parameters to your tagless request so that Google Ad Manager won't record an impression or a downloaded impression until you manually trigger an impression ping with the Google-Delayed-Impression HTTP header URL. When the impression ping is triggered, an "Ad server impression" and "Ad server downloaded impression" is recorded by Google Ad Manager.

Do not include the viewed impression macro for creatives returned by tagless requests to avoid counting an impression twice.

Option 2: Use the viewed impression macro

If you can't access HTTP response headers, you must segment your inventory and add the viewed impression macro to the code snippet of every creative returned by a tagless request. This macro expands to a URL to be sent by the creative when rendering.

Make a tagless request to retrieve the creative code

Web content

Tagless requests are generally used in environments without Google tagging or SDK support. If you make a tagless request on the web, you must load it in an <iframe> to be able to execute the raw code that is returned.

Custom environments without a Google SDK

To retrieve raw creative code in environments without Google tagging or SDK support (for example, a non-Google set-top box), refer to the following guidelines:

  • Set a valid user agent in the User-Agent request header to ensure that targeting functions properly.
  • Ensure your environment can handle rich media behaviors, including JavaScript and creative expansion.
  • Make an HTTPS request to Google Ad Manager.
  • Inspect the response status to find "HTTP 200/OK", indicating that the request was well-formed.

Unsupported features with tagless requests

Tagless requests that use gampad/ad in HTML image tags (<img>) don't support JavaScript tracking code and are not supported for downloaded impression counting.

To report on these ads, use the "Total code served count" metric in Ad Manager reporting.

Was this helpful?

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