Search code examples
angularionic-frameworkappsflyer-cordova-sdk

Why the ConversionData of appsflyer is cached?


I am developing an ionic app and we have a need of using deeplinks and I am using appsflyer. I call the below mentioned method by passing the devKey and the appID

    // initialize appsflyer
initAppsflyer() {

    var onSuccess = function (result) {
        //handle result
        console.log('Appsflyer onSuccess ' + result);

    };

    var onError = function (err) {
        // handle error
        console.log('Appsflyer onError ' + err);
    }
    var options = {
        devKey: '',
        appId: '',
        isDebug: true,
        onInstallConversionDataListener: true
    };
    window.plugins.appsFlyer.initSdk(options, onSuccess, onError);
}

when I click on a deep link it opens the app and data loads fine. But when I click on another link it shows the data of the previously clicked link. Have anyone faced this issue when working with apssflyer onelink? if so how to over some this issue?


Solution

  • What you are noticing is that the onInstallConversionDataListener is only meant to return install attribution data and this data doesn't change unless a user uninstalls and reinstalls the app.

    To get deeplinking data that updates with each new deeplink URL, please refer to our onAppOpenAttribution method which is meant to return the deeplink details of the link that most recently triggered the app open: https://support.appsflyer.com/hc/en-us/articles/208874366-Deep-Linking-Step-by-Step#the-onappopenattribution-method-

    If you have further questions please reach out to [email protected] and we'd be happy to assist you.

    Best, Joe Williams AppsFlyer U.S. Support Engineer