Sie sind auf Seite 1von 5

Using Ad Server Macros

On completion of this topic, you will be able to:

Define ad server macro

Identify the types of ad server macros

Describe %c, %h, %k, %p, %t, %u, %n, and %i

Use %h and %u.

Term Definition
Ad server macro A piece of programming in rich media code that defines how to expand a computer
instruction into a number of instructions.

Ad server macros are pieces of programming that are included in rich media code and
expanded by ad servers using real-time data.
A macro is a piece of programming that expands. Ad server macros are useful for passing important
information to the advertiser or third-party ad servers. This information can be stored in the ad server
log files.

These are the most commonly used ad server macros:

%c

%h

%k

%p

%t

%u

%n

%i.

Using %c
The ad server macro %c is the most common. It is used to track clicks on a rich media placement. %c is
inserted before the click-through URL of the creative.
The characters :// must be replaced with the ASCII equivalent %3a%2f%2f in URLs
when %c is used. This ensures that any browser can translate the code.

%c example:

%chttp%3A%2F%2Fwww.ifriends.net/warning/altavista/hardmapped.htm
When the ad server serves the rich media file, the %c is expanded to:

http://ad.doubleclick.net/click;361119;0-8388608;2;321977;1-468|60;0|0|
0;;?http%3A%2F%2Fwww.ifriends.net/warning/altavista/hardmapped.htm

Using %h

The ad server macro %h provides a shortcut to the ad server in rich media creatives that use the URL of
the ad server to locate creative assets.
For example, instead of hardcoding the URL:
<img border=“0” src=“http://ad.doubleclick.net/AdvertiserID/filename.gif” width=“468” height=“60” alt=“Click
here”>
You can enter %h:
<img border=“0” src=“%h/AdvertiserID/filename.gif” width=“468” height=“60” alt=“Click here”>
In this example, %h = “ad.doubleclick.net”
Using %h automatically serves the ad from the closest ad server to the user.

Using %k

The ad server macro %k is used to dynamically insert keywords into the text of a creative.
If a user searches for a keyword to which an ad is targeted, %k inserts the keyword into the text of the ad.
%k code example:
<a href=“http://ad.doubleclick.net/jump/sitename/zone;%kkw=!;> Click here for %kkw=!;</a>
Code Description
%k The ad server macro.
kw= Key-portion of the keyword pair.
! Represents the character string.
; Represents the end of the character string.
%k replaces escaped characters, such as the plus sign (+), with its original
character.

Using %p

The ad server macro %p is similar to %k. %p is used to dynamically insert search words into the text of a
creative.
%p inserts any search string into the click-through URL, so an ad does not have to be targeted to a keyword.
%p example:
If the click-through URL is: http://m.doubleclick.net/372444/ctp2.html?%p/n!
The ad tag is:
http://ad.doubleclick.net/adi/n270.test12345.com/B1034673;sz=468x70;ord=12345
Then, the click-through URL becomes:
http://m.doubleclick.net/372444/ctp2.html?270test12345.com/B1034673
The ad server searches through the ad tag for the text between “%p” and “!” The ad server takes the string from
that point on and appends it to the click-through URL.

%p is useful for recording information about the click.

Using %t

The ad server macro %t inserts the target window value from a site’s Rich Media Settings.
The target window defines where the web page is displayed when a user clicks on the rich media ad.
Using %t allows you to dynamically insert the settings for each site, rather than having to re-code the rich media
creative for individual site settings.
For example, instead of using the “_top” as the value of target=:
<form target=“_top” action=http://www.advertiser.com method=“get”>
You can enter “%t”:
<form target=“%t” action=http://www.advertiser.com method=“get”>

Using %u
The ad server macro %u places the click-through URL assigned in the rich media assignment into the
rich media code.
The macro automatically expands into the click-through URL within the rich media.
This macro is useful because you can embed other ad server macros within the click-through URLs, and change
the click-through URL without modifying the rich media code. When %u expands into the click-through URL, any
other macros in the click-through URL automatically expand as well.
%u code example:
<a href=”%u” target=”%t”><img src=”%h/AdvertiserID/filename.gif
width=”468” height=”60” border=”0”></a>

The ad server macro %u cannot be used in creatives with more than one click-
through URL.

Using %n

The ad server macro %n is used for cache busting in redirect assignments.


%n dynamically generates a random string and appends it to the click-through URL and image URL for a redirect
assignment.
Modified click-through URL example:
http://ad.redirect.thirdparty/click%n
Modified image URL example:
http://ad.redirect.thirdparty/ad.gif%n

Each third party ad server has individual syntax for using %n. Contact Customer
Support athttp://help.doubleclick.net/ to determine the character string for your
redirect assignment.

Using %i

The ad server macro %i is used for trafficking interstitial ads.


%i allows the ad server to record when an impression of an interstitial ad is served.
%i code example:
<img src=%ihttp://www.advertiser.com/img/logo.gif>
You must include %i in the code for an interstitial creative in order for DFP to
serve the ad. If you do not,DFP deactivates the ad.

Ad server macro is apiece of programming in rich media code that defines how to expand a computer
instruction into a number of instructions.
These are the most commonly used ad server macros:

%c
%h

%k
%p

%t
%u

%n
%i.

The ad server macro %c is the most common. It is used to track clicks on a rich media
placement. %c is inserted before the click-through URL of the creative.
The ad server macro %h provides a shortcut to the ad server in rich media creatives that use the URL
of the ad server to locate creative assets.
The ad server macro %k is used to dynamically insert keywords into the text of a creative. If a user
searches for a keyword to which an ad is targeted, %k inserts the keyword into the text of the ad.
The ad server macro %p is similar to %k. %p is used to dynamically insert search words into the text of
a creative. %p inserts any search string into the click-through URL, so an ad does not have to be
targeted to a keyword.
The ad server macro %t inserts the target window value from a site’s Rich Media Settings. The target
window defines where the web page is displayed when a user clicks on the rich media ad.
The ad server macro %u places the click-through URL assigned in the rich media assignment into the
rich media code. The macro automatically expands into the click-through URL within the rich media.
The ad server macro %n is used for cache busting in redirect assignments. %ndynamically generates a
random string and appends it to the click-through URL and image URL for a redirect assignment.
The ad server macro %i is used for trafficking interstitial ads. %i allows the ad server to record when an
impression of an interstitial ad is served.

Das könnte Ihnen auch gefallen