Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ABW-3437] Implement deferred deep link solution #1176

Merged
merged 17 commits into from
Jun 28, 2024

Conversation

matiasbzurovski
Copy link
Contributor

@matiasbzurovski matiasbzurovski commented Jun 19, 2024

Jira ticket: ABW-3437

Description

This PR resolves deferred deep links via AppsFlyer. This will allow new users to tap on a link that will redirect them to the AppStore, but when the app is downloaded and opened, it will fetch specific information sent on the link query params.
For now, we are just logging this information. In future PRs we will deal with it.

How to test

Deferred deep links aren't working when tapping the link and then installing the app from TestFlight. Sergio is getting the same behavior on Android, so for now we will run the pre-alpha version from Xcode in order to verify it works.

Steps are:

  1. Generate and install development certificates if you've never done so.
bundle exec fastlane ios generate_new_dev_certificates --env ios.pre-alpha
bundle exec fastlane ios install_development_certificates --env ios.pre-alpha
2. Select development provisioning profile on Xcode

Screenshot 2024-06-19 at 11 07 39

  1. Replace values on SensitiveInfo.plist so that AppsFlyer uses the appId & devKey for pre-alpha project. You should be able to see those in AppsFlyer console. Ping me on Slack if you need help with this.

  2. Delete every Radix Wallet app from your device (should work just by deleting pre-alpha, but I've tested without any other)

  3. Select any One Link on the AppsFlyer dashboard from test template. For example, you can select:

https://radixdlt.onelink.me/WAKF/eun9mos3
  1. Append the query parameters you would like to catch under deep_link_value or deep_lin_sub1/10. For example, it should like as:
https://radixdlt.onelink.me/WAKF/eun9mos3?deep_link_value=reviewPR&deep_link_sub1=thisWorks
  1. Copy the link on your device (e.g. in Notes app), and tap on it. Your browser will open indicating The app you are looking for is unavailable. This is because pre-alpha isn't available on AppStore.

  2. Run the app from Xcode to simulate an install.

  3. Check the logs and filter by click events. You should see something like the following:

2024-06-19T17:32:11+0200 🟦 info com.radixpublishing : did resolve deep link. Is deferred: true. 
Click events: ["match_type": probabilistic, "af_sub4": , "click_http_referrer": , "af_sub1": , "af_sub3": , 
"campaign": , "deep_link_value": reviewPR, "af_sub2": , "campaign_id": , "media_source": , "af_sub5": , 
"deep_link_sub1": thisWorks]

You can see that both query paramters have been intercepted by the app after its installation.

Copy link
Contributor

@danvleju-rdx danvleju-rdx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good and works as expected!
It's not quite clear how custom Attribution parameters work, as none of the set parameters appear in clickEvent. Should they be there?

@matiasbzurovski
Copy link
Contributor Author

@danvleju-rdx Yes, AppsFlyer library is a bit confusing in that sense. You can verify attribution worked correctly by two ways:

  • Checking manually on the dashboard (I did and all good)
  • Implementing AppsFlyerLibDelegate, as I did in this commit that I then reverted.

The attribution data shows under the onConversionDataSuccess, which makes sense. What it doesn't make sense is the fact that its keys show up with empty values under the clickEvent dictionary

@matiasbzurovski matiasbzurovski merged commit bb43174 into main Jun 28, 2024
6 checks passed
@matiasbzurovski matiasbzurovski deleted the ABW-3437-appsflyer branch June 28, 2024 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants