Basic macro glossary

AdButler supports numerous macros that can be used to enhance third party analytics and streamline the deployment of new ad items.

You can use macros in destination URLs, image source URLs, tracking URLs, and in the body of Custom HTML / third party scripts. A macro must be preceded by ? if there are no other parameters or by & if there are other parameters in the URL.

[ADVERTISER_ID]
[ADVERTISER_NAME]
[ADVERTISER_NAME_ENCODED]
[ALL_KEYWORDS]
[BANNER_HEIGHT]
[BANNER_ID]
[BANNER_NAME]
[BANNER_NAME_ENCODED]
[BANNER_WIDTH]
[CAMPAIGN_ID]
[CAMPAIGN_NAME]
[CAMPAIGN_NAME_ENCODED]
[CONVERSION_KEY]
[CPC]
[CPM]
[EXTRA_CLICK_DATA]
[MATCHED_KEYWORDS]
[PUBLISHER_ID]
[PUBLISHER_NAME]
[PUBLISHER_NAME_ENCODED]
[RND]
[TIMESTAMP]
[TRACKING_LINK]
[TRACKING_LINK_ENCODED]
[UNIQUE_ID]
[ZONE_ID]
[ZONE_NAME]
[ZONE_NAME_ENCODED]


[ADVERTISER_ID]

Fills in the unique numeric identifier of the advertiser that served the ad.

[ADVERTISER_NAME]

Fills in the string identifier of the advertiser that served the ad.

[ADVERTISER_NAME_ENCODED]

Fills in the string identifier of the advertiser that served the ad, encoded for use when inserted directly into a URL. Encoding covers a variety of things, such as spaces. Spaces cannot be transferred safely without first encoding them into a %20.

[ALL_KEYWORDS]

Fills in all the keywords passed into the ad request.

Fills in the height, in pixels, of the ad item that was served.

Fills in the unique numeric identifier of the ad item that was served.

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

Fills in the string identifier of the ad item that was served.

Fills in the string identifier of the ad item that was served, encoded for use when inserted directly into a URL. Encoding covers a variety of things, such as spaces. Spaces cannot be transferred safely without first encoding them into a %20.

Fills in the width, in pixels, of the ad item that was served.

[CAMPAIGN_ID]

Fills in the unique numeric identifier of the campaign in which an ad item is assigned.

[CAMPAIGN_NAME]

Fills in the string identifier of the campaign in which an ad item is assigned.

[CAMPAIGN_NAME_ENCODED]

Fills in the string identifier of the campaign in which an ad item is assigned, encoded for use when inserted directly into a URL. Encoding covers a variety of things, such as spaces. Spaces cannot be transferred safely without first encoding them into a %20.

[CONVERSION_KEY]

Generates a string of data from the initial ad request that later allows a passback tag functionality. This macro allows you to track how many users were successfully converted. For more information on setting up this macro, read Advanced conversion tracking.

[CPC]

Fills in the CPC of the winning placement.

[CPM]

Fills in the CPM of the winning placement.

[EXTRA_CLICK_DATA]

Gives you the ability to pass in additional click data. This macro has two requirements. The first is to append it to the destination URL in your ad item configuration.

How to add extra click data in ad items

The second requirement is to modify the zone tag to insert the click data. Go to the dashboard of the relevant zone (Your AdButler > Publishers > Your Publisher > Your Zone) then click Get Zone Tags/JSON Ad API on the right menu. Enter the click data in the Extra data field of the window that appears. Let's say you want your URL to include the extra data HelloAdButler:

How to add extra click data in zone tags

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, the destination URL

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

will turn into

http://www.sparklit.com?HelloAdButler

A more advanced use case might be using 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 [EXTRA_CLICK_DATA].

[MATCHED_KEYWORDS]

Fills in all the keywords that matched with the winning placement.

[PUBLISHER_ID]

Fills in the unique numeric identifier of the publisher in which the ad was served.

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

Fills in the string identifier of the publisher in which the ad was served.

[PUBLISHER_NAME_ENCODED]

Fills in the string identifier of the publisher in which the ad was served, encoded for use when inserted directly into a URL. Encoding covers a variety of things, such as spaces. Spaces cannot be transferred safely without first encoding them into a %20.

[RND]

A random number generator. Typically used in a third party creative as a cache buster, a unique identifier, or both.

[TIMESTAMP]

A Linux-based timestamp. Typically used as a cache buster, a unique identifier, or both.

Records a click for the given ad item and then redirects to the destination URL associated with the ad item.

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 or a third party ad item, you must add this macro so AdButler can track clicks on the ad item.

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.

Some servers such as DoubleClick use encoded tracking links to ensure that the URL and associated data are 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.

If the tracking link needs to be part of a URL, the encoded tracking link is often the right choice.

For more information on tracking third party ad items, read Examples of common third party ad tags.

[UNIQUE_ID]

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 service provider. For more information, read Common Newsletter Email Unique IDs.

[ZONE_ID]

Fills in the unique numeric identifier of the zone from which the ad item was served. Used in conjunction with software such as Google Analytics, this macro lets you pass along and record information unique to the ad item served in the identified zone. For example, if we want 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]

Fills in the string identifier of the zone from which the ad item was served. Used in conjunction with software such as Google Analytics, this macro lets you pass along and record information unique to the ad item served in the identified zone.

[ZONE_NAME_ENCODED]

Fills in the string identifier of the zone from which the ad item was served, encoded for use when inserted directly into a URL. Encoding covers a variety of things, such as spaces. Spaces cannot be transferred safely without first encoding them into a %20.


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.