At a glance: Netcore, an email delivery and analytics platform, embeds AppsFlyer OneLink branded links within emails. Email recipients who click the link are deep linked into your app.
Email service providers (ESPs) are excellent sources of segmented user traffic. They wrap deep linking URLs with their own click recording domain. In some cases doing so breaks iOS Universal Links. To overcome this, Netcore uses Universal Links on top of their click recording domain. They integrate with AppsFlyer and by using OneLink branded link capabilities enable deep linking and click recording.
Prerequisites
- OneLink branded link
- AppsFlyer SDK version:
- iOS SDK V4.9.0+
- Android SDK V4.9.0+
Setting up Netcore
Step 1: Setting up domain in Netcore account
In order to use Universal Links with Netcore, you need to create a dedicated click recording domain and set a subdomain (for example, click.example.com).
This can be done by purchasing a designated domain or using your own domain.
Configure tracking domain and sending domain under Netcore Account configuration (see Netcore guide):
Note
In case of any issues with Netcore account setup, open a ticket for the Netcore support team.
Setting up AppsFlyer
Step 2: Configuring your AppsFlyer SDK
Note
If you haven’t already done so, make sure you have configured your app to support deep linking with OneLink.
After configuring your click recording domain to support Universal Links as described previously, you must set up your app to deep-link and resolve Universal Links.
- Associate the click recording domain in Xcode:
- Provide the click recording domain to the SDK API
setResolveDeepLinkURLs
. This API needs to be called before SDK initialization. For more information please see SDK documentation here.
[[AppsFlyerTracker sharedTracker] setResolveDeepLinkURLs:@[@"click.example.com"]];
- 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.
Step 3: Configuring link for email campaigns
- Create a OneLink template for your email campaigns.
-
Create Branded link.
When requested to add a CNAME to your domain, use yourdomain.esplinks.appsflyer.com, instead of the URL offered in the Branded Link creation page.
Example:Subdomain CNAME click.example.com example.appsflyer.com
Note that when clicking Verify to verify the brand domain, a failure message regarding the AppsFlyer CNAME displays.
Ignore this message and change the CNAME as instructed above.
Creating emails and testing links
Step 4: Sending your first email
- When creating the OneLink URL, make sure to URL-encode all parameter values
- The following parameters are suggested:
pid (media source) Use a media source that signifies this usage such as Email c (campaign) The name of the campaign you want to measure af_dp The deep link URI scheme you want to deep-link your users into af_web_dp Where to redirect users clicking the link on a desktop af_ios_url Where to redirect users that don’t have the app when they click the link in an iOS device af_android_url Where to redirect users that don’t have the app when they click the link in an Android device is_retargeting For campaigns that retarget existing users, add is_retargeting=true. - Place the OneLink URL in the email you are creating in Netcore Code Editor or Design Editor.
Example
For the sake of readability, URL parameters are not URL-encoded in this example.
https://yoursubdomain.com/abcd?pid=Email&c=Spring_Newsletter&is_retargeting=true&
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
Step 5: Testing your links
After steps 1-4 are completed, send yourself a test email. Verify that the following events take place:
- If you have the app installed, the app should be invoked.
- If the AppsFlyer SDK deep-linking APIs are implemented, you should be deep-linked into the relevant content.
- A click appears in the AppsFlyer dashboard, attributed to the provided media source and campaign.
- A click appears in Netcore's data.