Netcore integration with AppsFlyer

Netcore.png

ESPs (Email Service Providers) can be excellent sources for segmented user traffic.

One of the problems with ESPs is recording clicks while still persevering deep linking functionality. ESPs wrap the deep linking URL with their own ESP's click recording domain. This procedure oftentimes breaks the iOS Universal Links process.

However, with ESPs that support Universal Links on top of their click recording domain, deep linking and click recording can still be performed.

This article explains the flow for integrating OneLink-based attribution links into your Netcore-based email system in order to seamlessly deep link from emails. The integration utilizes Netcore's support for Universal Links on top of the branded click recording domain.

Prerequisites

iOSAndroid
  • AppsFlyer iOS SDK version 4.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 (e.g. 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):

netcore-account-domain.png

 Note

In case of any issues with Netcore account setup, please open a ticket for 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.

  1. Associate the click recording domain in Xcode:

    configure-xcode-deeplinking-domain.png
  2. 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"]];
  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.

Step 3: Configuring link for email campaigns

  1. Create OneLink template for your email campaigns
  2. Create Branded link
    • Important difference: when requested to add a CNAME to your domain, use esplinks.appsflyer.com, instead of the URL offered in the Branded link creation page:
      branded-link-esp.png
    • For example:
      Subdomain CNAME
      click.example.com click.esplinks.appsflyer.com

Creating emails and testing links

Step 4: Sending your first email

  1. When creating the OneLink URL, make sure to URL-encode all parameter values
  2. The following parameters are highly recommended to use:
    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.
  3. 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://example.onelink.me/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
Was this article helpful?