AppsFlyerSDK / appsflyer-react-native-plugin

AppsFlyer plugin for React Native
MIT License
276 stars 197 forks source link

Incorrect behaviour of onInstallConversionData and onAppOpenAttribution #473

Closed aditya-keri-betterhalf closed 1 year ago

aditya-keri-betterhalf commented 1 year ago

Report

Plugin Version

6.10.3

On what Platform are you having the issue?

Android

What did you do?

image

appsFlyer.onAppOpenAttribution((res) => { console.log('onAppOpenAttribution', JSON.stringify(res, null, 2)); });

appsFlyer.onDeepLink((res) => { if (res?.deepLinkStatus !== 'NOT_FOUND') { console.log('onDeepLink', JSON.stringify(res?.data, null, 2)); } });

appsFlyer.initSdk( {}, (result) => {}, (error) => {} );

- While the Play Store page for the app is open, I run the debug build (`yarn start && yarn android`).
- I check the console logs.

## What did you expect to happen?

- `onInstallConversionData` must be called on the first launch of the app install (Deferred Deep Link) with all the attribution parameters from the screenshot.
- `onAppOpenAttribution` must be called **after** the first launch (and not **on** the first launch).

## What happened instead?

- `onInstallConversionData` is not called with any of the attribution parameters. I only get back this : 

{ "status":"success", "type":"onInstallConversionDataLoaded", "data":{ "install_time":"2023-06-06 19:06:28.960", "af_status":"Organic", "af_message":"organic install", "is_first_launch":true } }


- `onInstallConversionData` is called every time I open the deep link **after** the first install.

- `onAppOpenAttribution` is never called. Tried both background and killed state.

- `onDeepLink` is called on the first install and every app open. On the first install, it gives me `deep_link_value` and `deep_link_sub1` correctly. All other fields are empty.

## Please provide any other relevant information.

I'm on the latest version of the library.
amit-kremer93 commented 1 year ago

if you implemented onDeepLink and set onDeepLinkListener: true in the init object onAppOpenAttribution will not be called. Please follow the instructions in the Docs sections. For further information please contact our support team

github-actions[bot] commented 1 year ago

👋 Hi @aditya-keri-betterhalf and Thank you for reaching out to us. In order for us to provide optimal support, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please specify: