How to pass a tracking ID to the apk on install

605 Views Asked by At

Simple as this,

My affiliates send users to my app in google play, on install my app picks up who sent that install.

Is that even possible?

Example: https://play.google.com/store/apps/details?id=com.netmarble.mherosgb&someid=AFFILIATEID

I know I can have GA but I dont need that, I need my application to "know" exactly who sent the user who installed it.

2

There are 2 best solutions below

0
On BEST ANSWER

InstallReferrerReceiver is broadcast which will fire when an app is installed from the Google Play Store

In onReceive method takes the referrer extra from the intent and breaks it down into key/value pairs to get all data from url.

See following example for more help:

Tracking install sources for Android apps

0
On

As per my understanding for your requirement it's seems to be not possible, Rather than you can do following things, 1) provide extra reference code field with your current field on registration page. 2) After registration provide each user unique code(via email or sms) and stored the same against the user registration details. 3) When user want to refer your app then user will provide there reference code to other user. 4) At time of registration user put that code in reference code field so it will become easy for you to know which user refer new user at time of its registration.