adjust / flutter_sdk

This is the Flutter SDK of
MIT License
56 stars 47 forks source link

deferredDeeplinkCallback not working #103

Closed TercyoStorck closed 1 year ago

TercyoStorck commented 1 year ago

I've follow tutorial, but never receved a callback on deferredDeeplinkCallback. I looking for another issues with the same problem that never was solved. So I don't now how to do.

Thanks for any help.

uerceg commented 1 year ago

Hi @TercyoStorck,

When testing deferred deep linking (and at the end of the test seeing deferred deep link callback triggered in the app), you need to make sure to have testing flow set up properly. That involves following:

  1. Make sure that tracker URL you're testing with is properly formatted.
  2. In case you are not using your test device ID as part of the tracker URL, make sure to have probabilistic matching enabled for the test tracking in the dashboard settings.
  3. Uninstall your app from test device.
  4. Forget your test device from our backend via testing console.
  5. Click on a tracker URL from from some page you loaded in your test device browser.
  6. Ignore the redirection to App/Play Store.
  7. Install app on your test device and launch SDK (preferably in sandbox mode and with log level set to verbose so that you can see what's happening in the logs).
  8. If all went well, you should see install being tracked + deferred deep link sent back to SDK + deferred deep linking callback you have defined being pinged by the SDK.

In case you end up having any further questions about this flow, feel free to ping.

prinsdha commented 1 year ago

Same issue I'm facing

TercyoStorck commented 1 year ago

Hi @TercyoStorck,

When testing deferred deep linking (and at the end of the test seeing deferred deep link callback triggered in the app), you need to make sure to have testing flow set up properly. That involves following:

  1. Make sure that tracker URL you're testing with is properly formatted.
  2. In case you are not using your test device ID as part of the tracker URL, make sure to have probabilistic matching enabled for the test tracking in the dashboard settings.
  3. Uninstall your app from test device.
  4. Forget your test device from our backend via testing console.
  5. Click on a tracker URL from from some page you loaded in your test device browser.
  6. Ignore the redirection to App/Play Store.
  7. Install app on your test device and launch SDK (preferably in sandbox mode and with log level set to verbose so that you can see what's happening in the logs).
  8. If all went well, you should see install being tracked + deferred deep link sent back to SDK + deferred deep linking callback you have defined being pinged by the SDK.

In case you end up having any further questions about this flow, feel free to ping.

I've tried a lot to make it works. But still not working.

uerceg commented 1 year ago

Okay, then it would be great if you can ser SDK to sandbox mode with verbose log level, redo the steps I mentioned above one more time in that setup and send us over the SDK logs from that run. Feel free to omit any sensitive data from the logs if any is present.

TercyoStorck commented 1 year ago

Sure =)

W/Adjust  ( 8838): SANDBOX: Adjust is running in Sandbox mode. Use this setting for testing. Don't forget to set the environment to `production` before publishing!
W/Adjust  ( 8838): SANDBOX: Adjust is running in Sandbox mode. Use this setting for testing. Don't forget to set the environment to `production` before publishing!
D/Adjust  ( 8838): Attribution file not found
D/Adjust  ( 8838): Activity state file not found
D/Adjust  ( 8838): Session Callback parameters file not found
D/Adjust  ( 8838): Session Partner parameters file not found
D/Adjust  ( 8838): adjust_config.properties file not found in this app
I/Adjust  ( 8838): Google Play Services Advertising ID read correctly at start time
V/Adjust  ( 8838): Foreground timer configured to fire after 60.0 seconds of starting and cycles every 60.0 seconds
D/Adjust  ( 8838): Package queue file not found
V/Adjust  ( 8838): Foreground timer starting
V/Adjust  ( 8838): Subsession start
D/Adjust  ( 8838): Added package 1 (session)
V/Adjust  ( 8838): Path:      /session
V/Adjust  ( 8838): ClientSdk: flutter4.33.0@android4.33.2
V/Adjust  ( 8838): Parameters:
V/Adjust  ( 8838):  android_uuid     c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838):  api_level        30
V/Adjust  ( 8838):  app_token        iz7ce5fp89og
V/Adjust  ( 8838):  app_version      3.10.0
V/Adjust  ( 8838):  attribution_deeplink 1
V/Adjust  ( 8838):  connectivity_type 1
V/Adjust  ( 8838):  country          US
V/Adjust  ( 8838):  cpu_type         arm64-v8a
V/Adjust  ( 8838):  created_at       2023-03-01T11:07:01.005Z-0300
V/Adjust  ( 8838):  device_manufacturer Xiaomi
V/Adjust  ( 8838):  device_name      Mi A3
V/Adjust  ( 8838):  device_type      phone
V/Adjust  ( 8838):  display_height   1425
V/Adjust  ( 8838):  display_width    720
V/Adjust  ( 8838):  environment      sandbox
V/Adjust  ( 8838):  event_buffering_enabled 0
V/Adjust  ( 8838):  gps_adid         d0d8fc3f-0416-4160-889f-fc4f4d457054
V/Adjust  ( 8838):  gps_adid_attempt 1
V/Adjust  ( 8838):  gps_adid_src     service
V/Adjust  ( 8838):  hardware_name    qssi-user 11 RKQ1.200903.002 V12.0.18.0.RFQMIXM
V/Adjust  ( 8838):  installed_at     2023-03-01T11:06:51.229Z-0300
V/Adjust  ( 8838):  language         en
V/Adjust  ( 8838):  mcc              724
V/Adjust  ( 8838):  mnc              02
V/Adjust  ( 8838):  needs_response_details 1
V/Adjust  ( 8838):  os_build         RKQ1.200903.002
V/Adjust  ( 8838):  os_name          android
V/Adjust  ( 8838):  os_version       11
V/Adjust  ( 8838):  package_name     br.com.bemyapp.appost
V/Adjust  ( 8838):  screen_density   high
V/Adjust  ( 8838):  screen_format    long
V/Adjust  ( 8838):  screen_size      normal
V/Adjust  ( 8838):  session_count    1
V/Adjust  ( 8838):  tracking_enabled 1
V/Adjust  ( 8838):  ui_mode          1
V/Adjust  ( 8838):  updated_at       2023-03-01T11:06:51.229Z-0300
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:0.0 ts:0.0 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
D/Adjust  ( 8838): Wrote Package queue: [session]
I/Adjust  ( 8838): invoke getSamsungInstallReferrerDetails : com.adjust.sdk.samsung.Util
D/Adjust  ( 8838): Package handler wrote 1 packages
I/Adjust  ( 8838): invoke getXiaomiInstallReferrerDetails : com.adjust.sdk.xiaomi.Util
I/Adjust  ( 8838): invoke getVivoInstallReferrerDetails : com.adjust.sdk.vivo.Util
D/Adjust  ( 8838): InstallReferrer invoke method name: onInstallReferrerSetupFinished
D/Adjust  ( 8838): InstallReferrer invoke arg: 0
D/Adjust  ( 8838): Making request to url : https://app.adjust.com/session
D/Adjust  ( 8838): installReferrer: adjust_reftag=cfd4LEWprOKpK, clickTime: 1677679426, installBeginTime: 1677610601
D/Adjust  ( 8838): installVersion: 3.9.0, clickTimeServer: 1677679427, installBeginServer: 1677610600, googlePlayInstant: false
D/Adjust  ( 8838): Install Referrer read successfully. Closing connection
D/Adjust  ( 8838): Install Referrer API connection closed
D/Adjust  ( 8838): Added sdk_click 1
V/Adjust  ( 8838): Path:      /sdk_click
V/Adjust  ( 8838): ClientSdk: flutter4.33.0@android4.33.2
V/Adjust  ( 8838): Parameters:
V/Adjust  ( 8838):  android_uuid     c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838):  api_level        30
V/Adjust  ( 8838):  app_token        iz7ce5fp89og
V/Adjust  ( 8838):  app_version      3.10.0
V/Adjust  ( 8838):  attribution_deeplink 1
V/Adjust  ( 8838):  click_time       2023-03-01T11:03:46.000Z-0300
V/Adjust  ( 8838):  click_time_server 2023-03-01T11:03:47.000Z-0300
V/Adjust  ( 8838):  connectivity_type 1
V/Adjust  ( 8838):  country          US
V/Adjust  ( 8838):  cpu_type         arm64-v8a
V/Adjust  ( 8838):  created_at       2023-03-01T11:07:01.082Z-0300
V/Adjust  ( 8838):  device_manufacturer Xiaomi
V/Adjust  ( 8838):  device_name      Mi A3
V/Adjust  ( 8838):  device_type      phone
V/Adjust  ( 8838):  display_height   1425
V/Adjust  ( 8838):  display_width    720
V/Adjust  ( 8838):  environment      sandbox
V/Adjust  ( 8838):  event_buffering_enabled 0
V/Adjust  ( 8838):  google_play_instant 0
V/Adjust  ( 8838):  gps_adid         d0d8fc3f-0416-4160-889f-fc4f4d457054
V/Adjust  ( 8838):  gps_adid_attempt 1
V/Adjust  ( 8838):  gps_adid_src     service
V/Adjust  ( 8838):  hardware_name    qssi-user 11 RKQ1.200903.002 V12.0.18.0.RFQMIXM
V/Adjust  ( 8838):  install_begin_time 2023-02-28T15:56:41.000Z-0300
V/Adjust  ( 8838):  install_begin_time_server 2023-02-28T15:56:40.000Z-0300
V/Adjust  ( 8838):  install_version  3.9.0
V/Adjust  ( 8838):  installed_at     2023-03-01T11:06:51.229Z-0300
V/Adjust  ( 8838):  language         en
V/Adjust  ( 8838):  mcc              724
V/Adjust  ( 8838):  mnc              02
V/Adjust  ( 8838):  needs_response_details 1
V/Adjust  ( 8838):  os_build         RKQ1.200903.002
V/Adjust  ( 8838):  os_name          android
V/Adjust  ( 8838):  os_version       11
V/Adjust  ( 8838):  package_name     br.com.bemyapp.appost
V/Adjust  ( 8838):  referrer         adjust_reftag=cfd4LEWprOKpK
V/Adjust  ( 8838):  referrer_api     google
V/Adjust  ( 8838):  screen_density   high
V/Adjust  ( 8838):  screen_format    long
V/Adjust  ( 8838):  screen_size      normal
V/Adjust  ( 8838):  session_count    1
V/Adjust  ( 8838):  session_length   0
V/Adjust  ( 8838):  source           install_referrer
V/Adjust  ( 8838):  subsession_count 1
V/Adjust  ( 8838):  time_spent       0
V/Adjust  ( 8838):  tracking_enabled 1
V/Adjust  ( 8838):  ui_mode          1
V/Adjust  ( 8838):  updated_at       2023-03-01T11:06:51.229Z-0300
D/Adjust  ( 8838): Making request to url : https://app.adjust.com/sdk_click
D/Adjust  ( 8838): Response string: {"app_token":"iz7ce5fp89og","adid":"cc62097367214e85c5357509036c2985","timestamp":"2023-03-01T14:07:03.616Z+0000","message":"Session tracked","ask_in":5000}
I/Adjust  ( 8838): Response message: Session tracked
D/Adjust  ( 8838): Will not retry with current url strategy
D/Adjust  ( 8838): Got response in PackageHandler
D/Adjust  ( 8838): Finished tracking session
D/Adjust  ( 8838): Wrote Package queue: []
D/Adjust  ( 8838): Package handler wrote 0 packages
V/Adjust  ( 8838): Package handler can send
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:0.0 ts:0.0 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
D/Adjust  ( 8838): Waiting to query attribution in 5.0 seconds
V/Adjust  ( 8838): Attribution timer canceled
V/Adjust  ( 8838): Attribution timer starting. Launching in 5.0 seconds
D/Adjust  ( 8838): Launching SessionResponse tasks
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:0.0 ts:0.0 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
D/Adjust  ( 8838): Response string: {"app_token":"iz7ce5fp89og","adid":"cc62097367214e85c5357509036c2985","timestamp":"2023-03-01T14:07:03.801Z+0000","message":"Click tracked"}
I/Adjust  ( 8838): Response message: Click tracked
D/Adjust  ( 8838): Will not retry with current url strategy
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:0.0 ts:0.0 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:0.0 ts:0.0 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Attribution timer fired
V/Adjust  ( 8838): Path:      attribution
V/Adjust  ( 8838): ClientSdk: flutter4.33.0@android4.33.2
V/Adjust  ( 8838): Parameters:
V/Adjust  ( 8838):  android_uuid     c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838):  api_level        30
V/Adjust  ( 8838):  app_token        iz7ce5fp89og
V/Adjust  ( 8838):  app_version      3.10.0
V/Adjust  ( 8838):  attribution_deeplink 1
V/Adjust  ( 8838):  created_at       2023-03-01T11:07:07.681Z-0300
V/Adjust  ( 8838):  device_name      Mi A3
V/Adjust  ( 8838):  device_type      phone
V/Adjust  ( 8838):  environment      sandbox
V/Adjust  ( 8838):  event_buffering_enabled 0
V/Adjust  ( 8838):  gps_adid         d0d8fc3f-0416-4160-889f-fc4f4d457054
V/Adjust  ( 8838):  gps_adid_attempt 1
V/Adjust  ( 8838):  gps_adid_src     service
V/Adjust  ( 8838):  initiated_by     backend
V/Adjust  ( 8838):  needs_response_details 1
V/Adjust  ( 8838):  os_name          android
V/Adjust  ( 8838):  os_version       11
V/Adjust  ( 8838):  package_name     br.com.bemyapp.appost
V/Adjust  ( 8838):  tracking_enabled 1
V/Adjust  ( 8838):  ui_mode          1
D/Adjust  ( 8838): Making request to url: https://app.adjust.com/attribution
D/Adjust  ( 8838): Response string: {"app_token":"iz7ce5fp89og","adid":"cc62097367214e85c5357509036c2985","timestamp":"2023-03-01T14:07:10.175Z+0000","message":"Attribution found","attribution":{"tracker_token":"4bo6e2k","tracker_name":"Organic","network":"Organic"}}
I/Adjust  ( 8838): Response message: Attribution found
D/Adjust  ( 8838): Will not retry with current url strategy
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:0.0 ts:0.0 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
D/Adjust  ( 8838): Wrote Attribution: tt:4bo6e2k tn:Organic net:Organic cam: adg: cre: cl: adid:cc62097367214e85c5357509036c2985 ct: ca:NaN cc: fir:
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:60.0 ts:60.0 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:120.0 ts:120.0 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:180.1 ts:180.1 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:240.1 ts:240.1 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:300.2 ts:300.2 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:360.2 ts:360.2 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:420.2 ts:420.2 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:480.3 ts:480.3 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:540.3 ts:540.3 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:600.3 ts:600.3 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
V/Adjust  ( 8838): Foreground timer fired
D/Adjust  ( 8838): Wrote Activity state: ec:0 sc:1 ssc:1 sl:660.3 ts:660.3 la:11:12:13 uuid:c7271ed9-5a2a-4792-b10e-e2877d907901
uerceg commented 1 year ago

Thank you for the logs.

Response which our backend sends to session being tracked in this test is "Session tracked". That pretty much means that our backend is aware of existence of your test device. Did you do the step 4 from above (forgot your device from testing console)? According to logs, it seems like you might have skipped that part. You can go to Adjust testing console for your app in dashboard and use your test device advertising ID to forget it (d0d8fc3f-0416-4160-889f-fc4f4d457054).

TercyoStorck commented 1 year ago

Ok... I've missed that. My bad. Now is everything works as minded. Thanks!! =)

matszafraniec commented 6 months ago

@TercyoStorck how you call deferredDeeplinkCallback in Sandbox environment? I thought that we can do this only when release the app to the store itself or for development purposes - Android alpha channel.