Destination Macros Defined destination-macros-defined
Describes the macros you can add to a destination URL.
When creating a URL destination, you can insert the following macros into the URL string. Check with your data/destination partner about proper macro placement within the destination URL.
%alias%
Required.
Defines the location of the mapped segment value in a destination URL. Usually this is the Segment ID, but could also be the integration code.
%did%
%dpid_data source id%
The data source id corresponds to the identifier for a data source passed in to the macro.
Let's look at how this works in a simple example. In this case, we have an Audience Manager partner with the following IDs and conditions:
- Data source ID:
1
- An internal customer ID:
CustomerABC
- Declared ID: The partner wants to pass in these values as the declared ID
1:CustomerABC
.
To do this with the %dpid_data source id%
, the Audience Manager partner would format the macro like this:
%dpid_1%
The macro will replace 1
with CustomerABC
.
${GDPR}
${GDPR_CONSENT_XXXX}
XXXX
with the destination partner ID. See Audience Manager Plug-in for IAB TCF for details.%http_proto%
Detects the protocol used in the parent webpage and inserts it into the destination URL. For example:
- if the webpage is https://aam_client.com, this macro will be replaced with https://url-destination.com
- if the webpage is http://aam_client.com, this macro will be replaced with http://url-destination.com
%mcid%
%region%
%rnd%
%timestamp%
Cache Busting with Destination Macros destination-cache-busting
The %rnd%
and %timestamp%
macros insert unique values into a URL string to prevent browser caching.
Cache Busting with %rnd%
and %timestamp%
dest-cache-busting
Browsers cache (save) frequently requested content in memory. When a page loads, saved content serves from the cache rather than from a remote server. This process helps maintain efficient download times because data serves locally rather than from another location. However, because caching does not require a server call, it can skew reporting by artificially lowering the number of unique requests.
Cache busting prevents browsers from saving and reusing content. This technique uses code that inserts a random number or time stamp into a URL string, which makes it look unique to the browser. As a result, each HTTP
call is counted as a separate request to the server. Forcing a new server call for each request helps maintain reporting accuracy and reduce discrepancies. Audience Manager provides two macros for cache busting:
%rnd%
: Inserts a random number into a URL.%timestamp%
: Inserts the Unix date/time into a URL.
Comparing %rnd%
and %timestamp%
compare-rnd-timestamp
Both macros prevent caching, but %rnd%
may be more efficient. For example, with %timestamp%
, if several users view a page simultaneously they’ll get the same date/time value. As a result, the URL is not unique and multiple calls are counted only once. However, %rnd%
generates a unique numeric value for each call (even when users see the same page simultaneously). This means the URL string contains different values and is counted as unique.