Serving ads in a non-JavaScript environment

In certain cases it might not be possible to use JavaScript-based GPT ad tags. The following examples describe a non-JavaScript based URL syntax for requesting ads from the DFP ad server. Depending on the request URL, the ad server modifies and wraps custom code so that creatives can be rendered appropriately in different contexts, such as media players.

Please note that dynamically serving creatives into HTML email or newsletters is not supported by DoubleClick.

Base URL

The base URL for all ad requests is http://pubads.g.doubleclick.net/gampad. SSL requests should use https://pubads.g.doubleclick.net/gampad.

Parameters

The following table describes parameters that can be supplied with various ad requests, along with usage examples.

Parameter Request type Description Examples
iu

/ad, /adx, /clk, /jump

(Required). The name of the ad unit in your DFP network.

iu=/networkCode/sports

t

/ad, /adx, /jump

(Optional) Slot-level custom targeting that represents key=value pairs. Multiple key-values are separated using the & character. URL encoding must be used for both the = and & characters, as shown in the example. To pass multiple values for the same key, separate them with a comma (,).

t=interest%3Dsports,news,games%26gender%3Dmale

sz

/ad, /adx

(Required) Creative size specification. Multiple sizes are separated using the | character.

Single size: sz=728x90
Multiple sizes: sz=728x90|300x250

c

/ad, /adx, /jump

(Required) Correlator/cache-busting parameter. This is a random number used to ensure that a fresh call to the ad server is made every time the page loads, to avoid discrepancies in impression counts.

c=12345

m

/adx

(Optional) MIME type parameter.

m=text/xml

id

/clk

(Required) Ad ID.

id=12345

tile

/ad, /adx, /clk, /jump

(Required when you have multiple ad tags using the same ad unit name on the same page)
Specifies the position of an ad tag on a webpage. The value should be a unique integer.
For an easier implementation, we recommend a value counting up. You shouldn't pass tile= within the &t= parameter as custom criteria.

<img src="http://pubads.g.doubleclick.net/gampad/ad?iu=/12345/adunit&sz=728x90&c=12345&tile=1">

<img src="http://pubads.g.doubleclick.net/gampad/ad?iu=/12345/adunit&sz=728x90&c=12345&tile=2">

mob

/ad, /adx, /clk, /jump

(Required for mobile ad requests) Indicates that this is a mobile ad request.

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

submodel

/ad, /adx, /clk, /jump

(Optional for mobile ad requests) Mobile device hardware information (model).

submodel=iPad3,5

u_w

/ad, /adx, /clk, /jump

(Optional for mobile ad requests) Screen width.

u_w=123

u_h

/ad, /adx, /clk, /jump

(Optional for mobile ad requests) Screen height.

u_h=456

Descriptions of request types

/ad

If the request URL contains /ad, the ad server returns an image creative or an internal redirect to an image creative.

Notes:
  • Any other creative type, such as a custom creative, will not serve to a request with /ad.
  • /ad requests don't qualify for dynamic allocation.

Example tag:

<img src="http://pubads.g.doubleclick.net/gampad/ad?iu=/12345/adunit&sz=728x90&c=12345">

/adx

If the request URL contains /adx, the ad server returns returns a creative without any rendering code wrapping it. This is useful when there is special rendering that needs to be handled by the client, such as for a video player. The optional MIME type parameter m can be passed in the request to make sure that the receiver understands the ad response.

Example request URL:

http://pubads.g.doubleclick.net/gampad/adx?iu=/12345/adunit&sz=320x50&c=12345&m=text/xml

/clk

A request URL containing /clk is used by the ad server to log an ad click for the specified ad. This is useful for logging clicks for ads that are not served by DFP.

Note that the /clk URL is only intended for use with click-tracking line items.

Example tag:

<a href="http://pubads.g.doubleclick.net/gampad/clk?iu=/12345/adunit&id=123459"></a>

/jump

If the request URL contains /jump, the ad server logs an ad click and returns a redirect to the landing page of the creative.

Example tag:

<a href="http://pubads.g.doubleclick.net/gampad/jump?iu=/12345/leaderboard&sz=728x90&c=12345">

<img src="http://pubads.g.doubleclick.net/gampad/ad?iu=/12345/leaderboard&sz=728x90&c=12345">
</a>