Using Macros in Destinations

Last Updated: Jan 17, 2016 10:45PM PST

Overview

Destinations are groupings of up to 5 destination URLs based on platform and app install state for your SmartTag campaigns: 
  • iOS deeplink
  • iOS fallback URL
  • Android deeplink
  • Android fallback URL
  • Web URL 
For majority of use cases these URLs will be static. For example if you are running a promotional email campaign for your summer sale event and have a landing page for it on your applications and website, you can set each URL to land users on the landing page: 
  • iOS deeplink: myiosapp://summer_sale_event
  • iOS fallback URL: https://itunes.apple.com/us/app/myiosapp
  • Android deeplink: myandroidapp://summer_sale_event
  • Android fallback URL: http://play.google.com/store/apps/details?id=com.mysite.myandroidapp
  • Web URL: http://www.mysite.com/summer_sale_event.html
There are cases however where you want to dynamically land users on URLs based on a user's characteristics, for example: 
  • Name of the network the user was attributed to - e.g. Tapcommerce
  • Name of the campaign the user was attributed to - e.g. Summer Sale Event
  • The product ID associated to the ad the user clicked on - e.g. white_blender_3927
To create dynamic destination URLs, you can use supported Apsalar macros. Macros are special placeholders for values such as network name, and are replaced with the actual value for a particular user upon redirect. 

Available Macros

Standard Macros

Apsalar provides a comprehensive list of macros, covering all values related to attribution source, such as network, campaign name, creative, etc. For a full list and description of macros please refer to our postback macros list

As an example, you can use the creative name macro in the app deeplink URL, which will pass the name of the creative the user clicked to the app and enables your application to parse out the value and land the user on a landing page specific to that creative. 

For example, if the user clicked on a creative named "summer_sale_event", and you have a customized landing page in your iOS app for this creative, simply set your iOS deeplink URL to: 
myiosapp://promotions/{CREATIVE}

where {CREATIVE} is the Apsalar macro for creative name, and is replaced with "summer_sale_event" upon redirect from click to destination, landing the user on: 

myiosapp://promotions/summer_sale_event

Passthrough Macros 

In some use cases, the destination URL for the user may vary based on data available to the network that is not covered by default Apsalar macros. Passthrough macros allow the network to pass any parameter value to Apsalar on the click and Apsalar to pass the value on the destination URL. 

For example, imagine you are running a re-engagement campaign where the ad network is dynamically changing the product IDs to advertise depending on user's past behavior. If the user has previously added a blender to their cart and never purchased, the retargeting network may show her a creative for the same blender, wanting to land the user on the blender page so the user can complete the purchase. Much like website URLs, with deeplink URLs you can create paths in your application to a specific product page - for example you may have the following template for your deeplink URLs on iOS: 
myiosapp://category/<category name>/product/<product ID>
You can then modify your SmartTag click URLs to have the network pass the category name and product IDs on each click, based on what creative they showed the user: 
http://ad.apsalar.com/api/v1/ad?product_id=[psku]&product_category=[pc]&st=823292151188&idfa=[ifa]
When the user clicks this SmartTag, the network will replace its own macros ([pn] and [pc]) with corresponding product name and product category values. An example of a fully substituted SmartTag click is: 
http://ad.apsalar.com/api/v1/ad?product_id=white_blender_3927&product_category=blenders&st=823292151188&idfa=A162F2F6-B236-4D8B-8311-6E01BBED0776

You also need to set up your destinations URL to use passthrough macros. Passthrough macros are essentially constructed by taking the parameter name you are interested in from the click, and surrounding it with curly brackets. To follow our example, the iOS Deeplink URL for your Destination will look like:

myiosapp://category/{product_category}/product/{product_id}

where {product_category} and {product_id} are passthrough macros. In the example click above, the user will be redirected to the following URL once passthrough macros are substituted: 

myiosapp://category/blenders/product/white_blender_3927
 
 


 
support@apsalar.com
http://assets0.desk.com/
apsalarinc
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
Invalid characters found
/customer/en/portal/articles/autocomplete