lschmierer / android_play_install_referrer

A Flutter plugin for the Android Play Install Referrer API.
BSD 2-Clause "Simplified" License
21 stars 21 forks source link

Document how to test in debug and dev mode #1

Open AliShareei opened 4 years ago

AliShareei commented 4 years ago

Hi Lukas, Thank you for this good flutter Plugin. I have 2 questions about this plugin.

First. I use this plugin in my project but I don't know how can i check in debug & dev mode. Of course I did a lot of research on this and there were many ways but none worked properly for Flutter.

Second. This plugin also has the iOS tag on pub.dev. But it doesn't seem compatible. Have you come up with a good way for iOS to do the same thing or is it not possible?

Thank you again.

lschmierer commented 4 years ago

Edit: Install Referrer does not seem to work with Alpha/Beta Distribution.

Hey, thanks for your feedback!

First. I use this plugin in my project but I don't know how can i check in debug & dev mode. Of course I did a lot of research on this and there were many ways but none worked properly for Flutter.

Unfortunately there seems to be no way testing this, other than installing the app from the Play Store. ~It should be possible to publish the app on an a closed track (alpha) or internal testing track though.~

Second. This plugin also has the iOS tag on pub.dev. But it doesn't seem compatible. Have you come up with a good way for iOS to do the same thing or is it not possible?

Other than for the Play Store, passing arguments to the iOS App Store is not possible. The plugin only works for Android.

flogaribal commented 3 years ago

If I understand well your answer @lschmierer, there is no way to test this before going live? It means that we have to publish an update on the Play store and pray for it to work... :cry:

meetlukka commented 3 years ago

Hi there, When I run this code on my demo app created just to check values we will be getting from play referrer api. I am getting utm_source=google-play and utm_medium=organic when app launches after getting installed with adb. My question is, Why I am getting this values instead of direct / none values respectively

lschmierer commented 3 years ago

As I have explained several times now, I was not able to figure out a way to test this without publishing my app on the PlayStore. My app, however, is deployed to the Play Store and the referal seems to work.

If you install the application via

https://snuzzle.life/p/uHczlFVvgPTEqjcvlXga#VkdA6prrdx8Kaw1OJcBI4N/Via8jYOldg+Ttw4pLWgA=

my website redirects Andorid devices (using JavaScript) to

market://details?id=life.snuzzle.snuzzle3&referrer=https%3A%2F%2Fsnuzzle.life%2Fp%2FuHczlFVvgPTEqjcvlXga%23VkdA6prrdx8Kaw1OJcBI4N%2FVia8jYOldg%2BTtw4pLWgA%3D

which passes the content of referrer (the url of the jigsaw puzzle) to my application.

However, maybe things have changed since I worked on this. I suggest yout to carry out your own research. See e.g. https://stackoverflow.com/questions/49040093/testing-google-play-install-referrer-library/60342463#60342463

meetlukka commented 3 years ago

Thanks for instant reply, I appreciate! Just update me for one thing, do I need to add Broadcast Receiver in my app configuration or this api will automatically collect referrer data without use of Broadcast receiver, when App is already hosted on play store.

lschmierer commented 3 years ago

The library uses the new Play Install Referrer API https://developer.android.com/google/play/installreferrer/igetinstallreferrerservice Setting up a Broadcast Receiver is not requried. In fact, Google does not even support the Brodcast Receiver anymore since March, I think.

I think, since you received utm_source=google-play and utm_medium=organic, the library should be set up and working correctly. It is just that, as fars as I know, the Play Store only passes the correct referrer if you really install the app from the Play Store.

However, maybe things have changed since I worked on this. I suggest yout to carry out your own research. See e.g. https://stackoverflow.com/questions/49040093/testing-google-play-install-referrer-library/60342463#60342463

Please let me know if you somehow got this working! :)

meetlukka commented 3 years ago

Thanks for supporting. Yup Sure, will update you whatever be the output of this code. Just waiting for my app to get publish. Will let you know soon. Thanks!!!

meetlukka commented 3 years ago

Hi @lschmierer , big THANKS to you, this package is working correctly & as expected on android platform. 👍

tudosxxx commented 3 years ago

Open Google Play through the test URL measured by Google Advertising Department, and then install it in adb, you will get utm_source = google-play and utm_medium = organic. Direct installation has not been set up. Now, I send the official package to Google Play, but all the statistics received have not been set. Determine the source should be Facebook

robsoncardozorebel commented 2 years ago

Hey guys, I managed to test in debug mode as follows, but the app was in Closed beta at least

1) I created my URL with the UTM parameters

2) I sent this link via email to the email that was logged into the emulator

3) I opened the playstore through the email link (IMPORTANT PART, if you take the link and paste it in the browser you will receive a not%20set)

4) DO NOT CLICK INSTALL IN PLAYSTORE, install the app via ADB with the command:

adb install -r app-prod-release.apk

Automatically the 'Install' label will change to 'Open', clicking you will get the utm parameters easily.

lschmierer commented 2 years ago

@robsoncardozorebel cool 👍 Thanks for letting us know!

~I will close this issue but letting it pinned in the issues tab as reference for others.~

This should be documented in the README

Kravchenko1996 commented 2 years ago

@robsoncardozorebel, did you build release apk before or where should I execute the ADB command?

robsoncardozorebel commented 2 years ago

@robsoncardozorebel, did you build release apk before or where should I execute the ADB command?

If I understand your question, I first build the app and go to the folder build/app/outputs/flutter-apk/ and there I run the adb command, was I able to help you?

Kravchenko1996 commented 2 years ago

@robsoncardozorebel, great, thanks! I doubt I am doing something wrong, but now I am sure that it is my local problem

Kravchenko1996 commented 2 years ago

@robsoncardozorebel, did you find the way to do the same on iOS? Wanna check attribution in AppStore.

lschmierer commented 2 years ago

@robsoncardozorebel, did you find the way to do the same on iOS? Wanna check attribution in AppStore.

@Kravchenko1996 This is not possible on iOS as Apple does not provide APIs for that. There are some third party approaches using fingerprinting, however these are probabilistic approaches and you can't be for 100% sure.