Offer URLs carry information about clicks from you to your advertiser through a combination of parameters, values, and macros. You can pass values like transaction IDs, partner sub IDs, and various mobile device identifiers through to the landing page.
In this article, we go over how to set up your offer URLs to pass information into your advertiser’s parameters. At the bottom, we also include reference tables of all the macros you can use in an offer URL.
This article is part of our Platform Basics series.
Inserting Macros in Offer URLs
If your advertiser wants a value stored by TUNE, insert the macro for that data in the corresponding parameter. Work with your advertiser to ensure that any data you insert using macros matches up with their expectations for each parameter of the offer URL.
Some values stored by TUNE come from external sources. When using macros for these values, the values must also be requested from your publisher via parameters in the partner tracking link. Common values requested and stored include partner sub-IDs, Apple advertising IDs, and Google advertising IDs.
Example: Mobile Tracking Macros
Your advertiser wants to internally validate mobile attribution data based on using Google advertising IDs. The advertiser needs to track in real-time, so they request the data from you via parameters in the offer URL.
Because the Google advertising ID comes from the publisher, it needs to be requested via the partner tracking link. To do this, you append the appropriate parameter (google_aid) to the partner tracking link. You also give it a placeholder value (like “GOOGLEAID”) so your publisher knows where to provide the value:
http://demo.go2cloud.org/aff_c?offer_id=1001&aff_id=2002&google_aid=GOOGLEAID
Now to forward the data, you set up the offer URL. Let’s say you receive the following offer URL from your advertiser:
http://www.advertisersite.com/landing?offerid=OFFERID&trans=TRANSACTIONID &googleaid=GOOGLEAID
In the above link, the two bolded placeholder values come from TUNE, so you replace them with the corresponding TUNE macros {offer_id} and {transaction_id}:
http://www.advertisersite.com/landing?offerid={offer_id}&trans={transaction_id}&googleaid=GOOGLEAID
The third value being requested in the link is a user’s Google advertising ID. To include this information, you insert the TUNE macro corresponding to that advertising ID ({google_aid}) as the value for your advertiser’s parameter:
http://www.advertisersite.com/landing?offerid={offer_id}&trans={transaction_id}&googleaid={google_aid}
At this point, you can insert the offer URL into your offer. Then when a click happens, TUNE replaces macros in the above offer URL with their respective values before sending data to your advertiser’s tracking system.
Table of Macros
The following TUNE macros can be used in offer URLs:
Macro | Description |
---|---|
{advertiser_id} | The ID of an advertiser for the offer |
{advertiser_ref} | Reference ID of an advertiser for the offer |
{aff_click_id} | Publisher click ID specified in the tracking link |
{aff_id} | The ID of a partner promoting the offer |
{aff_sub} | Publisher sub ID specified in the tracking link |
{aff_sub2} | Publisher sub ID 2 specified in the tracking link |
{aff_sub3} | Publisher sub ID 3 specified in the tracking link |
{aff_sub4} | Publisher sub ID 4 specified in the tracking link |
{aff_sub5} | Publisher sub ID 5 specified in the tracking link |
{aff_unique1} | Publisher unique value 1 specified in the tracking link |
{aff_unique2} | Publisher unique value 2 specified in the tracking link |
{aff_unique3} | Publisher unique value 3 specified in the tracking link |
{aff_unique4} | Publisher unique value 4 specified in the tracking link |
{aff_unique5} | Publisher unique value 5 specified in the tracking link |
{affiliate_id} | The ID of the partner promoting the offer |
{affiliate_name} | Name of partner promoting the offer |
{affiliate_ref} | Reference ID of partner promoting the offer |
{city} | The city where the click came from |
{country_code} | User’s ISO two-letter country code provided by Digital Element based on IP address. For example, “US” for the United States |
{currency} | Three-letter ISO currency abbreviation |
{date} | Current date is formatted as YYYY-MM-DD |
{datetime} | Current date and time formatted as YYYY-MM-DD HH:MM:SS |
{file_id} | The ID of the creative file used in TUNE |
{file_name} | Name of the creative file used for the offer |
{ip} | The IP address that started the click session |
{mobile_carrier} | Name of user’s mobile carrier |
{offer_file_id} | The ID of the creative file used for the offer |
{offer_id} | Offer’s ID in TUNE |
{offer_name} | Offer’s name in TUNE |
{offer_ref} | Offer’s reference ID in TUNE |
{offer_url_id} | The ID of the offer URL used in the session |
{payout} | Offer payout to the publisher |
{ran} | Randomly generated number |
{referer} | Referring URL of an HTTP request that started the click session |
{region_code} | User’s ISO two-letter region code provided by Digital Element based on IP address. For example, “NY” for New York state |
{revenue} | Revenue from advertiser |
{source} | The publisher’s traffic source specified in the tracking link |
{time} | Current time formatted as HH:MM:SS |
{transaction_id} | TUNE transaction ID |
{user_agent} | URL-encoded user agent string determined at the time of click |
Mobile Tracking Macros
When you want to store additional information about the attribution of mobile app installs or events, you can do so using our mobile tracking parameters. The TUNE mobile tracking macros correspond to those parameters and are often used to communicate unique identifiers to another tracking system for attribution validation.
In your offer URLs, you can support mobile device attribution using the following mobile tracking macros:
Macro | Description |
---|---|
{device_brand} | Brand name of user’s device from user agent string (example: Apple) |
{device_model} | The model name of the user’s device from the user agent string (example: iPhone) |
{device_os} | OS name of user’s device from user agent string (example: iOS) |
{device_os_version} | OS version of user’s device from user agent string (example: 4.3.2) |
{google_aid} | Google Android advertising identifier used to attribute clicks to installs for apps in the Google Play store |
{google_aid_sha1} | SHA1 hash of the Google Android advertising ID |
{ios_ifa} | Apple iOS advertising identifier (iOS 6+) |
{ios_ifa_sha1} | SHA1 hash of iOS device’s IFA ID |
{ios_ifv} | Apple iOS vendor identifier (iOS 6+) |
{unid} | A catch-all for unknown mobile device identifiers |
{user_id} | Application-specific user ID (generated by the app developer) |
{windows_aid} | Windows device advertising identifier |
{windows_aid_sha1} | SHA1 hash of the Windows advertising ID |