How to test google play referrer api before publishing in Google play store?
Asked Answered
C

4

18

Google announced their Google Play Referrer API at 20 November 2017 as new way to track app installs. My question is: Is there any way to test the function before my app is released in Google play?

Chapbook answered 6/3, 2018 at 9:31 Comment(0)
V
7

Update

Beta test only works for referrer broadcast. I implement both installreferrer API and broadcast at the same time, so the referrer is from broadcast instead of API.


Use Beta test provided by Google Play as following:

  1. Submit beta test APK file
  2. Add your account to the testers
  3. Open the detail page url of your APP with a referrer. The url can be like this according to a similar thread:

    https://play.google.com/store/apps/details?id=com.mypackage&referrer=utm_source%3Dmobisoc%26utm_content%3D{transaction_id}%26utm_campaign%3D1

  4. If using Chrome, the url can be redirected to Play APP by clicking "Open in Play Market APP" button on the page.
  5. Download and install your APP in Play APP.

Your app should then receive a referrer after launch, and you can test it by reporting it or printing a log.

Alpha test should also work, but I have not test that.

Vollmer answered 10/4, 2018 at 9:59 Comment(4)
Excuse me, do you mean Play Install Referrer API is not working with Alpha and Beta channels?Cadi
@VadimKotov In my case, yes.Vollmer
Do you know what happens if Install Referrer API is not supported? How do you know which one has fired? Do you save a record of which one (if any) has fired so that if the other one happens you don't do the work again?Denham
Alpha test works for me with installreferrer API without adding a broadcast. I followed the same steps outlined above but I kept getting (not set) for utm source and medium. Make sure that the email you are signed into on the play store and the phone is different from the developer email on the app listing. I was signed into the playstore with my developer email and I kept getting (not set) for utm source and medium. I changed it to my personal email and removed all mentions of my developer email from my test device (from gmail, from accounts in phone settings) and then it started working.Tiana
C
26

You can test it without uploading on Playstore.

I did in following way.

  1. I have created urls like https://play.google.com/store/apps/details?id=fullpackagename&referrer=utm_source%3Dmobisoc&utm_content%3Dmobisoc&hl=en
  2. I have fired this url from my mail. It redirects to Playstore
  3. From command Prompt(using adb command) , I have installed desired apk.
  4. On Playstore, "install" button will be replaced with "open" button and I clicked on that. it is working
