AppsFlyer OneLink
Overview
Deep linking gives your app users the most seamless experience possible by securely and contextually guiding them to In-App information.
CleverTap automatically wraps all links in the email body to track clicks. When a user clicks on any of the links in the email, this may lead to multiple redirects. Turning off click tracking for deep links is one option for marketers who want to send users straight to the content.
The other option is to leverage the AppsFlyer OneLink with branded links. Doing so can give your app users the greatest experience possible by directing them to a specific landing page, app store, or in-app content. All this while, CleverTap tracks the click and assists in boosting conversion rates.
Set Up AppsFlyer OneLink(s)
AppsFlyer has updated its integration process. This requires existing users to set up the integration with AppsFlyer again, as they have deprecated the old integration.
Closed Beta
AppsFlyer has released this integration in Closed Beta. The integration steps outlined in the document apply only if you are using the SendGrid as the provider. To enable this integration, contact AppsFlyer Support.
If you are an existing customer who has already set up AppsFlyer OneLink integration with CleverTap in the past, go to Settings > Channel > Email > Advanced Setup and remove all the OneLink URLs added under AppsFlyer OneLink, as those are related to the older integration.
Prerequisites
The following are the prerequisites before you set up the AppsFlyer OneLink:
- Create a new click-tracking domain link branding on your provider dashboard, such as
click.client.com
. For example, if you are using SendGrid, you can refer to Set Up Link Branding to create a new click-tracking domain. If you are an existing user, you can continue using your current click-tracking domain from SendGrid and update the CNAME records as needed. For more information, refer to Step 8 of Integrate CleverTap with AppsFlyer Dashboard . - Create a OneLink Template.
- Configure the app to support the following:
Configure App to Support App Association Files
AppsFlyer hosts app association files for your app to enable Universal Links (iOS) or App Links (Android). Follow the steps below to configure your app to access these files:
-
For iOS: Configure the SDK to support an Apple App Site Association (AASA) file, enabling Universal Linking from the email message to your app. To do so:
-
Select your project from the Xcode and select the Capabilities tab.
-
Toggle ON Associated Domains and click + (plus), enter your click domain. For example,<applinks:click.example.com>.
-
-
For Android: Configure the app to support the Digital Assets Links (DAL) file, enabling App Linking from the email message to your app. In the Android manifest, add the click domain and the required prefix to the activity tag of the activity you want to link to, as shown in the following sample XML code:
<activity android:name=".DeepLinkActivity"> <intent-filter android:autoVerify="true"> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.BROWSABLE" /> <data android:scheme="https" android:host="click.example.com" android:pathPrefix="/campaign" /> </intent-filter> </activity>
Configure App to Support Deeplinking
When a user clicks on an App Link or Universal Link, the user is directed to a specific In-App activity (for example, a specific page in the app) as soon as the app opens. To enable the app to process the deeplink correctly, follow the steps listed below:
- Set Up the Click Recording Domain:
Provide the click recording domain to the SDK APIresolveDeepLinkURLs
. Ensure to call this API before initializing the SDK.- For Android
public static final String[] ESP_DOMAINS = { "click.example.com" };
- For iOS
[[AppsFlyerLib shared] resolveDeepLinkURLs = @[@"click.example.com"];
- For Android
- Extract and Handle Deep Link Data:
Use theonAppOpenAttribution
API to fetch the deeplink parameters and handle the deep link data.
For more information about SDK deeplinking, refer to the following documents:
Configure App to Support App Links or Web Links
When a user clicks on an App Link or Universal Link, you must regulate the functionality of wrapped links within an email campaign. You specifically address two types: weblinks intended to open a website and links designed to open the app through a universal link or App link.
For more information, refer to the following:
Integrate CleverTap with AppsFlyer Dashboard
To integrate CleverTap with AppsFlyer:
- Go to Engage > ESP integration from the ESP dashboard.
- Select CleverTap from the ESP section to set up the integration.
- Select the Onelink Template ID, created on the AppsFlyer dashboard, to use for email campaigns.
-
Click Next.
-
Enter the click tracking domain (for example, click.example.com) and CleverTap server endpoint. To know the server endpoint for your region, refer to the following table:
Region CleverTap Server Endpoint CleverTap Dashboard URL Europe wizrocketmail.net https://eu1.dashboard.clevertap.com/login.html India in1.wizrocketmail.net https://in1.dashboard.clevertap.com/login.html Singapore sg1.wizrocketmail.net https://sg1.dashboard.clevertap.com/login.html#/ United States us1.wizrocketmail.net https://us1.dashboard.clevertap.com/login.html#/ Middle East (UAE) mec1.wizrocketmail.net https://mec1.dashboard.clevertap.com/login.html#/ Indonesia aps3.wizrocketmail.net https://aps3.dashboard.clevertap.com/login.html#/
- Click Validate connection to ensure that the domain points to the correct endpoint.
- Click Next when done.
- Configure Link Redirection to AppsFlyer. To do so, copy and send the customized pre-fabricated instructions in AppsFlyer to your IT or domain administrator. They will need to reroute your email campaign traffic from the ESP servers to the AppsFlyer servers by updating your DNS CNAME records with the new domain provided by AppsFlyer.
As a result, every time a link is clicked, the click will be redirected to AppsFlyer, which in turn will redirect it to the CleverTap server endpoint.
Note
- The ESP integration status will be currently displayed as Pending and will only start working after mapping the CNAME record.
- It can take up to 24 hours after mapping for a new integration to start working and become active.
- Customize the OneLink URL for your email campaign.
- Create a OneLink URL from the OneLink management page (or manually).
- Add Recommended Parameters in the URL as query parameters:
- pid (media source): Use a media source such as Email to signify this usage. This helps in viewing all related data in the AppsFlyer dashboard.
- c (campaign): Add the campaign name.
af_web_dp: Specify where to redirect users clicking the link on a desktop. - af_ios_url: Specify where to redirect iOS users who do not have the app.
- af_android_url: Specify where to redirect Android users who do not have the app.
- is_retargeting=true: Add this parameter to indicate that the link is from a retargeting campaign, which is essential for universal app opens. For more information, refer to Retargeting Attribution Guide
- Ensure that all parameter values are URL-encoded.
Note
You need not turn off click tracking from your CleverTap or SendGrid for OneLink redirection to function as intended. CleverTap and SendGrid will receive the click data directly from AppsFlyer.
Invalid AppsFlyer Branded OneLink
AppsFlyer does not send the click data for invalid OneLink URLs configured in an Email campaign to CleverTap.
Updated about 1 month ago