At a glance: Create OneLink custom attribution links using the AppsFlyer App in Salesforce Marketing Cloud.
Advertisers use Salesforce Marketing Cloud (SFMC) as an email service provider (ESP). Use the AppsFlyer app in Salesforce to:
- Connect users to AppsFlyer
- Import AppsFlyer attribution data into a Salesforce data extension
- Create custom attribution links in Salesforce using OneLink
- 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 firstname.lastname@example.org 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.
[Mandatory] Step to be performed one time
Integrate the AppsFlyer App in Salesforce
[As needed] Steps to be performed per customer attribution link required
Send emails containing custom attribution links generated in the previous step
Integrate Salesforce with the AppsFlyer App
Perform this procedure one time on app install.
To integrate the AppsFlyer App with Salesforce:
- Install the app in Salesforce:
- In Salesforce, go to Salesforce AppExchanage.
- Search for and install the AppsFlyer app, or use this link.
- 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.
- Set up the AppsFlyer server-to-server integration:
- From the top-right corner, click [username] > Setup.
- Under Platform Tools in the left pane, click Apps > Installed Packages.
- From the top-right corner, click New.
- Enter a Name ("AppsFlyer S2S integration") and Description ("Postback app"), and click Save.
- Go down to the bottom-center of the page, and click Add Component.
- Select the API Integration component, and click Next.
- Select the Server-to-Server integration type, and click Next.
- Under Scope, select all the checkboxes (to enable all scopes for future use), and click Save.
- 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.
- From the top-right corner, click Install, and agree to the Salesforce Terms & Conditions.
- Provide users with access to the AppsFlyer app:
- From Apps > Installed Packages. select the ACCESS tab.
- Select users who are allowed to use OneLink, and click Save. You may need to "hard refresh" to view the new permissions.
- Integrate Salesforce with AppsFlyer:
Note: if you have iOS and Android apps, do this process for each app.
- From the AppsFlyer dashboard, go to Configuration > Integrated partners.
- Search for and select SFMC.
- Turn on Activate partner.
- Under General settings and In-app event settings, enter the three values you copied in step 3: SalesForce MID, Client ID, and Client Secret.
- Click Save integration.
- Repeat the process for both iOS and Android, if relevant.
- Confirm the completion of AppsFlyer app installation:
- In Salesforce, click the cloud icon on the top-left corner > AppExchange > AppsFlyer OneLink.
- From the top menu, click Audience Builder (tab) > Contact builder.
- From the top menu, click Data Extensions (tab).
- From the left pane, select Data Extensions > AppsFlyer Postback. The events and installs (with your Marketing Cloud account MID) appear.
- 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.
To create a custom attribution link:
- In Salesforce, open the AppsFlyer app.
- Click Add OneLink.
- 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.
- In the Base URL field, enter the long-version OneLink URL copied from the AppsFlyer OneLink custom links page.
- [Optional] To add more parameters, click Add parameter. See the list of recommended parameters.
- [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.
- Click Generate link.
Send emails containing custom attribution links
- In Salesforce Email Studio, create a new template or email.
- Click the Edit icon, the Content tab, then select Blocks.
- Scroll down to find AppsFlyer Button CB or AppsFlyer Image CB.
- Drag the image/button into the body of the email.
- Click the image/button to edit.
- In the Title field, name the image/button.
- Select a OneLink link.
- Save the email and send it.
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:
- Create the appropriate OneLink URL.
- Place it in an email.
- Send the email to yourself.
- 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.