Testing Google Play Install Referrer Library Testing Google Play Install Referrer Library android android

Testing Google Play Install Referrer Library


There's one old hack to test this.

Steps:

  1. Start Google Play on the device using campaign link, for example, https://play.google.com/store/apps/details?id=com.test.test_project&referrer=utm_source%3Dtest_source%26utm_medium%3Dtest_medium%26utm_term%3Dtest-term%26utm_content%3Dtest_content%26utm_campaign%3Dtest_name(You can use google play generator: https://developers.google.com/analytics/devguides/collection/android/v3/campaigns#google-play-url-builder)

  2. DON'T TAP ON INSTALL BUTTON

  3. Install your test build using adb. adb install -r app-debug.apk

Google Play will be returning your test campaign now.


This is the summary of my test:

  1. old broadcast way can test.But it's deprecated and not support for now
  2. U can test install referrer lib set up by use adb,and you will get utm_source=google-play&utm_medium=organic just like download form Google Play directly.But we can't get more info, it's can only test your library settings is correct
  3. https://stackoverflow.com/a/60342463/12716149 by @Quickern.To be honest, it works follow these tips
  4. Use Beta test provided by Google Play: https://stackoverflow.com/a/49750758/12716149.Without a doubt, it works
  5. Use emulator:https://stackoverflow.com/a/59744213/12716149 @Marilia. I didn't test this, because emulator with Google Play Store is just like a real device.And the answer said the condition is upload app to Google Play store,so I think it's just like article 4


I was able to test the Play Install Referrer Library using the emulator. Uninstalling the app and running it again would start a connection and give me the expected responseCode in onInstallReferrerSetupFinished.