Help Center

DoubleClick Campaign Manager

Macro Builder

Instructions

This tool is used for adding DoubleClick for Advertiser macros to click-through URLs and 3rd party tracking pixels. The tools will automatically detect key_value parameters in a query string (e.x., http://www.domain.com/path?query_string), and display them below. You can then select any DCM macro to replace the value of a given paremeter. The tool will output the reformatted URL or pixel with the correct macro syntax.

DCM macros are short commands that can be inserted into a click-through URL, a redirect URL, the HTML of a custom creative, a frame header, or a Floodlight tag. The ad servers then executes the command, dynamically expanding the macro when the ad is served, when a user clicks on or views a redirect creative, or when the Floodlight tag is called.

More Information on DCM Macros

This tool applies to most URLs, simple image and JavaScript pixels, and Floodlight tags. For example:
URL: http://www.google.com?utm_source&utm_medium=&utm_campaign=
Pixel: <img src="http://b.scorecardresearch.com/p?c1=xx&c2=yourComScoreID&c3=" />

This tools does not apply to more complex, asynchronous JavaScript pixels such as Google Analytics tags.

Macro Name Accepted from:
Click-through URLs Click trackers Redirect URLs Custom creative code Floodlight
%b Base HREF Macro
%c Click String Macro
%e Expand Macro
%g Geographic Data Macro
%i Impression Macro
%k Keyword Value Macro
%n Random Number Macro
%p Pattern Match Macro
%s Site Keyname Macro
%u Click-through URL Macro

Helpful Definitions

Query String

A query string is the part of a Uniform Resource Locator (URL) that contains data to be passed to web applications. The question mark is used to separate the query string from the root URL.
Example: http://server/path/?query_string

Key

The type of data being passed through the query string.
Example: ?key1=value1&key2=value2

Value

The value passed to a given key in the query string.
Example: ?key1=value1&key2=value2

Delimiter

A character that separates different key=value pairs, or different values, in the query string. The delimiter is typically one of (&;_|). This is assumed for the purposes of this tool.
Example: ?key1=value1Delemiterkey2=value2

Start_Key_String

The key portion of a key-value pair. The key-value pair is located in the DCM tag being matched.
Example: %p[start_key_string]![end_character]
  • Step 1:  Select an input type. This could be a URL, 3rd party pixel or Floodlight Tag.
    Select
    • Select
    • Pixel
    • URL
    • Floodlight

    Ex:

    • <img border="0" src="https://ads.google.com/conversion?id=xxxxxxxx&cid=">

    Ex:

    • <!--Start of DoubleClick Floodlight Tag: Please do not remove--> <img src="http://ad.doubleclick.net/activity;src=123456;type=cart;cat=homep;u1=[product];u2=[zipcode];ord=1?" width="1" height="1" frameborder="0" style="display:none"></iframe> <!-- End of DoubleClick Floodlight Tag: Please do not remove -->

    • Implementing an iFrame Floodlight tag in another Floodlight tag is not supported.

    Ex:

    • http://www.google.com/?utm_source=&utm_medium=&utm_campaign=
  • Step 2:  Add DCM Macros. This tool will auto-detect existing key-value pairs and delimiters.
    Add Macros
  • Step 3:  Review the pixel or URL.
    Complete
© 2014 Google, Inc. All Rights Reserved | Terms of Service | Contact Us