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.
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 |
|
(Required). The name of the ad unit in your DFP network. |
|
t |
|
(Optional) Slot-level custom targeting that represents key=value pairs. Multiple key-values are separated using the |
|
sz |
|
(Required) Creative size specification. Multiple sizes are separated using the |
Single size: |
c |
|
(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. |
|
m |
|
(Optional) MIME type parameter. |
|
id |
|
(Required) Ad ID. |
|
tile |
|
(Required when you have multiple ad tags using the same ad unit name on the same page) |
|
mob |
|
(Required for mobile ad requests) Indicates that this is a mobile ad request. |
|
submodel |
|
(Optional for mobile ad requests) Mobile device hardware information (model). |
|
u_w |
|
(Optional for mobile ad requests) Screen width. |
|
u_h |
|
(Optional for mobile ad requests) Screen height. |
|
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.
/ad requests won't qualify for Ad Exchange or AdSense dynamic allocation.
Example tag:
/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:
/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:
/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:
<img src="http://pubads.g.doubleclick.net/
</a>