Columbus answered 30/10, 2019 at 8:17 Comment(15)
I tried your method. But it always gives a 'not set' value in both utm_source and utm_medium.Peplos
same issue @YaseenHussain..have you found the solution?Mallorie
@VikasRai It worked for me. Were you triggering the URL via ADB? I noticed that when I sent them via adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d https://example.com/page?a=a_value&b=b_value, the part after & would be dropped out. Be sure to do something like sending an SMS with the link via the emulator or copy + pasting the link into a browser.Minhminho
This doesn't work for me either (url is loaded from email, apk from adb). The PlayStore install button changes to open, but the utm fields are both empty like @YaseenHussain mentioned. Has anyone figured it out?Evaginate
@Evaginate This plugin worked for me npmjs.com/package/cordova-install-referrer-api You should use the beta testing method as mentioned above for this plugin to work. I did try and it worked in first attempt itself. Cheers!Peplos
This doesnt work. Says "Dropped referrer for com.XXX.XXX because dropped_already_installed". Android drops the referrer link when already installed. Only beta method works.Chaeta
I am always getting utm_source=(not set)&utm_medium=(not set).Philanthropist
@AmanArora: did you find a solution since your last comment? Because I have this problem currently :(Maroc
For testing : 1. Create a playstore URL with your utm params. use campaign builder for this. 2. When you click on this message, playstore will open with Install button showing. 3. Instead of downloading from playstore, just fire adb install command to install from studio. 4. When install button changes to open in playstore, just open the app from that button. You'll get your utm params.Philanthropist
I do not understand how this answer is not the one that was accepted ...Paresh
For those trying but not seeing the install button change to an open button it might be because you use different application ids for the app flavor on Google Play and the one you have installed via adb. Make sure the application ids are the same, this can be validated in build.gradle and AndroidManifest.xml.Offensive
My 50 cents: be sure the app is not installed before step 1, step 4 does not need to be done in GP. (So you can run just directly from AS)Priggery
I am getting UTM params but I am not getting referrer click time and app install time.. can any one give me suggestion regarding this?Dreadnought
Works like a charm! In case you get (not set) parameters - click the link directly from email/sms/whatever instead of pasting it into browser and then opening the store app.Glob
I know this might be too late but it could help someone else. I followed the same steps outlined above but I kept getting (not set) for utm source and medium. Make sure that the email you are signed into on the play store and the phone is different from the developer email on the app listing. I was signed into the playstore with my developer email and I kept getting (not set) for utm source and medium. I changed it to my personal email and removed all mentions of my developer email from my test device (from gmail, from accounts in phone settings) and then it started working.Tiana
V
7

Update

Beta test only works for referrer broadcast. I implement both installreferrer API and broadcast at the same time, so the referrer is from broadcast instead of API.


Use Beta test provided by Google Play as following:

  1. Submit beta test APK file
  2. Add your account to the testers
  3. Open the detail page url of your APP with a referrer. The url can be like this according to a similar thread:

    https://play.google.com/store/apps/details?id=com.mypackage&referrer=utm_source%3Dmobisoc%26utm_content%3D{transaction_id}%26utm_campaign%3D1

  4. If using Chrome, the url can be redirected to Play APP by clicking "Open in Play Market APP" button on the page.
  5. Download and install your APP in Play APP.

Your app should then receive a referrer after launch, and you can test it by reporting it or printing a log.

Alpha test should also work, but I have not test that.

Vollmer answered 10/4, 2018 at 9:59 Comment(4)
Excuse me, do you mean Play Install Referrer API is not working with Alpha and Beta channels?Cadi
@VadimKotov In my case, yes.Vollmer
Do you know what happens if Install Referrer API is not supported? How do you know which one has fired? Do you save a record of which one (if any) has fired so that if the other one happens you don't do the work again?Denham
Alpha test works for me with installreferrer API without adding a broadcast. I followed the same steps outlined above but I kept getting (not set) for utm source and medium. Make sure that the email you are signed into on the play store and the phone is different from the developer email on the app listing. I was signed into the playstore with my developer email and I kept getting (not set) for utm source and medium. I changed it to my personal email and removed all mentions of my developer email from my test device (from gmail, from accounts in phone settings) and then it started working.Tiana
H
1

None mentioned in the Play Install Referrer API. So sadly, no. Try filing a feature request here.

Heritor answered 6/3, 2018 at 23:47 Comment(0)
A
0

According to this documentation

Google Play’s new Install Referrer API replaces the deprecated InstallBroadcast used for Google Play Campaign Attribution.

I did some tests and I figured out that if you have the Firebase configured in you app and "FirebaseApp.initializeApp(this)" in your application class so Firebase collect referrer information and provide a dashboard with this information without any other implementation, only calling "FirebaseApp.initializeApp(this)".

On Firebase Console -> Analytics -> Conversions -> Conversion Events -> first_open then you'll can see somthing like that

enter image description here

If you built a url like the one bellow to your app on Play Store, where you see google-play and (direct) will be added the new item newsletter (It can be not at realtime)

https://play.google.com/store/apps/details?id=app.packace&referrer=utm_source%3Dnewsletter%26utm_medium%3Demail%26anid%3Dadmob

BTW the solution proposed by eager realy works (at least for me) to test if you app is receiving the referrer url

My point here is, if you want to know if a campaign made using referrer url is working, Firebase Console provides this information, but if you want to know for each user what was the referrer url that led then to install the app so you will need to implement your own solution.

Afterglow answered 2/10, 2020 at 11:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.