Home Top Ad

DoubleClick Macros – An Overview… Part 2



Continued from Part 1

File server macro
The file server macro is an ad server macro most commonly used as a shortcut to designate a creative file's path on DoubleClick's global creative and media servers. Here's what it looks like:%%FILE:file_display_name%% where file_display_name is the display name we can give to the creative file in DFP.

In general, the file server macro will be replaced with the machine name for a physical ad server when an ad serves. This is particularly beneficial for line items that are served to multiple countries.

Notes:
  • %h will still work for creatives trafficked in DART, but we strongly recommend using the new syntax for all new creatives trafficked in the DFP upgrade.
  • The syntax for a creative file's path using %h is: %h/advertiser_ID/filename.ext. For example, for advertiser 12345678 and creative file dclk1.gif, the syntax would be:%h/12345678/dclk1.gif
  • DART macros are case-sensitive. That is, %H is not a valid macro.

Geo ad server macro
The geo ad server macro, %g, can be used in the click-through URL, the redirect URL, and the custom code of a creative. This macro is used to track geographic information - country code, state or province, telephone area code, postal code, bandwidth, and DMA (Designated Marketing Areas) - using your proprietary systems, after a website visitor clicks an ad served by DoubleClick for Publishers. This macro can be implemented regardless of whether a line item has been geographically targeted.

When %g expands into a string, it displays the geographical information of the user to whom the ad was served - assuming that the user's IP address can be looked up - as shown here:

ct=US&st=CA&city=13358&dma=197&zp=94105&bw=0

Where:
  • ct is the key that returns a value for a country code
  • st is the key that returns a value for a U.S. state, territory, or Canadian province
  • city is the key that returns a value for a city
  • dma is the key that returns a value for designated market areas
  • zp is the key that returns a value for a postal code
  • bw is the key that returns a value for bandwidth

Note:
Macros are case-sensitive. That is, %G is not a valid macro.
The expanded form of the geo ad server macro is not wrapped in quotes (single, or double). The macro can cause syntax errors with surrounding Javascript code if it's wrapped in quotes.

Height and width macros
The %%HEIGHT%% and %%WIDTH%% macros insert the creative height and width into the custom code of a creative during the ad serving process, based on the size of the ad slot where the creative is being served.

These macros can be especially useful if we are creating a creative template that you want to reuse with creatives of different sizes. Instead of hard-coding the size for each creative, you can let the height and width macros insert the values into each creative dynamically.

We can also use these macros in the custom code for creatives where we have overridden the creative size (which you can do on the "Settings" tab of a creative). When we override the size, we can enter multiple creative sizes. The creative can then be served to ad units of any of those sizes. We can use the height and width macros to add the dimensions dynamically to the creative code when the creative is served.

Host name macro
The host name ad server macro, %a, can be used in the redirect URL and custom code of a creative. This macro expands into http://pubads.g.doubleclick.net.
Note: DART macros are case-sensitive. That is, %A is not a valid macro.

Interstitial impression macro
The interstitial impression macro enables the DFP ad server to record when an interstitial impression is served from a creative that wasn’t built using one of the built-in creative templates for pop-ups, pop-unders and floating Flash overlays.
Use %%VIEW_URL_UNESC%% for image creatives (JPG, GIF) and %%VIEW_URL_ESC%% for Flash creatives (SWF).

Here's an example of the proper implementation:
<img src=%%VIEW_URL_UNESC%%http://www.acme.com/img/logo.gif>
Notes: %i will still work for creatives trafficked in DART, but we strongly recommend using the new syntax for all new creatives trafficked in the DFP upgrade.

Pattern match macro
We can pass a custom variable into a creative using our creative targeting macro:  %%PATTERN:key%%

Use this macro to pass targeting values into a creative. This can be helpful if we want to serve different creatives based on information we know about a user. For example, maybe we have two creatives for a given line item: one that was designed to appeal to female users and one that was designed to appeal to male users.

We are passing the user's gender into an ad tag on your page via custom criteria like this:

GPT tag:
googletag.defineSlot("/1234/adunit1/adunit2", [728, 90],
"div-gpt-ad-123456789-0")
.addService(googletag.pubads())
.setTargeting("gender", "male");

DART tag:
http://ad.doubleclick.net/ad/sitename/pagename;gender=male;ord=12323

In the custom or third-party creative, dynamically pass the criteria using the following macro:<some creative script here>...&gender=%%PATTERN:gender%%


The entire macro of %%PATTERN:gender%% will be replaced with "male".

DFP will call and serve the “male” creative file to this user.

Notes:
  • %p will still work for creatives trafficked in DART, but we strongly recommend using the new syntax for all new creatives trafficked in the DFP upgrade.
  • %p is not supported with GPT tags. If you use GPT, you must use %%PATTERN:key%%.
  • DART macros are case-sensitive. That is, %P is not a valid macro.
Site name macro
The site name ad server macro, %s, can be used in the click-through URL, the redirect URL, the custom code of a creative, and click commands. This macro is commonly used to track the name of the site (included in the ad tags) where visitors clicked on an ad served by DART in a proprietary system. This macro expands into the originating site's name as defined in DART, not into the DNS name of the site.

Target window macro
The target window macro instructs the user's browser to open the creative's landing page in either the user’s existing window or a new window when the user clicks on the creative.

For example, the DFPNews.com ad unit has the target window set to _top and the DFPFashion.com ad unit has it set to _new. If the %%TARGET_WINDOW%% macro is included in the creative's code or script, it will open a new window when a user of DFPFashion.com clicks on it and an existing window if a user of DFPNews.com clicks on it.

Typically, here’s where you’d see %%TARGET_WINDOW%% placed in the creative code:
<a href="%%CLICK_URL_UNESC%%%%DEST_URL%%" target="%%TARGET_WINDOW%%"><img src="my ad"></a>

Notes:  %t will still work for creatives trafficked in DART, but we strongly recommend using the new syntax for all new creatives trafficked in the DFP upgrade.

Source: Google Support
DoubleClick Macros – An Overview… Part 2 DoubleClick Macros – An Overview… Part 2 Reviewed by Journey Of Digital Media on 1/06/2014 Rating: 5

No comments