Anh Vinh Huỳnh
Anh Vinh Huỳnh

Reputation: 331

How to test Deferred Deep Linking with AppsFlyer?

I'm integrating AppsFlyer with Android Native Application. And I want to use Deferred Deep Linking, when user click landing page ads and download the app and upon first app open the user lands directly on the activity I want.

Link docs: https://support.appsflyer.com/hc/en-us/articles/207032096-Deferred-Deep-Linking-Getting-the-Conversion-Data

But I have not found a way to check that my code is running correctly. Please help me with this problem

Upvotes: 9

Views: 7634

Answers (2)

Anton Eregin
Anton Eregin

Reputation: 9069

What was working for me is:

  1. Add physical device as a test device in AppsFlyer (here's how to do it)
  2. Enable Debug Mode in AppDelegate.swift in didFinishLaunchingWithOptions

    AppsFlyerTracker.shared().isDebug = true

  3. Add AppsFlyer methods in your AppDelegate.swift (as per article)

  4. Remove app (or test build) from physical device

  5. Open Deep Link from physical device, you will be redirected to App Store. Don't install app from the App Store!!! (just close it)

  6. Install app via XCode

After it, on a first install it will call onConversionDataReceived method and the rest staff.

Upvotes: 20

Eran
Eran

Reputation: 165

You're going to have to implement the onInstallConversionDataLoaded listener:

public interface AppsFlyerConversionListener {
    void onInstallConversionDataLoaded(Map<String,String> conversionData);
    void onInstallConversionFailure(String errorMessage);
}

This will return a map of all the parameters on the link that you clicked. The parameter you need to pay attention to is the af_dp parameter. This parameter should contain the URI scheme of the activity you want to route your users to. Make sure that you have set up this URI scheme properly in the manifest.

To create a tracking link you can use Link Management. It doesn't matter if it's a single platform link or a OneLink, as long as you have the af_dp parameter on the link, that parameter (along with all other parameters on the link) will be part of the response.

If you're still facing issues, feel free to reach out to [email protected].

Upvotes: 1

Related Questions