Macros in Postback URLs

The following list shows the macros and available functions that the Attribution Analytics platform supports in your Postback URLs. When you use these macros and functions, Attribution Analytics dynamically resolves/replaces them with their corresponding values before notifying the specified postback URL.

For information about configuring postback URLs, please visit Setting Up Postback URLs.

URL Macros

We've grouped our macros into categories based on where the information is being collected as well as what type of information is being collected.
Collected on Click

Values that your advertising partners can set on click of your measurement URL.

Collected on Conversion

Values that can be collected once a conversion occurs (i.e. an install or an in-app event).

Unique Identifiers

The unique identifier values are device-specific values that enable the identifier matching attribution method when collected on click and conversion.

Datetime Macros

The date and time values are collected on conversion, click and impression. All output is in UTC.

Click Macros

***All postback macros can be hashed/encrypted using a variety of postback URL functions. For information about the available postback URL functions applicable to the following postback macros, see the URL Function Macros section below.***

Advertiser Info Macros

Macro Data Source Description
{campaign_id} TUNE Link ID of the campaign in the Attribution Analytics platform (the same as the "offer_id" parameter in the TUNE link.
{campaign_name} TUNE Link Name of campaign in the Attribution Analytics platform.
{campaign_url_id} TUNE Link ID of the campaign URL, also called a destination URL.
{my_ad} TUNE Link Value of "my_ad" passed into TUNE link on click by the advertiser.
{my_ad_name} TUNE Link The name of "my_ad_name" passed into TUNE link on click by the advertiser.
{my_adgroup} TUNE Link Value of "my_adgroup" passed into TUNE link on click by the advertiser.
{my_adgroup_name} TUNE Link The name of "my_adgroup_name" passed into TUNE link on click by the advertiser.
{my_campaign} TUNE Link Value of "my_campaign" passed into TUNE link on click by the advertiser.
{my_campaign_name} TUNE Link The name of "my_campaign_name" passed into TUNE link on click by the advertiser.
{my_keyword} TUNE Link Value of "my_keyword" passed into TUNE link on click by the advertiser.
{my_keyword_name} TUNE Link The name of "my_keyword_name" passed into TUNE link on click by the advertiser.
{my_placement} TUNE Link Value of "my_placement" passed into TUNE link on click by the advertiser.
{my_placement_name} TUNE Link The name of "my_placement_name" passed into TUNE link on click by the advertiser.
{my_publisher} TUNE Link Value of "my_publisher" passed into TUNE link on click by the advertiser.
{my_publisher_name} TUNE Link The name of "my_publisher_name" passed into TUNE link on click by the advertiser.
{my_site} TUNE Link Value of "my_site" passed into TUNE link on click by the advertiser.
{my_site_name} TUNE Link The name of "my_site_name" passed into TUNE link on click by the advertiser.

Agency/Partner/Publisher Info Macros

Macro Data Source Description
{agency_name} TUNE Link Name of the Agency in Attribution Analytics (to whom the install or event is attributed).
{publisher_id} TUNE Link ID of the Partner in Attribution Analytics (to whom the install or event is attributed).
{publisher_name} TUNE Link Name of the Partner in the Attribution Analytics platform.
{publisher_ref_id} TUNE Link Value of the reference ID from a third-party system (third-party click ID) included in TUNE link on click.
{publisher_sub1} TUNE Link Value of the sub 1 parameter included in TUNE link on click by the partner/publisher.
{publisher_sub2} TUNE Link Value of the sub 2 parameter included in TUNE link on click by the partner/publisher.
{publisher_sub3} TUNE Link Value of the sub 3 parameter included in TUNE link on click by the partner/publisher.
{publisher_sub4} TUNE Link Value of the sub 4 parameter included in TUNE link on click by the partner/publisher.
{publisher_sub5} TUNE Link Value of the sub 5 parameter included in TUNE link on click by the partner/publisher.
{sub_ad} TUNE Link Partner's value of "sub_ad" passed into TUNE link on click by the partner/publisher.
{sub_ad_name} TUNE Link The name of the partner's value of "sub_ad_name" passed into TUNE link on click by the partner/publisher.
{sub_adgroup} TUNE Link Partner's value of "sub_adgroup" passed into TUNE link on click by the partner/publisher.
{sub_adgroup_name} TUNE Link The name of the partner's value of "sub_adgroup_name" passed into TUNE link on click by the partner/publisher.
{sub_campaign} TUNE Link Partner's value of "sub_campaign" passed into TUNE link on click by the partner/publisher.
{sub_campaign_name} TUNE Link The name of the partner's value of "sub_campaign_name" passed into TUNE link on click by the partner/publisher.
{sub_keyword} TUNE Link Partner's value of "sub_keyword" passed into TUNE link on click by the partner/publisher.
{sub_keyword_name} TUNE Link The name of the partner's value of "sub_keyword_name" passed into TUNE link on click by the partner/publisher.
{sub_placement} TUNE Link Partner's value of "sub_placement" passed into TUNE link on click by the partner/publisher.
{sub_placement_name} TUNE Link The name of the partner's value of "sub_placement_name" passed into TUNE link on click by the partner/publisher.
{sub_publisher} TUNE Link Partner's value of "sub_publisher" passed into TUNE link on click by the partner/publisher.
{sub_publisher_name} TUNE Link The name of the partner's value of "sub_publisher_name" passed into TUNE link on click by the partner/publisher.
{sub_site} TUNE Link Partner's value of "sub_site" passed into TUNE link on click by the partner/publisher.
{sub_site_name} TUNE Link The name of the partner's value of "sub_site_name" passed into TUNE link on click by the partner/publisher.

Device Info Macros

Macro Data Source Description
{click_device_brand} TUNE Link Brand or make of user device (such as "Apple" or "Samsung") recorded on click.
{click_device_model} TUNE Link Model of the user device (such as "Droid Pro") recorded on click.
{click_transaction_id} TUNE Link ID of the transaction recorded on click.
{gclid} TUNE Link Case sensitive Google Click ID from click.
{session_device_id} TUNE Link ID of the device from click.
{session_device_ip} TUNE Link IP address of the device from click.
{session_referrer} TUNE Link Referrer for the device from click.
{session_user_agent} TUNE Link User-agent for the device from click.

 

Conversion Macros

***All postback macros can be hashed/encrypted using a variety of postback URL functions. For information about the available postback URL functions applicable to the following postback macros, see the URL Function Macros section below.***

Internal Attribution Analytics Info Macros

Macro Data Source Description
{ad_network_id} TUNE SDK or S2S ID of the ad network account in the Attribution Analytics platform.
{advertiser_id} TUNE SDK or S2S ID of the advertiser account in the Attribution Analytics platform.
{advertiser_name} TUNE SDK or S2S Name of advertiser account in the Attribution Analytics platform.
{advertiser_ref_id} TUNE SDK or S2S An optional parameter specified with SDK implementation, used for reconciliation (for example, an order number if measuring a purchase).
{agency_id} TUNE SDK or S2S Numerical identifier of the agency connected to the advertiser account in the Attribution Analytics platform.
{site_event_id} TUNE SDK or S2S ID of the event in the Attribution Analytics platform.
{site_event_offset} TUNE SDK or S2S Increment of logs per specific event by user; starts at 0 and increases by ones.
{site_event_type} TUNE SDK or S2S The type of event of the site (mobile app) in the Attribution Analytics platform.
{site_id} TUNE SDK or S2S ID of the site (mobile app) in the Attribution Analytics platform.
{site_name} TUNE SDK or S2S The name of the site (mobile app) in the Attribution Analytics platform.
{site_ref_id} TUNE SDK or S2S The reference ID of the site (mobile app) in the Attribution Analytics platform.
{store_app_id} TUNE SDK or S2S Value of the Apple iTunes App ID; set in the Attribution Analytics platform; valid for iOS apps only.
{tracking_id} TUNE SDK or S2S ID of the measurement session created on click of measurement URL.
{transaction_id} TUNE SDK or S2S ID of the transaction recorded on conversion.

Device/App Specific Info Macros

Macro Data Source Description
{altitude} TUNE SDK or S2S The altitude or height above sea level of the device at time of install.
{app_version} TUNE SDK or S2S The version of the app itself; as set up by the app developer in the app's code. For more info: Android, iOS
{authentication_method} TUNE SDK or S2S The method (email, Twitter, Google) used for authentication, based on the set "user_id" value (user_email, twitter_user_id, google_user_id).
{conversion_referral} TUNE SDK or S2S Referral URL to the conversion. On Android app installs, this value is the Google Install Referrer.
{conversion_status} TUNE SDK or S2S The status of the conversion.
{conversion_user_agent} TUNE SDK or S2S User-agent for the device that created the conversion.
{country_code} TUNE SDK or S2S Two-character abbreviated country code that user is located in (on conversion).
{device_brand} TUNE SDK or S2S Brand or make of user device (such as "Apple" or "Samsung").
{device_carrier} TUNE SDK or S2S Carrier (service provider) for the device (such as "Verizon Wireless").
{device_ip} TUNE SDK or S2S IP address of the user device, recorded on conversion (e.g. on install).
{device_model} TUNE SDK or S2S Model of the user device (such as "Droid Pro"), recorded on conversion.
{device_type} TUNE SDK or S2S Type of device used by user (such as desktop, android phone, android tablet, iOS phone, iOS tablet, windows phone, windows tablet, other, unknown).
{language} TUNE SDK or S2S Name of the language used on the user device.
{latitude} TUNE SDK or S2S The latitude or angular distance of a place north or south of the earth's equator of the device at time of install.
{longitude} TUNE SDK or S2S The longitude or angular distance of a place east or west of the Prime Meridian of the device at time of install.
{match_type} TUNE SDK or S2S Attribution method used; possible values include referrer, fingerprint, identifier, identifier_post, iAd_integration, inline, NULL, or Not Available.
{mobile_app_type} TUNE SDK or S2S Type of mobile app (such as 'web', 'ios', or 'android').
{os_version} TUNE SDK or S2S Version of operating system on the user device.
{package_app_name} TUNE SDK or S2S Name of application defined in the package (such as "Words with Friends").
{package_app_version} TUNE SDK or S2S Version of the application defined in the package (such as "2.1").
{package_name} TUNE SDK or S2S Name of the package for Android or Bundle ID on iOS (such as "com.zynga.words").
{region} TUNE SDK or S2S The geographic location (such as the name of a state or province) within a country where the click occurred (that led to an install or other event), generally derived from the device's IP address. For more information about this parameter, please visit Determining Country and Region.
{sdk} TUNE SDK or S2S Type of SDK (such as 'ios' or 'android').
{user_agent} TUNE SDK or S2S The User-Agent string format including product name and version and system (e.g. "Mozilla/5.0 (iPad)") .

In-App Event Macros

Macro Data Source Description
{attribute_sub1} TUNE SDK or S2S Value of a particular event attribute set by you.
{attribute_sub2} TUNE SDK or S2S Value of a particular event attribute set by you.
{attribute_sub3} TUNE SDK or S2S Value of a particular event attribute set by you.
{attribute_sub4} TUNE SDK or S2S Value of a particular event attribute set by you.
{attribute_sub5} TUNE SDK or S2S Value of a particular event attribute set by you.
{content_id} TUNE SDK or S2S ID of the content interacted with during an in-app event.
{content_type} TUNE SDK or S2S The type of content interacted with during an in-app event.
{date1} TUNE SDK or S2S Time of check-in for the in-app event "reservation".
{date2} TUNE SDK or S2S Time of check-out for the in-app event "reservation".
{event_name} TUNE SDK or S2S Name of the event in the Attribution Analytics platform.
{event_type} TUNE SDK or S2S The type of in-app event measured; e.g. "reservation".
{level} TUNE SDK or S2S The event level achieved
{purchase_status} TUNE SDK or S2S The status of the in-app purchase validation through the relevant app store.
{quantity} TUNE SDK or S2S The count related to an in-app event; e.g. number of guests or credits spent.
{rating} TUNE SDK or S2S The rating related to an in-app event; e.g. a 4 star rating.
{search_string} TUNE SDK or S2S Search terms, keywords or query formatted as a string.
{view_max} TUNE SDK or S2S Length of ad content in seconds, set on first impression request.
{view_percent} TUNE SDK or S2S Highest percent complete of the ad that user reached prior to an attribution.

Event Item Macros

Macro Data Source Description
{event_item_names_json} TUNE SDK or S2S Each item name formatted as json array.
{event_item_names_string} TUNE SDK or S2S Each item name formatted in a comma separated string.
{event_item_ref_json} TUNE SDK or S2S Each item reference ID formatted as json array.
{event_item_ref_string} TUNE SDK or S2S Each item reference ID formatted in a comma separated string.
{event_items_count} TUNE SDK or S2S The count of the number of items in the event item array.
{event_items_json} TUNE SDK or S2S JSON display payload of site event items.

Revenue Related Macros

Macro Data Source Description
{currency_code} TUNE SDK or S2S Currency code of revenue using ISO 4217 currency codes.
{iap_receipt} TUNE SDK or S2S Value of receipt passed from Android or iOS SDK used to validate IAP server-side.
{iap_receipt_md5} TUNE SDK or S2S MD5 hash of the above. This hash must be a unique value per purchase and can be used like an ID for the purchase.
{payout} TUNE SDK or S2S Payout amount for partner (in USD).
{revenue_usd} TUNE SDK or S2S Revenue generated from the conversion using the current day's exchange rate.
{revenue} TUNE SDK or S2S Revenue generated from the conversion as a floating point number.

Yes/No Answer Macros

Macro Data Source Description
{app_ad_tracking} TUNE SDK or S2S Set to 1 if user not opted out of ad tracking on the application level. Set to 0 if opted out of ad tracking on the application level.
{app_ad_tracking_disabled} TUNE SDK or S2S Set to 1 if opted out of ad tracking on the application level. Set to 0 if user is not opted out of ad tracking on the application level.
{is_assist} TUNE SDK or S2S Set to 1 if partner assisted with, but is not responsible for conversion; set to 0 otherwise.
{is_attributed} TUNE SDK or S2S Set to 1 if the install or event is attributed to the same partner as the postback partner; set to 0 otherwise.
{is_first_event} TUNE SDK or S2S Set to 1 if the event logged is the user's first log for that specific event; set to 0 otherwise.
{is_first_purchase} TUNE SDK or S2S Set to 1 if the event logged where the revenue is greater than 0 is the user's first log for that specific event; set to 0 otherwise.
{is_install_attributed} TUNE SDK or S2S Set to 1 if the partner attributed with the event is the same as postback partner; set to 0 otherwise.
{is_reengagement} TUNE SDK or S2S Set to 1 if the event is with re-engagement; set to 0 otherwise.
{is_view_through} TUNE SDK or S2S Set to 1 if a view-through conversion; set to 0 otherwise.
{nonwindowed_attribution} TUNE SDK or S2S Set to 1 if click occurs outside of partner attribution window, but inside Attribution Analytics’s attribution window; set to 0 otherwise.
{os_jailbroke} TUNE SDK or S2S Set to 1 if iOS device is jailbroken; set to 0 otherwise.

 

Unique Identifiers

***All postback macros can be hashed/encrypted using a variety of postback URL functions. For information about the available postback URL functions applicable to the following postback macros, see the URL Function Macros section below.***

***In addition, all of the unique identifier macros below can be set either on click or on conversion. All unique identifier values set on conversion are prefixed with mat_ to differentiate them from the same value set on click. See Unique Identifiers on Click vs. Conversion for more information.***

Advertising Identifiers

Macro Data Source Description
{google_aid} TUNE Link & TUNE SDK/S2S The Google AID formatted as uppercase with hyphens. AAAAAA-BBBB-CCCC-11111-2222222222222. Also available as: {google_aid_alphanumeric}, {google_aid_alphanumeric_lower}, {google_aid_alphanumeric_lower_md5}, {google_aid_alphanumeric_lower_sha1}, {google_aid_lower}, {google_aid_md5}, {google_aid_md5_lower}, {google_aid_sha1}, {google_aid_sha1_lower}
{google_ad_tracking} TUNE Link & TUNE SDK/S2S If the "google_aid" parameter is used, then the "google_ad_tracking" parameter must be specified to indicate if the user has limited ad tracking (where 1 is not limited - google_Aid can be used for tracking).
{google_ad_tracking_disabled} TUNE Link & TUNE SDK/S2S Opposite of the above (where 0 is not limited).
{ios_ifa} TUNE Link & TUNE SDK/S2S The IFA formatted as uppercase with hyphens. AAAAAA-BBBB-CCCC-11111-2222222222222. Also available as: {ios_ifa_alphanumeric}, {ios_ifa_alphanumeric_lower}, {ios_ifa_alphanumeric_lower_md5}, {ios_ifa_alphanumeric_lower_sha1}, {ios_ifa_lower}, {ios_ifa_md5}, {ios_ifa_md5_lower}, {ios_ifa_sha1}, {ios_ifa_sha1_lower}
{ios_ifv} TUNE Link & TUNE SDK/S2S The IFV formatted as uppercase with hyphens. AAAAAA-BBBB-CCCC-11111-2222222222222. Also available as: {ios_ifv_alphanumeric}, {ios_ifv_alphanumeric_lower}, {ios_ifv_alphanumeric_lower_md5}, {ios_ifv_alphanumeric_lower_sha1}, {ios_ifv_lower}, {ios_ifv_md5}, {ios_ifv_md5_lower}, {ios_ifv_sha1}, {ios_ifv_sha1_lower}
{ios_ad_tracking} TUNE Link & TUNE SDK/S2S If the "ios_ifa" parameter is used, then the "ios_ad_tracking" parameter must be specified to indicate if the user has limited ad tracking (where 1 is not limited - ios_ifa can be used for tracking).
{ios_ad_tracking_disabled} TUNE Link & TUNE SDK/S2S Opposite of the above (where 0 is not limited).
{windows_aid} TUNE Link & TUNE SDK/S2S The Windows AID is an alphanumeric string and formatted as uppercase without colons. AAAAAABBBBCCCC111122222222222.

Device Identifiers

Macro Data Source Description
{android_id} TUNE Link & TUNE SDK/S2S A 64-bit number (as a hex string) that is randomly generated on the first boot of a device and typically remains constant for the lifetime of the device.Also available as: {android_id_md5}, {android_id_sha1}
{device_id} TUNE Link & TUNE SDK/S2S The DEVICE ID of the Android device (IMEI for GSM phones, MEID for CDMA phones, Serial ID for tablets without a cell radio).Also available as: {device_id_md5}, {device_id_sha1}, {device_id_sha256}
{mac_address} TUNE Link & TUNE SDK/S2S The MAC address of the WiFi adapter on the device, formatted as uppercase with colons. AA:BB:CC:DD:EE:FF Also available as: {mac_address_alphanumeric}, {mac_address_alphanumeric_lower}, {mac_address_alphanumeric_lower_md5}, {mac_address_alphanumeric_lower_sha1}, {mac_address_lower}, {mac_address_md5}, {mac_address_md5_lower}, {mac_address_sha1}, {mac_address_sha1_lower}
{mat_id} TUNE Link & TUNE SDK/S2S ID generated by SDK on app install.
{mixpanel_distinct_id} TUNE Link & TUNE SDK/S2S ID specific to Mixpanel clients.
{os_id} TUNE Link & TUNE SDK/S2S A 64-bit number (as a hex string) that is randomly generated on the first boot of a device and typically remains constant for the lifetime of the device.
{unid} TUNE Link & TUNE SDK/S2S Non-specific device identifier, but a "catch-all" for all of the unique identifiers for attribution set on click in measurement URL.

User Identifiers

Macro Data Source Description
{facebook_user_id} TUNE Link & TUNE SDK/S2S The ID of the user defined by Facebook.
{google_user_id} TUNE Link & TUNE SDK/S2S The ID of the user defined by Google.
{twitter_user_id} TUNE Link & TUNE SDK/S2S The ID of the user defined by Twitter.
{user_id} TUNE Link & TUNE SDK/S2S ID of user defined by advertiser.
{user_email} TUNE Link & TUNE SDK/S2S Email of user defined by advertiser. Available *only* hashed with MD5, SHA1 and SHA-256 algorithms.
{user_phone} TUNE Link & TUNE SDK/S2S Phone number of user defined by advertiser. Available *only* hashed with MD5, SHA1 and SHA-256 algorithms.
{username} TUNE Link & TUNE SDK/S2S Name of user defined by advertiser. Available *only* hashed with MD5, SHA1 and SHA-256 algorithms.

Datetime Macros

***All postback macros can be hashed/encrypted using a variety of postback URL functions. For information about the available postback URL functions applicable to the following postback macros, see the URL Function Macros section below.***

Macro Data Source Description
{click_date} TUNE Link & TUNE SDK/S2S Date of click formatted as YYYY-MM-DD.
{click_datetime} TUNE Link & TUNE SDK/S2S Date and time of click formatted as YYYY-MM-DD HH:MM:SS.
{click_time} TUNE Link & TUNE SDK/S2S Click time formatted as HH:MM:SS.
{click_timestamp_milliseconds} TUNE Link & TUNE SDK/S2S Click time formatted as UNIX timestamp in epoch milliseconds.
{click_timestamp} TUNE Link & TUNE SDK/S2S Click time formatted as UNIX timestamp.
{conversion_date} TUNE Link & TUNE SDK/S2S Conversion date formatted as YYYY-MM-DD; to be used in install postbacks.
{conversion_datetime-120} TUNE Link & TUNE SDK/S2S Conversion date (minus 120secs) and time formatted as YYYY-MM-DD HH:MM:SS; to be used in install postbacks.
{conversion_datetime-300} TUNE Link & TUNE SDK/S2S Conversion date (minus 300secs) and time formatted as YYYY-MM-DD HH:MM:SS; to be used in install postbacks.
{conversion_datetime} TUNE Link & TUNE SDK/S2S Conversion date and time formatted as YYYY-MM-DD HH:MM:SS; to be used in install postbacks.
{conversion_time} TUNE Link & TUNE SDK/S2S Conversion time formatted as HH:MM:SS.
{conversion_timestamp_milliseconds} TUNE Link & TUNE SDK/S2S Conversion time formatted as UNIX timestamp in epoch milliseconds.
{conversion_timestamp-120} TUNE Link & TUNE SDK/S2S Conversion time minus 120secs formatted as UNIX timestamp.
{conversion_timestamp-300} TUNE Link & TUNE SDK/S2S Conversion time minus 300secs formatted as UNIX timestamp.
{conversion_timestamp} TUNE Link & TUNE SDK/S2S Conversion time formatted as UNIX timestamp.
{date} TUNE Link & TUNE SDK/S2S Date formatted as YYYY-MM-DD.
{datetime} TUNE Link & TUNE SDK/S2S Date and time formatted as YYYY-MM-DD HH:MM:SS.
{impression_date} TUNE Link & TUNE SDK/S2S Impression date formatted as YYYY-MM-DD.
{impression_datetime} TUNE Link & TUNE SDK/S2S Impression date and time formatted as YYYY-MM-DD HH:MM:SS.
{impression_time} TUNE Link & TUNE SDK/S2S Impression time formatted as HH:MM:SS.
{impression_timestamp_milliseconds} TUNE Link & TUNE SDK/S2S Impression time formatted as UNIX timestamp in epoch milliseconds.
{impression_timestamp} TUNE Link & TUNE SDK/S2S Impression time formatted as UNIX timestamp.
{install_datetime} TUNE Link & TUNE SDK/S2S Conversion date and time of originating install formatted as YYYY-MM-DD HH:MM:SS; should be used in post-install event postbacks.
{time} TUNE Link & TUNE SDK/S2S Time formatted as HH:MM:SS.
{timestamp_milliseconds} TUNE Link & TUNE SDK/S2S Time formatted as UNIX timestamp in epoch milliseconds.
{timestamp} TUNE Link & TUNE SDK/S2S Time formatted as UNIX timestamp.

 

URL Function Macros

Along with our URL macros, we also support a variety of URL functions to be used in conjunction with our macros.  Using functions give you more control over how your data is formatted for your own internal uses.  What if you want to md5 encode {ios_ifa} twice? But we only have an internal macro for {ios_ifa_md5} which encodes it only once? Using our md5 function would allow you to do so immediately without an internal Attribution Analytics macro already being in place for your use.

We've grouped our functions into categories based on what type of action is being taken as well as what type of information is being handled.
Hashing/Encoding/etc.

Function macros that can hash, encode/decode or otherwise modify another macro's value; e.g. the md5 hash of a unique identifier.

Datetime

Function macros that return datetime information about another macro's value; e.g. the time of an in-app purchase event.

Attributed Partner

Function macros that return true and false values as an answer to whether or not a partner is attributed with the conversion or not.

In-App Event Items

Function macros that expose specific aspects of the items related to your in-app events; e.g. how many adults were included in a hotel reservation.

General Actions

Function macros that perform a variety of general use actions; e.g. modifying a boolean value into an integer.

NOTE: In those cases marked *, we support an equivalent standard macro . For example, you can use the {md5()} URL function to md5 encode Apple's Advertising Identifier ios_ifa - {md5(ios_ifa)} - or you can achieve the same results by using our standard {ios_ifa_md5} macro. If the function is not marked *, we do not support a standard macro to achieve the URL function results.

Hashing/Encoding/Etc. Function Macros

{alphanumeric()} Removes non-alphanumeric characters from a string;Example: {alphanumeric({mac_address})} returns the MAC address formatted as uppercase without colons. AABBCCDDEEFF

*is equivalent to our internally supported standard macro {mac_address_alphanumeric}

{base64_encode()} Exposes base64_encode() to TrackingUrl with tailing '=' trimmed;Example: {base64_encode({mac_address})} returns the MAC address base64 encoded.
{base64_urlsafe()} Exposes base64_urlsafe() to TrackingUrl;Example: {base64_urlsafe({mac_address})} returns the MAC address base64 URL safe.
{crc32()} Exposes crc32() to TrackingUrl;Example: {crc32({mac_address})} returns the MAC address crc32 checksummed.
{lower()} Exposes strtolower() to TrackingUrl;Example: {lower({mac_address})} {lower({mac_address})} returns the MAC address formatted as lowercase with separating colons. aa:bb:cc:dd:ee:ff

*is equivalent to our internally supported standard macro {mac_address_lower}

{md5()} Exposes md5() to TrackingUrl;

Example: {md5({mac_address})} returns the MAC address hashed based on uppercase characters with : separating colons.

*is equivalent to our internally supported standard macro {mac_address_md5}

{md5_base64()} Exposes md5_base64() to TrackingUrl;Example: {md5_base64({mac_address})} returns the MAC address hashed based on uppercase characters with separating colons and with base64 encoding.
{sha1()} Exposes sha1() to TrackingUrl;Example: {sha1({mac_address})} returns the MAC address hashed based on uppercase characters with separating colons.

*is equivalent to our internally supported standard macro {mac_address_sha1}

{sha256()} Exposes sha256 hash to TrackingUrl;Example: {sha256({mac_address})} returns the MAC address hashed based on uppercase characters with separating colons.
{upper()} Exposes strtoupper() to TrackingUrl;Example: {upper({mac_address})} returns the MAC address formatted as uppercase characters with separating colons.
{urldecode()} Exposes urldecode() to Urls;Example: {urldecode({mac_address})} returns the MAC address URL decoded.
{urlencode()} Returns back the provided input forcing url encoding to take place;Example: {urlencode({mac_address})} returns the MAC address URL encoded.

Datetime Function Macros

{calendarDate()} Format a DateTime value to only include the UTC date (yyyy/MM/dd) portion. Returns an empty string for missing data or data that is not a DateTime.Example: {calendarDate({date1})} returns the UTC Date for when the record for the click, install, or conversion.
{iso8601UTCDate()} Format a \DateTime value in ISO 8601 UTC. Returns an empty string for missing data or data that is not a \DateTime. As \DateTime doesn't store millisecond precision, milliseconds are hard-coded to 000.Example: {iso8601UTCDate({modified})} returns the UTC Date and Time with Milliseconds for when the record for the click, install, or conversion was last modified within Attribution Analytics.
{time()} Returns the current unix timestamp in secondsExample: {time()} Returns the the current unix timestamp in seconds.

Attributed Partner

{isAdnetworkAttributed()} Returns a boolean as a string specifying whether or not the attributed adnetwork matches the provided.Example: {isAdnetworkAttributed({ad_network_id})} returns whether or not (0,1) that ad network matches.
{isAgencyAttributed()} Returns a boolean as a string specifying whether or not the attributed agency matches the provided. Example: {isAgencyAttributed({agency_id})} returns whether or not (0,1) that agency matches.
{isAgencyPublisherAttributed()} Returns a boolean as a string specifying whether or not the attributed agency publisher matches the provided.Example: {isAgencyAttributed({publisher_id/agency_id})} returns whether or not (0,1) that agency publisher matches.

In-App Event Items

NOTE: All of the in-app event item function macros require the value of an attribute for a specific event item as an input into the function.

You can also include the value of an attribute for a specific item by index. To do so replace, (ITEM_NAME) with (indexX) where X is a valid index value.

Inputting a macro {} into the these functions will not return a valid response.

{event_item_quantity()} Exposes event_item quantity value to TrackingUrl.Example: {event_item_quantity(ITEM_NAME)} returns the quantity value for the related value provided.
{event_item_sub1()} Exposes event_item_sub1() to TrackingUrl.Example: {event_item_sub1(ITEM_NAME)} returns the value of Attribute 1 for the specified event item name.
{event_item_sub2()} Exposes event_item_sub2() to TrackingUrl.Example: {event_item_sub2(ITEM_NAME)} returns the value of Attribute 2 for the specified event item name.
{event_item_sub3()} Exposes event_item_sub3() to TrackingUrl.Example: {event_item_sub3(ITEM_NAME)} returns the value of Attribute 3 for the specified event item name.
{event_item_sub4()} Exposes event_item_sub4() to TrackingUrl.Example: {event_item_sub4(ITEM_NAME)} returns the value of Attribute 4 for the specified event item name.
{event_item_sub5()} Exposes event_item_sub5() to TrackingUrl.Example: {event_item_sub5(ITEM_NAME)} returns the value of Attribute 5 for the specified event item name.
{event_item_unit_price()} Exposes event_item_unit_price() to TrackingUrl.Example: {event_item_unit_price(ITEM_NAME)} returns the price of the specified event item name.
{event_item_unit_price_usd()} Exposes event_item_unit_price_usd() to TrackingUrl.Example: {event_item_unit_price_usd(ITEM_NAME)} returns the price in USD of the specified event item name.
{event_item_value()} Exposes event_item_value() to TrackingUrl.Example: {event_item_value(ITEM_NAME)} returns the value of the specified event item name.
{event_item_value_usd()} Exposes event_item_value_usd() to TrackingUrlExample: {event_item_value_usd(ITEM_NAME)} returns the value in USD of the specified event item name.

General Actions Function Macros

 

{boolToInt()} Casts a boolean string to it's integer counter part.

Example: {boolToInt({isAgencyAttributed})} returns 'true' = 1, not 'true' = 0.

{countryCodeIso3166()} Returns the ISO 3166-1 two letter country code. See the complete list of ISO 3166-1 codes.

Example: {countryCodeIso3166({country_code})} returns US for the United States of America.

{firstNotEmpty()} Gets the first value that isn't empty in a | delimited string.

Example: {firstnotempty({device_id}|{mac_address})} returns the value of {device_id} if it's not empty, otherwise returns {mac_address}.

{getPlatformAsInt()} Gets the platform as an integer ios = 0, android = 1, windows = 2.

Example: {getPlatformAsInt({mobile_app_type})} returns 0, 1, or 2 based on platform type of the mobile app provided.

{ip_country_code()} Ensures all the values of a provided json are retruned as strings.Returns a value shortened to 40 characters.

Example: {ip_country_code({device_ip})} returns the corresponding country code of origin - e.g "US"- for the IP address of the device the app was installed on.

{jsonValuesToString()} Ensures all the values of a provided json are retruned as strings.

Example: {jsonValuesToString({event_item_names_string})} returns a valid string of the event item name, even when the value is numeric.

{languageIso639()} Returns the ISO 639-1 two character language code. See the complete list of ISO 639-1 codes.

Example: {languageIso639({language})} returns EN for the English language.

{logical_and({}|{})} Performs the logic AND function on two boolean macros and returns a boolean value of 1 only when both boolean macros provided are true together at the same time; returns 0 otherwise.

Example: {logical_and({is_attributed}|{is_reengagement})} returns 1 when {is_attributed}|{is_reengagement}=(1,1) to signify that the conversion was attributed to you and was also a re-engagement event.

{mt_rand()} Returns a random value between between 0 and 2^31.
{QSGet(), key} Parses an encoded queryString and returns the value for a given key.

Example: {QSGet({conversion_referral}, referrer)} returns  "campaign%3dtacos%26mission%3dimpossible%26raining%3dcatsanddogs" where conversion_referral = "testapp://test_path?a=b&code=rideforbrand&referrer=campaign%3dtacos%26mission%3dimpossible%26raining%3dcatsanddogs"

{ternary()} A basic implementation of ternary functionality that uses | to separate parameters This function must receive 4 parameters or nothing will be returned. Given parameter 0 matches parameter 1, parameter 2 will be returned. Given parameter 0 does not match parameter 1, parameter 3 will be returned.

Example: {ternary(0|1|yes|no)} returns no as 0 and 1 do not match.

{truncate({macro},40)} Returns a value shortened to 40 characters in length.

Example: {truncate({advertiser_sub_campaign},40)} returns the value for advertiser_sub_campaign shortened to 40 characters long.



No Comments

Leave a reply