Home > Guides > Creative Macros

Creative Macros

ADMATX MACROS

Creative macros are strings of characters that you place into a creative's code that allow the platform to replace the macro value with another value tailored to the creative's individual settings. You must manually append macros to your creative when using an unsupported third-party server. Admatx utilizes The Trade Desk macros.

Note: Admatx does not currently support dynamic macro rules. If you would like to implement a dynamic macro please contact support@admatx.com

Available Macros

%%TTD_ADFORMAT%%: The ad format (width x height)

%%TTD_ADGROUPID%%: The Admatx tactic ID

%%TTD_ADGROUPID_INT%%: The Admatx tactic ID as an integer

%%TTD_ADVERTISERID%%: The Admatx advertiser ID

%%TTD_ADVERTISERID_INT%%: The Admatx advertiser ID as an integer

%%TTD_ALL_CATEGORIES%%: Returns all matched categories in a comma-separated format. Also see %%TTD_CATEGORY%%.

%%TTD_BASE_BID_OVERRIDE_METADATA%%: The base bid override

%%TTD_CAMPAIGNID%%: The Admatx campaign ID

%%TTD_CAMPAIGNID_INT%%: The Admatx campaign ID as an integer

%%TTD_CATEGORY%%: The category passed in the bid request. Also see %%TTD_ALL_CATEGORIES%%.

%%TTD_CITY%%: The name of the city

%%TTD_CLK%%: The Admatx click tracking

%%TTD_CLK_ESC%%: The Admatx click tracking, escaped. For use when %%TTD_CLK%% does not work as expected.

%%TTD_CLK_ESC2%%: The Admatx click tracking, double-escaped. For use when %%TTD_CLK_ESC%% does not work as expected.

%%TTD_COUNTRY%%: The name of the country

%%TTD_CREATIVEID%%: The Admatx creative ID

%%TTD_CREATIVEID_INT%%: The Admatx creative ID as an integer

%%TTD_DEALID%%: The deal ID of a private contract

%%TTD_DEVICEOSFAMILY%%: The device OS family. [Other=1, Windows=2, OSX=3, Linux=4, iOS=5, Android=6, Windows Phone=7]

%%TTD_DEVICETYPE%%: The device type

%%TTD_IMPRESSIONID%%: The Admatx impression ID (BidRequestId)

%%TTD_LANGUAGE%%: The language of the bid request (or the language that got matched on targeting data). Bid requests can have multiple language codes. The priority (in descending order) is SSP-provided language, user agent languages, and device languages.

%%TTD_METRO%%: The numeric ID of the metro area

%%TTD_PRIVATECONTRACTID%%: The Admatx ID for the impression if it was bought on the private market

%%TTD_PUBLISHERID%%: The supply vendor publisher ID

%%TTD_REGION%%: The state, province, or regional area in a country

%%TTD_RENDERING_CONTEXT%%: Other, InApp, MobileOptimizedWeb

%%TTD_SITE%%: The domain of the site that served the ad

%%TTD_SITE_WITH_PATH%%: The domain and path of the site that served the ad

%%TTD_SUPPLYVENDOR%%: The Admatx supply vendor (for example, Xandr, Google)

%%TTD_SUPPLYVENDOR_INT%%: The Admatx supply vendor as an integer

%%TTD_TDID%%: The unique ID that identifies the user viewing the ad

%%TTD_TRUSTESID%%: The TRUSTe SID (0 if no SID is provided)

%%TTD_UNIX_TIMESTAMP%%: A UNIX timestamp; this macro can be used manually as an alternative cachebuster as well as a timestamp.

%%TTD_ZIPCODE%%: The zip or postal code

Mobile App Macros:

%%TTD_DEVICEID%%: The unique device ID, such as iOS IDFA or Android AAID

%%TTD_LAT%%: The latitude

%%TTD_LONG%%: The longitude

%%TTD_CACHEBUSTER%%: Cache Buster

If you are uploading a third-party creative tag that includes a timestamp, you might need to manually replace the timestamp with the cachebuster macro (%%TTD_CACHEBUSTER%%). The cachebuster macro ensures that if a page is refreshed, a cached version of a creative is not reloaded. Instead, a new ad is served, maximizing publisher inventory and avoiding duplicated impressions.

The following is an example of an original tag:

<SCRIPT language='JavaScript1.1' SRC="http://ad.doubleclick.net/adj/N4694.Beep346/B5550000;sz=160x600;ord=[timestamp]?"> </SCRIPT><NOSCRIPT> <A HREF="http://ad.doubleclick.net/jump/N4694.Beep346/B5550000;sz=160x600;ord=[timestamp]?"> <IMG SRC="http://ad.doubleclick.net/ad/N4694.Beep346/B5550000;sz=160x600;ord=[timestamp]?" BORDER=0 WIDTH=160 HEIGHT=600 ALT="Advertisement"></A></NOSCRIPT>

The following is an example of a modified tag:

<SCRIPT language='JavaScript1.1' SRC="http://ad.doubleclick.net/adj/N4694.Beep346/B5550000;sz=160x600;ord=%%TTD_CACHEBUSTER%%?"></SCRIPT> <NOSCRIPT><A HREF="http://ad.doubleclick.net/jump/N4694.Beep346/B5550000;sz=160x600;ord=%%TTD_CACHEBUSTER%%?"><IMG SRC="http://ad.doubleclick.net/ad/N4694.Beep346/B5550000;sz=160x600;ord=%%TTD_CACHEBUSTER%%?" BORDER=0 WIDTH=160 HEIGHT=600 ALT="Advertisement"></A></NOSCRIPT>