Salesforce Marketing Cloud integration with AppsFlyer

At a glance: This article explains how to integrate AppsFlyer data with a Salesforce Marketing Cloud (SFMC) account in order to seamlessly deep link from emails. The flow utilizes SFMC support for Universal Links on a branded click-recording domain.

SFMC-logo3-1.png

Introduction

ESP (Email Service Providers) are excellent sources for segmented user traffic. However some ESP, and this is a common ESP issue, don't perform correct attribution and deep linking.

ESPs wrap a deep-linking URL with their own ESP click-recording domain. This procedure often breaks the iOS Universal Links process. However, there are ESPs that support Universal Links on their click-recording domain, so deep linking and click-recording can be performed.

Integrating Salesforce Marketing Cloud with AppsFlyer

Steps 1-4 described below are needed to support iOS deep linking.

Prerequisites

iOSAndroid

AppsFlyer iOS SDK version 4.9.0 

For iOS Universal Links you should perform the following in your SFMC environment:

  • Purchase and implement Sender Authentication Package (SAP)
  • Purchase an SSL Certificate (also known as SSL Configuration) and submit an SSL Request Form
    * To obtain Sender Authentication Package and SSL Certificate reach out to your Salesforce Account Representative or submit a deliverability support case via Salesforce Help.

Step 1: Set your click-recording domain in SFMC

To set a click-recording domain, follow SFMC official guides for:

Step 2: Upload your SSL certificate to SFMC

In order for iOS Universal Links to work properly, your click-recording domain must include your domain’s SSL certificate that should be installed in your SFMC account. Instructions on setting your SSL certificates can be found in SFMC official guide.

Step 3: Set deep linking in SFMC

To enable deep linking from SFMC emails:

  1. Login to your SFMC account, and go to the Email Studio view
  2. Click on the Admin tab
  3. In the side menu, click on deep linking. In this view, you can configure new deep link integration with your app, or modify existing ones.

  4. To create a new configuration, click the Create button and enter your AppID. The AppID value is a combination of your Apple developer team ID and the Bundle ID. Both of these values can be retrieved from your Apple Developer account.

     Example

    Given the Team ID prefix 5UABCDFGH, and the Bundle ID com.your.app, the following value should be entered:
    5UABCDFGH.com.your.app

    SFMC_Deep_Linking_2.png

  5. Your set up of universal links and deep linking is completed once SFMC sets up the Apple App Site Association (AASA) file. This process may take a few hours. You can see your generated file using the following URL:
    https://<click_recording_link_domain>/apple-app-site-association

Step 4: Configure your AppsFlyer SDK

 Note

If you haven’t already done so, make sure to configure your app to support deep linking with OneLink.

After configuring your click-recording domain to support Universal Links as described previously, you need to set up your app to deep link and resolve the Universal Link.

  1. Associate the click-recording domain in Xcode:

  2. Provide the click-recording domain to the SDK API setResolveDeepLinkURLs. This API needs to be called before SDK initialization. For more information please refer to SDK documentation here.
    AppsFlyerLib.getInstance().setResolveDeepLinkURLs("click.example.com");
    • Important! If you are using Movable Ink (MI) in conjunction with Salesforce, you need to get the MI CNAME and internal domains from your MI account manager and add them to setResolveDeepLinkURLs, in addition to the click link for Salesforce. For example:
      AppsFlyerLib.getInstance().setResolveDeepLinkURLs("salesforce-click.example.com", "mi.example.com", "example.micpn.com");
  3. When the app is invoked due to a click on the Universal Link, the AppsFlyer SDK resolves the deep link and extracts the underlying OneLink. All deep link parameters are then propagated into the onAppOpenAttribution API for deep link logic execution.
Was this article helpful?