AppsFlyer App for Salesforce Marketing Cloud

At a glance: Create OneLink custom attribution links using the AppsFlyer App in Salesforce Marketing Cloud.

SFMC_AF-logo.png

Advertisers use Salesforce Marketing Cloud (SFMC) as an email service provider (ESP). Use the AppsFlyer app in Salesforce to:

Prerequisites

  • Before you run a campaign, integrate AppsFlyer attribution data with SFMC
  • Install and integrate the AppsFlyer App in Salesforce
  • Currently, it isn't possible to log into the app using SSO providers such as Google. Contact your CSM or send an email to hello@appsflyer.com for help with authenticating using AppsFlyer credentials

Creating custom attribution links and running campaigns

Create custom attribution links using OneLink, then use them in campaigns as described in the sections that follow. You can create OneLink attribution links directly in AppsFlyer and use them in emails sent through SFMC.

Workflow
Step Description

[Mandatory] Step to be performed one time

1

Integrate the AppsFlyer App in Salesforce
Perform this step once before generating custom attribution links

[As needed] Steps to be performed per customer attribution link required

1

Create custom attribution links in Salesforce using the AppsFlyer App per campaign. 

2

Send emails containing custom attribution links generated in the previous step

3

Test link.

Integrate Salesforce with the AppsFlyer App 

Perform this procedure one time on app install. 

To integrate the AppsFlyer App with Salesforce: 

  1.  Install the app in Salesforce:
    1. In Salesforce, go to Salesforce AppExchanage.
    2. Search for and install the AppsFlyer app, or use this link.
  2. Provide adequate permissions:
    Request your Salesforce Marketing Cloud admin to grant access to the application for individual users or for Business Units. You may need to "hard refresh" to view the new permissions. 
  3. Set up the AppsFlyer server-to-server integration:
    1. From the top-right corner, click [username] > Setup.
    2. Under Platform Tools in the left pane, click Apps > Installed Packages.
    3. From the top-right corner, click New.
    4. Enter a Name ("AppsFlyer S2S integration") and Description ("Postback app"), and click Save.
    5. Go down to the bottom-center of the page, and click Add Component.
    6. Select the API Integration component, and click Next.
    7. Select the Server-to-Server integration type, and click Next.
    8. Under Scope, select all the checkboxes (to enable all scopes for future use), and click Save.
    9. Copy the following values to be used on the AppsFlyer platform, as described in step 5:
      • Client Id and Client Secret, appearing under the API Integration component.
      • The EID/MID number, appearing in the top-right corner when clicking your business unit. Note: The application is defined at the EID level and given access to specified MIDs, in Scope.
    10. From the top-right corner, click Install, and agree to the Salesforce Terms & Conditions
  4. Provide users with access to the AppsFlyer app:
    1. From Apps > Installed Packages. select the ACCESS tab.
    2.  Select users who are allowed to use OneLink, and click SaveYou may need to "hard refresh" to view the new permissions. 
  5. Integrate Salesforce with AppsFlyer:
    Note: if you have iOS and Android apps, do this process for each app.
    1. From the AppsFlyer dashboard, go to Configuration > Integrated partners
    2. Search for and select SFMC.
    3. Turn on Activate partner
    4. Under General settings and In-app event settings, enter the three values you copied in step 3: SalesForce MID, Client ID, and Client Secret.
    5. Click Save integration.  
    6. Repeat the process for both iOS and Android, if relevant.
  6. Confirm the completion of AppsFlyer app installation:
    1. In Salesforce, click the cloud icon on the top-left corner > AppExchange > AppsFlyer OneLink.
    2. From the top menu, click Audience Builder (tab) > Contact builder.
    3. From the top menu, click Data Extensions (tab).
    4. From the left pane, select Data Extensions > AppsFlyer Postback. The events and installs (with your Marketing Cloud account MID) appear. 
    5. Check that the value in the Field Count column is over 40, for both Events and Installs. A lower value means that the app install has failed and you'll need to reinstall it. 

Create custom attribution links in Salesforce using the AppsFlyer App

Create a separate attribution link for each campaign.

SFMC-AF-app1-en_us.png

To create a custom attribution link:

  1. In Salesforce, open the AppsFlyer app.
  2. Click Add OneLink.
  3. Enter a name in the Link name field. Consider:
    • Choose an easily identifiable name.
    • The link name will be used when applying OneLinks to email campaigns.
  4. In the Base URL field, enter the long-version OneLink URL copied from the AppsFlyer OneLink custom links page.
  5. [Optional] To add more parameters, click Add parameter. See the list of recommended parameters.
  6. [Optional] To set an internal SalesForce marketing cloud macro, click the icon located to the right of a parameter.
    • It is recommended to set a Subscriber key for each OneLink parameter.
    • This lets you connect attributed email conversions back to your Salesforce data.
  7. Click Generate link.

Send emails containing custom attribution links

  1. In Salesforce Email Studio, create a new template or email.
  2. Click the Edit icon, the Content tab, then select Blocks.
  3. Scroll down to find AppsFlyer Button CB or AppsFlyer Image CB.

    sf_email_edit_onelink_new.PNG

  4. Drag the image/button into the body of the email.
  5. Click the image/button to edit.
  6. In the Title field, name the image/button.
  7. Select a OneLink link.

  8. Save the email and send it.

 Example

For readability purposes, the URL parameters are not URL encoded:

https://example.onelink.me/ABcd?pid=Email&c=Spring_Newsletter&
af_dp=testapp://path/to/content&af_web_dp=https://www.example.com/path/to/content&
af_ios_url=https://www.example.com/path/to/content&af_android_url=https://www.example.com/path/to/content

Test your links

To test your attribution links:

  1. Create the appropriate OneLink URL.
  2. Place it in an email.
  3. Send the email to yourself.
  4. Click the link.
  • If you have the app installed on your device, the app should be invoked.
  • If the relevant AppsFlyer SDK deep linking APIs are implemented you are deep linked into the relevant content.
  • A click should appear in both the AppsFlyer dashboard, attributed to the provided media source and campaign.
  • A click appears in Salesforce data.