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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
ju duan
  • 305
  • 2
  • 8

4 Answers4

25

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
eager
  • 597
  • 8
  • 18
  • 1
    I tried your method. But it always gives a 'not set' value in both utm_source and utm_medium. – Yaseen Hussain Jan 20 '20 at 07:52
  • same issue @YaseenHussain..have you found the solution? – Vikas Rai Feb 05 '20 at 06:51
  • 1
    @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. – tinsukE Feb 24 '20 at 15:25
  • 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? – Tako Feb 28 '20 at 23:45
  • 1
    @Tako This plugin worked for me https://www.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! – Yaseen Hussain Mar 05 '20 at 04:27
  • 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. – Ajitha Apr 16 '20 at 12:10
  • 1
    I am always getting utm_source=(not set)&utm_medium=(not set). – Aman Arora Apr 27 '20 at 09:31
  • @AmanArora: did you find a solution since your last comment? Because I have this problem currently :( – anthony May 25 '20 at 17:44
  • 2
    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. – Aman Arora May 28 '20 at 13:23
  • 1
    I do not understand how this answer is not the one that was accepted ... – Greelings Jul 01 '20 at 16:17
  • 1
    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. – Kevin Barron Jul 25 '20 at 15:56
  • 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) – Velda Oct 29 '20 at 16:57
  • 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? – Abhinav Gupta Nov 26 '20 at 05:17
  • 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. – Kamil Rykowski Jan 14 '21 at 11:25
  • 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. – Marline May 17 '22 at 01:44
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.

thundertrick
  • 1,634
  • 1
  • 17
  • 22
  • 1
    Excuse me, do you mean Play Install Referrer API is not working with Alpha and Beta channels? – Vadim Kotov May 01 '19 at 13:07
  • @VadimKotov In my case, yes. – thundertrick May 05 '19 at 03:15
  • 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? – CACuzcatlan Sep 19 '19 at 19:19
  • 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. – Marline May 17 '22 at 01:42
1

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

ReyAnthonyRenacia
  • 17,219
  • 5
  • 37
  • 56
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.