You can use Airbridge tracking links to measure the performance of referral marketing initiatives, such as share-the-campaign and invite-a-friend campaigns, and identify users who refer your service to others to reward them accordingly.
Here is a typical user scenario using an Airbridge tracking link as a shareable link to measure a referral campaign:
1. User A clicks a CTA button, such as a Share button or Invite a Friend button. A link will appear that the user can copy and share with others. This link will contain the user ID that can be used to identify User A for rewards.
2. User A shares the link with User B through email or messenger.
3. User B clicks the link.
When the app is not installed: User B is redirected to the app store where the app can be downloaded. By using deferred deep linking, User B can be redirected to a specific in-app location upon launching the app for the first time after the app install.
When the app is already installed: The app is launched on User B’s device. By using deep linking, User B can be redirected to a specific in-app location.
4. User A can be rewarded after User B installs and launches the app or performs a certain app event.
The following steps should be handled by a developer. Ask your developer for help.
1. Develop a CTA button so that when a user clicks the button, the Tracking Link API is called. Make sure the user ID of the user who clicks the CTA button is included in the tracking link. The following parameters shall be used.
Parameter |
Description |
---|---|
| The channel name you wish to look up in the Airbridge reports and raw data files to find the data collected through the tracking link should be entered. This channel name will be considered a Custom Channel name. |
| Campaign parameters such as |
| The in-app destination and the user ID of the user who clicked the CTA button should be entered. |
For a sample request, refer to the example below.
$ curl -d '{
{
"channel": "in_app_referral",
"campaignParams": {
"campaign": "referral-01",
"ad_group": "referral",
"ad_creative": "invitation"
},
"isReengagement": "ON-TRUE",
"deeplinkUrl": "ablog://good-product-growth-team?referrer_id=1668",
"deeplinkOption": {
"showAlertForInitialDeeplinkingIssue": true
},
"fallbackPaths": {
"option": {
"ios": "itunes-appstore",
"android": "google-play"
}
},
"ogTag": {
...
}
}
}' -X POST "'https://api.airbridge.io/v1/tracking-links" -H "Authorization:{AIRBRIDGE-API-TOKEN} -H "Content-Type: application/json
The above codes contains the following information.
channel
: The referral campaign data collected through the tracking link should be made available under the channel name in_app_referral
in the Airbridge reports and raw data files.
params
: The campaign name should be recorded as referral-01
, ad group name as referrral
, and the ad creative name as invitation
.
deeplinkURL
: Users who click the tracking link should be redirected to ablog://good-product-growth-team
. The user ID of the user who clicked the CTA button and created the shareable link is 1668
. If the user ID is 1700, the parameter value should be
ablog://good-product-growth-team?referrer_id=1700
.
2. The tracking link should be provided to the user who clicks the CTA button as a shareable link. We recommend providing the trackingLink.shortURL
parameter value from the Tracking Link API response as the shareable link, which follows the format as follows.
{default or custom domain}/{shortID}
To use your custom domain instead of abr.ge
, which is the default setting, refer to this article and configure your custom domain in the Airbridge dashboard.
For a sample response, refer to the example below.
{
"data": {
"trackingLink": {
"id": 77281,
"link": {
"click": new-tracking-link
},
"shortID": short-id,
"shortURL": new-short-tracking-link
"trackingTemplateID": template-id,
"channelType": "custom"
}
},
"at": 1585104275
}
Provide the trackingLink.shortURL
parameter value as the shareable link to the user who clicks the CTA button.
3. Configure the deep link callback to get the user ID of the user who clicked the CTA button. You can use the user ID to identify users who participated in your referral campaign and provide rewards.
Set up the deep link callback to parse the URI of the onSuccess
function.
referrer_id
: The user ID of the user who clicked the CTA button
Airbridge.getDeeplink(getIntent(), new AirbridgeCallback<Uri>() {
@Override
public void onSuccess(Uri uri) {
try {
Map<String, String> queryParameterMap = new HashMap<>();
for (String key : uri.getQueryParameterNames()) {
String value = uri.getQueryParameter(key);
if (value != null) {
queryParameterMap.put(key, value);
}
}
// Parsing referrerID
String referrerId = queryParameterMap.get("referrer_id");
// Show proper content using url (ablog://good-product-growth-team?referrer_id=1700) and referrerID (1700)
if (referrerId != null) {
}
} catch (Throwable e) {
// Handle exceptions here
}
}
...
Airbridge.getDeeplink(intent, object : AirbridgeCallback<Uri> {
override fun onSuccess(result: Uri) {
try {
val queryParameterMap = mutableMapOf<String, String>()
result.queryParameterNames.forEach { key ->
val value = result.getQueryParameter(key)
if (value != null) {
queryParameterMap[key] = value
}
}
// Parsing referrerID
// Show proper content using url (ablog://good-product-growth-team?referrer_id=1700) and referrerID (1700)
queryParameterMap["referrer_id"]?.let { referrerId ->
}
} catch (e: Throwable) {
// Handle exceptions here
}
}
...
Set up the deep link callback to parse the deeplinkURL
parameter.
referrer_id
: The user ID of the user who clicked the CTA button
[AirBridge.deeplink setDeeplinkCallback:^(NSString * _Nonnull deeplinkURLString) {
// Parsing url
NSURL *url = [NSURL URLWithString:deeplinkURLString];
// Parsing referrerID
NSMutableDictionary <NSString *, NSString *>* queryItems = [NSMutableDictionary new];
for (NSURLQueryItem *item in [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO].queryItems) {
[queryItems setValue:item.value forKey:item.name];
}
// Show proper content using url (ablog://good-product-growth-team?referrer_id=1700) and referrerID (1700)
NSString *referrerID = [queryItems valueForKey:@"referrer_id"];
if (referrerID != nil) {
}
}];
AirBridge.deeplink().setDeeplinkCallback { deeplinkURLString in
// Parsing url
guard
let deeplinkURL = URL(string: deeplinkURLString),
let queryItems = URLComponents(url: deeplinkURL, resolvingAgainstBaseURL: false)?.queryItems
else { return }
// Parsing referrerID
var uniqueQueryItems: [String: String] = [:]
queryItems.forEach { item in
uniqueQueryItems[item.name] = item.value
}
// Show proper content using url (ablog://good-product-growth-team?referrer_id=1700) and referrerID (1700)
if let referrerID = uniqueQueryItems["referrer_id"] {
}
}
To properly measure your referral campaign, specific user actions relevant to the referral campaign, such as clicking the CTA button, should be collected as an Airbridge event. Such action can be collected as Share event (airbridge.share) which is a Standard Event or can be collected as a newly defined Custom Event.
If the Airbridge SDK is already collecting such user action and sending the events to Airbridge, no additional task is required. If not, however, you need to reconfigure the Airbridge SDK to collect such user action and send the events to Airbridge, conduct SDK testing, and release your app with the new Airbridge SDK.
Refer to the developer guides listed below for SDK configuration.
Programming Language | Developer Guide |
---|---|
Web | |
Android (Kotlin, Java) | |
iOS (Swift, Objective-C) | |
React Native | |
Flutter | |
Unity | |
Cordova · Ionic · PhoneGap | |
Expo |
The performance of your referral campaigns can be viewed in the Airbridge reports and raw data files. You can use the following metrics and GroupBys to visualize the data in the reports.
Metric or GroupBy | Description |
---|---|
channel | The channel name of the referral campaign. Shows the |
campaign | The campaign name of the referral campaign. Shows the |
ad group | The ad group name of the referral campaign. Shows the |
ad creative | The ad creative name of the referral campaign. Shows the |
When calling the Tracking Link API, we recommend configuring the campaign parameters to collect detailed information on your referral campaign.
The user ID should be a unique identifier assigned to each user account of your service. Note that Airbridge does not manage the user IDs.
Was this page helpful?
Airbridge.getDeeplink(getIntent(), new AirbridgeCallback<Uri>() {
@Override
public void onSuccess(Uri uri) {
try {
Map<String, String> queryParameterMap = new HashMap<>();
for (String key : uri.getQueryParameterNames()) {
String value = uri.getQueryParameter(key);
if (value != null) {
queryParameterMap.put(key, value);
}
}
// Parsing referrerID
String referrerId = queryParameterMap.get("referrer_id");
// Show proper content using url (ablog://good-product-growth-team?referrer_id=1700) and referrerID (1700)
if (referrerId != null) {
}
} catch (Throwable e) {
// Handle exceptions here
}
}
...
Airbridge.getDeeplink(intent, object : AirbridgeCallback<Uri> {
override fun onSuccess(result: Uri) {
try {
val queryParameterMap = mutableMapOf<String, String>()
result.queryParameterNames.forEach { key ->
val value = result.getQueryParameter(key)
if (value != null) {
queryParameterMap[key] = value
}
}
// Parsing referrerID
// Show proper content using url (ablog://good-product-growth-team?referrer_id=1700) and referrerID (1700)
queryParameterMap["referrer_id"]?.let { referrerId ->
}
} catch (e: Throwable) {
// Handle exceptions here
}
}
...
[AirBridge.deeplink setDeeplinkCallback:^(NSString * _Nonnull deeplinkURLString) {
// Parsing url
NSURL *url = [NSURL URLWithString:deeplinkURLString];
// Parsing referrerID
NSMutableDictionary <NSString *, NSString *>* queryItems = [NSMutableDictionary new];
for (NSURLQueryItem *item in [NSURLComponents componentsWithURL:url resolvingAgainstBaseURL:NO].queryItems) {
[queryItems setValue:item.value forKey:item.name];
}
// Show proper content using url (ablog://good-product-growth-team?referrer_id=1700) and referrerID (1700)
NSString *referrerID = [queryItems valueForKey:@"referrer_id"];
if (referrerID != nil) {
}
}];
AirBridge.deeplink().setDeeplinkCallback { deeplinkURLString in
// Parsing url
guard
let deeplinkURL = URL(string: deeplinkURLString),
let queryItems = URLComponents(url: deeplinkURL, resolvingAgainstBaseURL: false)?.queryItems
else { return }
// Parsing referrerID
var uniqueQueryItems: [String: String] = [:]
queryItems.forEach { item in
uniqueQueryItems[item.name] = item.value
}
// Show proper content using url (ablog://good-product-growth-team?referrer_id=1700) and referrerID (1700)
if let referrerID = uniqueQueryItems["referrer_id"] {
}
}