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.

3840

AppsFlyer OneLink Integration

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.

Delete OneLink URLs from CleverTap Dashboard

Delete OneLink URLs from CleverTap Dashboard

Prerequisites

The following are the prerequisites before you set up the AppsFlyer OneLink:

  1. 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 .
  2. Create a OneLink Template.
  3. Configure the app to support the following:
    1. App Association Files.
    2. Deeplinking.
    3. App Links or Web Links.

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:

    1. Select your project from the Xcode and select the Capabilities tab.

    2. Toggle ON Associated Domains and click + (plus), enter your click domain. For example,<applinks:click.example.com>.

      Configure SDK to Support an AASA file

      Configure SDK to Support an AASA file

  • 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:

  1. Set Up the Click Recording Domain:
    Provide the click recording domain to the SDK API resolveDeepLinkURLs. 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"];
      
  2. Extract and Handle Deep Link Data:
    Use the onAppOpenAttribution 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:

  1. Go to Engage > ESP integration from the ESP dashboard.
Integrate ESP with AppsFlyer dashboard

Integrate ESP with AppsFlyer dashboard

  1. Select CleverTap from the ESP section to set up the integration.
Select your ESP for Setting Up Integration

Select your ESP for Setting Up Integration

  1. Select the Onelink Template ID, created on the AppsFlyer dashboard, to use for email campaigns.
Select OneLink Template

Select OneLink Template

  1. Click Next.

  2. 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:


Enter Click Tracking Domain and CleverTap Endpoint

Enter Click Tracking Domain and CleverTap Endpoint

  1. Click Validate connection to ensure that the domain points to the correct endpoint.
  2. Click Next when done.
  3. 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.
Link Redirection to AppsFlyer

Link Redirection to AppsFlyer

πŸ“˜

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.
  1. Customize the OneLink URL for your email campaign.
    1. Create a OneLink URL from the OneLink management page (or manually).
    2. 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
    3. 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.