Repository navigation
feat(attribution): send the Google Play install referrer with the install - #19
Merged
Merged
Conversation
…tall On Android, the launch that reports the install reads the Play install referrer (android_play_install_referrer, at most 2 seconds, one retry after a failed read) and sends it as installReferrer, so the server matches the install to the click the LinkForty link put there. On iOS, and without a referrer, the request is unchanged and the install is matched by fingerprint. Bumps to 0.6.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On Android, the launch that reports the install reads the Google Play install referrer and sends it as
installReferreronPOST /api/sdk/v1/install. The redirect puts the link's click id in the referrer of every Play listing it sends an Android visitor to (LinkForty/core#84), so the server matches the install to that exact click (attributionMethod: "install_referrer",confidenceScore100,competingLinks0) instead of by fingerprint.PlayInstallReferrer.read()(new,lib/attribution/install_referrer.dart) uses theandroid_play_install_referrerplugin (Android only;com.android.installreferrer2.2).AttributionManagertakes an optionalreadInstallReferrer. It starts the read alongside the fingerprint, only on the launch that reports the install, and addsinstallReferrerto the body only when there is one.LinkForty.initializetakes a@visibleForTesting installReferrerReader.SdkInfo.version, CHANGELOG, README pin, example lockfile.Checked:
flutter test(174 pass, 10 of them new: 7 for the reader, 3 for the manager),flutter analyze,dart format, andflutter build apk --debugof the example app with the plugin. CI doesn't build an Android app.Plugin choice: the most used Play referrer plugin on pub.dev, about 128k downloads in the last 30 days. Its last release was 04-06-2024. It applies the Kotlin Gradle Plugin, as
device_info_plus,package_info_plusandshared_preferences_androidhere do too. Flutter warns that a future version will require those plugins to migrate.