This article outlines information about simplified URLs for DFP Mobile.
You can use simplified URLs in the following cases:
- Environments where devices don't support JavaScript tags.
- As redirects for trafficking on other ad servers.
- Applications where an SDK is not provided, such as BlackBerry.
Simplified URLs follow this format:
- For non-SSL:
http://pubads.g.doubleclick.net/gampad/request-type?parameters - For SSL:
https://pubads.g.doubleclick.net/gampad/request-type?parameters
The sections below describe the contents of the request-type and parameters sections of these URLs.
Request types
DFP supports the following values for the request-type section of the URL.
| Request type | Description |
|---|---|
adx |
Returns the raw code of the creative trafficked in DFP. |
Parameters
DFP supports the following values for the parameters section of the URL.
| Parameter | Request type | Required | Description |
|---|---|---|---|
iu |
adx |
required | The name of the ad unit of the DFP network. To include multiple level ad units, use the slash (/) as a separator between different levels. To include several ad units, use the pipe (|) character as a separator between them. Examples: iu=1234/Europe|1234/Americas/US
|
sz |
adx |
required | Creative size specification. To include multiple sizes use the pipe (|) character as a separator between them. Examples: sz=320x50 for a single size |
mob |
adx |
required | Indicates that this is a mobile ad request.
Example: mob=js |
t |
adx |
optional | Page-level custom targeting that represents key-value pairs. Multiple key-values are separated using the & character. Use URL encoding for the = and & characters, as shown in the example below.Examples: To indicate interest=sports&gender=male, use t=interest%3Dsports%26gender%3Dmale.To indicate pos=bottom,low, use t=pos%3Dbottom,low |
c |
adx |
required | Correlator/cache-busting parameter. This is a random number used to ensure that a fresh call to the ad server happens every time the page loads, avoiding discrepancies in impression counts. Ad requests work without the correlator/cache-busting parameter, but omitting this parameter can lead to under-counting of impressions, negatively affecting both the advertiser/client and the publisher websites.
Example: c=123456789 |
m |
adx |
optional | Set the mime-type value on the HTTP header to a desired value.
Examples: m=text/wml |
submodel |
adx |
optional | Mobile device hardware information (model), which overrides the automatic detection done by the ad server.
Example: submodel=iPhone4,1Possible submodel values are listed below. Note that you must encode the submodel value, so iPhone1,1 would be iPhone1%2C1.
|
u_w |
adx |
optional | Mobile device screen width, which overrides the automatic detection done by the ad server. Example: u_w=1024 |
u_h |
adx |
optional | Mobile device screen height, which overrides the automatic detection done by the ad server. Example: u_h=768 |
gpt_srv |
adx |
optional | Possible values are 0 and 1 (0 is the default). If set to 1, DFP returns a GPT tag to requests from highend devices; this is required to deliver AdSense ads. |
Custom environments for image and non-image ads
You can use the adx form of the simple URL to request any ad from DFP Mobile.
Environments that could request ads from DFP Mobile include the following:
- Windows Phone 7 or BlackBerry applications where there is no DoubleClick SDK.
- iOS and Android applications written in a non-native language such as C++.
- Other custom environments such as Connected TVs or set-top boxes.
These environments should adhere to the following principles to request an ad from DFP Mobile:
- Ensure that the environment in question can handle Rich Media behaviors. Things to consider include running JavaScript, expansion, and so on.
- If the request is coming from a client-side environment, ensure the following parameter is set:
mob=js - Use the right method in this environment to make an HTTP call to DFP Mobile.
- Use the right method in this environment to add the HTTP User Agent header to the request. Be sure to use a valid User Agent for the device to ensure that device targeting continues to work.
- Inspect the response status to make sure that the request was well formed. DFP Mobile will return a HTTP 200/OK if the request is well formed.
- If an ad is found, DFP Mobile returns the raw creative code associated to ad exactly as trafficked.
- If an ad is not found, DFP Mobile returns a 200/OK with an empty response.
Such a call could look like this:
http://pubads.g.doubleclick.net/gampad/adx?iu=/6837/Mobsite/Europe&sz=320x50&mob=js&m=text/oml
