Trafficking 101: How to Create Companion Ads Without Using ptile in DoubleClick DFP

Companion ads (also called partner ads, or synchronized ads / synchronized banners) are widely used as part of various ad package offerings to agencies and advertisers, and are, perhaps, the most common arrangement to build brand awareness online.

They’re commonly created using the reserved key “ptile” in DoubleClick DFP (DART for Publishers), however, there are certain situations when you need to look for workarounds. For example, if you have already used a “tile” key, you cannot use a “ptile” in the same time.

Scenario: you use a “tile” key-value on a web page with multiple ad slots to prevent competing ads from displaying. Later, you find out that you will need to traffic companion ads on that page: several banners to rotate in a 468×60 ad slot, and each banner has a companion 120×90 button ad and a companion ad 160×600 skyscraper. You would normally traffic such an arrangement using “ptile”; however, you cannot use the “ptile” and “tile” key-values together on the same page.



Solution: each 468×60 banner must be booked as a separate Ad in DFP, as master ad. Each creative should be set as Rich Media type (even if the creative is a standard image) with the following example code:

<a href=”%c%u” target=”%t”>
<img src=”%h/advertiser_ID/creative_file_name.ext” border=”0″ width=”468″ height=”60″>
</a>
<script language=”JavaScript”>
adid=”%eaid!”;
</script>

where the following macros are (optionally) used:
%c = DART click-through tracking url.
%u = Is replaced with the click-through entered for the creative placement.
%h = DART host name.
%e = DART expand macro. Is replaced by the Ad ID of the ad within which this creative is booked.
%t = Replaced with the DART site’s click-through target window setting. Usually _top or _blank.

The JavaScript statement: adid=”%eaid!”; will pass the Ad ID of the 468×60 banner creative through to the 120×90 and 160×600 ad tags on the page to use as a targeting value in calling the companion partner ad. (You can give the adid variable a different name; however, it must be matched exactly in both the 120×90 and 160×600 ad tags.)

Each 120×90 and 160×600 creative must also be booked in separate ads. These creative are booked “As fast as possible” with a priority higher than default (eg, for standard ad type default is 8, set to 6). On the Content tab of each companion ad, you must target it to the key-value with the exact Ad ID from the companion 468×60 banner ad. If the companion banner ad has an Ad ID of 12345678, the key-value targeting for the companion ads would look like: comp=12345678.

The 468×60 DFP tag implemented on the web page will not be altered from your usual tag structure. But the 120×90 and 160×600 ad tags must be modified to have the comp key inserted, and the “adid” value called:
src=”http://ad.doubleclick.net/adj/site/zone;comp=’ + adid + ‘;sz=120×90;tile=2;ord=’ + rand + ‘?

Just as the rand value is dynamically populated with a random number, the adid value will be dynamically populated with the Ad ID 12345678 (or whatever Ad ID corresponds to the decision-making banner that was displayed in the 468×60 ad tag).

How to declare the adid variable: you must declare the adid JavaScript variable on the web page above/before the first ad tag (preferably in the <head> section of the webpage) to avoid receiving JavaScript error messages in instances where an ad is served to the page without the adid=”%eaid!” statement. Here’s an example:

<html>
<head>

<script language=”JavaScript”>
adid=””;
</script>

</head>
<body>

Important: it is recommended that this solution only be used with JavaScript ad tags. You should ensure that, in this example, the 468×60 banner tag is the first among the three ad tags to display on the page, otherwise the companion ads will not serve. Given this condition, it is recommended that you use the integrated DFP Roadblock feature that serves companion ads.