Passing Values to Offer URLs
shkumbin bunjaku avatar
Written by shkumbin bunjaku
Updated over a week ago

When tracking a click, many instances either the advertiser or affiliate would like to pass through values to the landing page, be it the session transaction ID, and affiliate sub ID passed from the affiliate tracking link, or custom variables used to pre-populate the forms on the landing page. All of these scenarios involve setting up your offer URLs with the ability to pass through values to the landing page.

Once the click has been registered in the ad server and verified what URL that the user is redirecting to, it will check to see what valid macros are in the offer URL, and it will replace these macros with the actual value in the system.

  • Setting Up Offer URLs

  • Supported Macros to Be Passed

  • Mobile Tracking Macros

  • Passing Geo-Location of City, Region/State, and Country to Offer URL

  • Further Reading

Setting Up Offer URLs

To pass values to the advertiser, we need to set the macros in place so that the ad server knows what values to pass where. There are two sources that values can be passed from: the affiliate tracking link, or from the session itself. Values passed from the affiliate include values like sub IDs, source values, and what creatives/offer URLs the tracking link is associated with. There values are passed from parameters in the affiliate tracking link:

http://demo.go2cloud.org/aff_c?offer_id=1&aff_id=1&aff_sub=demo&file_id=45

If you want to pass these values to the offer URL, or the webpage/URL that you are sending tracking to, you would want to add the matching macros to:

http://demolandingpage.com/lp/3474?affiliate={affiliate_id}&offer={offer_id}&sub={aff_sub}&banner={file_id}

The result is the following output:

http://demolandingpage.com/lp/3474?affiliate=1&offer=1&sub=demo&banner=45

What the ad server will do is take the values passed from the parameters in the tracking link and pass that to the corresponding macros in the offer URL, as well as store those values in the session. None of the macros are required to be passed to track conversions, the only exception being the {transaction_id} macro that is required to track for postback offers. {affiliate_id} is required to track for offers that use postback with affiliate ID.

Supported Macros to Be Passed

Below is a list of all the available macros that can be added to an offer URL.

Macro Description

{advertiser_id} ID of advertiser

{advertiser_ref} Reference ID for advertiser

{adv_sub} Advertiser sub specified in the conversion pixel / URL

{aff_sub} Affiliate sub specified in the tracking link

{aff_sub2} Affiliate sub 2 specified in the tracking link

{aff_sub3} Affiliate sub 3 specified in the tracking link

{aff_sub4} Affiliate sub 4 specified in the tracking link

{aff_sub5} Affiliate sub 5 specified in the tracking link

{affiliate_id} ID of affiliate {affiliate_name} Company name of affiliate

{affiliate_ref} Reference ID for affiliate

{currency} 3 digit currency abbreviated

{date} Current date of conversion formatted as YYYY-MM-DD

{datetime} Current date and time of conversion formatted as YYYY-MM-DD HH:MM:SS

{device_id} For mobile app tracking, the ID of the user's mobile device

{file_name} Name of creative file for offer

{goal_id} ID of goal for offer

{ip} IP address that made the conversion request

{payout} Amount paid to affiliate for conversion

{offer_file_id} ID of creative file for offer

{offer_id} ID of offer

{offer_name} Name of offer

{offer_ref} Reference ID for offer

{offer_url_id} ID of offer URL for offer

{ran} Randomly generated number

{sale_amount} Sale amount generated for advertiser from conversion

{session_ip} IP address that started the tracking session

{source} Source value specified in the tracking link

{time} Current time of conversion formatted as HH:MM:SS

{transaction_id} ID of the transaction for your network. Don't get confused with an ID an affiliate passes into aff_sub

Mobile Tracking Macros

Along with the above set of macros, you also can pass through these supported macros to the advertiser. These are helpful to pass unique identifiers to another tracking provider like MobileAppTracking that can use them to attribute installs better.

Macro Description

{google_aid} The Google advertiser ID

{android_id} The ANDROID ID for Android devices only. The value should be formatted as lower case. More Info

{android_id_md5} The Android ID of the Android device hashed with MD5 algorithm

{android_id_sha1} The Android ID of the Android device hashed with SHA1 algorithm

{device_brand} The brand name of the mobile device (example: Apple)

{device_id} The DEVICE ID of the Android device iOS UDID is deprecated as of May 1, 2013.See the UDID Deprecation Plan for further details

{device_id_md5} The DEVICE ID of the Android device hashed with MD5 algorithm. The value should be generated based on the original value lower case. md5(aaaaaaaa1111111)

{device_id_sha1} The DEVICE ID of the Android device hashed with SHA1 algorithm. The value should be generated based on the original value lower case. sha1(aaaaaaaa1111111)

{device_model} Model of the mobile device (example: iPhone)

{device_os} operating system of the device (example: iOS)

{device_os_version} The numerical version of the device operating system (example: 4.3.2)

{ios_ifa} Apple’s advertiser identifier with iOS 6+. More Info

{ios_ifa_md5} The IFA ID of the iOS device hashed with MD5 algorithm

{ios_ifa_sha1} The IFA of the iOS device hashed with SHA1 algorithm

{ios_ifv} Apple’s vendor identifier with iOS 6+

{mac_address} The MAC address of the phone’s wifi adapter formatted as upper case with colons. AA:BB:CC:DD:EE:FF

{mac_address_md5} The MAC address of the phone’s wifi adapter hashed with MD5 algorithm. The value should be generated based on uppercase characters with : separating colons. md5(AA:BB:CC:DD:EE:FF)

{mac_address_sha1} The MAC address of the phone’s wifi adapter hashed with Sha1 algorithm

{odin} The ODIN of the device which is the the MAC address of the phone's wifi adapter in a binary array and then hashed with SHA1 algorithm

{open_udid} The OpenUDID of the device

{unid} The unid is not a specific device identifier, but a catch all for all of the above unique identifiers

{user_id} ID generated by app developer (advertiser) that is the same ID of the user in their system

Passing Geo-Location of City, Region/State, and Country to Offer URL

Geo location information of city, state or region, and country can be dynamically passed to offer landing pages. Geo-location information is provided by Digital Element. Digital Element provides 99.8% accurate geo location information based on user's IP address. Simply include one or more of the variables below in offer URLs for offers and the ad servers will replace the variable with the appropriate user information on click.

  • City: Add {city} in the Offer URL and it will be replaced by the city of the user based on their IP address.

  • Region Code: Add {region_code} in the Offer URL and it will be replaced by the region code of the user based on their IP address. Such as "NY" for New York.

  • Country Code: Add {country_code} in the Offer URL and it will be replaced by the county code of the user based on their IP address. Such as "US" for United States.

Sample Offer URL:

http://www.exampleoffer.com/index.php?city={city}®ion={region_code}&country={country_code}

The ad server will then replace the variables dynamically in the offer URL and send users to the landing page. Sample landing page URL:

http://www.exampleoffer.com/index.php?city=Seattle®ion=WA&country=US

Further Reading

If you want to read more about passing values between networks, take a look at our article on passing values between platforms, which explains the concept of passing values from tracking links to offer URLs further:

Passing Optional Parameters To Pass Information Cross-Platform →

Did this answer your question?