I’m implementing some code to do my own referral tracking on downloads from the Android market.
See Android referral tracking does not work for an idea of what my app is doing.
How can I test if this code is working before deploying to the public?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The easiest way is using
adb. You don’t have to write any code.Just run in a terminal:
Here’s my exact line:
But your
BroadcastReceivermay need to be theAnalyticsReceiver, i.e.For Google Analytics v2:
For Google Analytics v3:
For Google Analytics v4:
As Luigi said, you can also leave out the
"-n"componentname part, but then every app on your device will receive the referral. This can be a good extra test to see if yourBroadcastReceivercan be found properly.The output I see (especially the last line is important):