Basic Macro glossary

AdButler supports numerous macros for expansion which can be used to enhance third party analytics as well as streamline the deployment of new ad items.

Macro Description
[TRACKING_LINK] Records a click for the given ad item and then redirects to the destination URL associated with the ad item.
[TRACKING_LINK_ENCODED] Records a click for the given ad item and then redirects to the destination URL associated with the ad item while encoding all the parameters and destination URL.
[RND] A random number generator.
[TIMESTAMP] Linux based timestamp for cache-busting.
[ZONE_ID] A numeric identifier unique to the zone the ad is served from.
[ZONE_NAME] The descriptive name used to label the zone where the ad was served from.
[PUBLISHER_ID] A numeric identifier of the publisher that the ad was served from.
[BANNER_ID] A numeric identifier of the ad item that was served.
[BANNER_NAME] The descriptive name used to label the ad item.
[BANNER_NAME_ENCODED] The descriptive name used to label the ad item, encoded for use when inserted directly into a URL.
[EXTRA_CLICK_DATA] String of data passed in from the initial ad request from the client.
[CONVERSION_KEY] Generates a string of data from the initial ad request that later allows a passback tag functionality.
[UNIQUE_ID] AdButler's placeholder unique user ID macro. Email ad tags require you to replace this macro.
[PUBLISHER_NAME] A string identifier of the publisher that the ad was served from.
[PUBLISHER_NAME_ENCODED] A string identifier of the publisher that the ad was served from, encoded for use when inserted directly into a URL.
[ZONE_NAME_ENCODED] The descriptive name used to label the zone where the ad was served from, encoded for use when inserted directly into a URL.

Sample Usage in Destination URL

You can use macros in the Destination URL, image source URLs, tracking URLs and in the body of Custom HTML / 3rd party scripts.

The macro must be preceded by a "?" if there are no other parameters and an "&" if there are already parameters in the URL.

Additional Macro Information

[TRACKING_LINK]

The tracking link macro is a web link that registers a user on our server when they click an ad before forwarding them onto their destination. It is associated with an anchor tag or other navigation components when creating the ad item by entering a URL into the "Destination URL" field. When using an HTML5 Rich Media Ad item or a 3rd Party Ad, you will need to add this macro so AdButler can track your clicks.

[TRACKING_LINK_ENCODED]

The encoded tracking link is used by some servers like DoubleClick to ensure that the URL and associated data is properly encoded for transmission. Encoding covers a variety of things, such as spaces. Spaces cannot be transferred safely without first encoding them into a "%20".

When the tracking link is part of a URL, often the encoded tracking link is the right choice.

Please see Common 3rd Party Ad Tags for more information on adding tracking to 3rd Party Ad Items.

[RND]

RND is typically used in a third-party creative as a cache buster and/or unique identifier. The macro generates a random number.

[TIMESTAMP]

A Linux based timestamp that is used as a cache buster and/or unique identifier.

[ZONE_ID]

Each zone has a unique ID which can be used to isolate a ad item's source. By putting the macro "[ZONE_ID]" into a destination URL AdButler will fill the spot with the ID unique to that zone. Used in conjunction with a piece of software such as Google Analytics, you can pass along and record information unique to that creative. For example, if we wanted to track the zone and publisher that was tied to an ad item we would use the code like so:

http://toWebsite.com?utm_source=[PUBLISHER_ID]&utm_medium=[ZONE_ID]&utm_campaign=yourcampaignname

[ZONE_NAME]

Each zone has a unique name which can be used to isolate an ad items source. By putting the macro "[ZONE_NAME]" into a destination URL AdButler will fill in the spot with the name unique to that zone. Used in conjunction with a piece of software such as Google Analytics, you can pass along and record information unique to that creative.

http://toWebsite.com?utm_source=[PUBLISHER_ID]&utm_medium=[ZONE_ID]&utm_campaign=yourcampaignname

[PUBLISHER_ID]

Each publisher has a unique ID which can be used to isolate an ad items source. By putting the macro "[PUBLISHER_ID]" into a destination URL AdButler will fill in the spot with the ID unique to that publisher.

http://toWebsite.com?utm_source=[PUBLISHER_ID]&utm_medium=[ZONE_ID]&utm_campaign=yourcampaignname

[BANNER_ID]

Each ad item has a unique ID which can be used to isolate an ad items source. By putting the macro "[BANNER_ID]" into a destination URL AdButler will fill in the spot with the ID unique to that ad item.

http://toWebsite.com?utm_source=[PUBLISHER_ID]&utm_medium=[BANNER_ID]&utm_campaign=yourcampaignname

[EXTRA_CLICK_DATA]

AdButler's "[EXTRA_CLICK_DATA]" macro gives you the ability to pass in additional click data. There are two steps to completing this. The first requirement, as with all macros, is to append it to the destination URL in your ad item configuration.

Once the macro is implemented you then need to modify the zone tag to insert the data. When grabbing the zone tags you will see the option to add extra data. In our case, we want to URL to include the extra data "HelloAdButler":

Any data that is placed in the "Extra Data" field will be passed along, replacing the extra click data macro. Since we entered the data "HelloAdButler", when an ad request is made our URL:

http://www.sparklit.com?[EXTRA_CLICK_DATA]

Will turn into:

http://google.com/?page=102380431&HelloAdButler

A more advanced use case might be if you wanted to use JavaScript on the page to dynamically insert the extra click data. You might want to use this macro to pass along publisher domain information to your advertiser. By filling in the source URL as the Extra data, you can add the source URL to UTM codes or any other source tracking the advertiser may use. Contact our support for more details on this and other uses for the [EXTRA-CLICK-DATA] macro.

[CONVERSION_KEY]

The [CONVERSION_KEY] macro allows you to track how many users were successfully converted to an online sale. For more information on setting up the [CONVERSION-KEY] macro, see our Setting Up Conversion Tracking guide.

[UNIQUE_ID]

[UNIQUE_ID] is AdButler's unique user ID macro. Email ad tags require you to replace this macro with the relevant "Globally Unique Identifier" (GUID) from your email sender provider. For help with MailChimp, see our Setting Up AdButler With MailChimp guide.


Can't find what you're looking for?

Send us an email

hello@adbutler.com

Visit the blog

For more ad serving tips, industry news and AdButler insights.