3

I have an custom INSTALL_REFERRER, a custom class that extends the BroadcastReceiver class, and a link that goes to my app

https://play.google.com/store/apps/details?id=com.myapp.android&referrer=ai%3Dai_value%26gclid%3Dgclid_test

This link has the obvious referrer params and values: ai=ai_value&gclid=gclid_test.

When I run my app in my development adb shell, I am able to capture both of these parameters and values on the BroadcastReceiver and send it back to my server. Here's the adb command that I'm running:

am broadcast -a com.android.vending.INSTALL_REFERRER -n com.myapp.android/.CustomInstallReceiver --es "referrer" "ai%3Dai_value%26gclid%3Dgclid_test"

However, when it's live in the app store, I'm only able to capture the first param and value. Any idea what's going on or what I can check?

locoboy
  • 36,684
  • 67
  • 180
  • 255

1 Answers1

5

Accoring to this post, you cannot use custom query-string parameters (only referrer is accepted).

The good thing is that you can easly trick the problem: just "inject" the second key/value pair in the first parameter using a custom separator which is standard-complaint (so don't use the &) and treat it accordingly server side by splitting your values using the custom separator. In this way, the whole information will be transported using the working key "referrer".

Community
  • 1
  • 1
bonnyz
  • 13,098
  • 5
  • 44
  • 69