I'm trying to setup the Campaign Measurement
system to track where the users find my app. I've implemented the first part Google Play Campaign Attribution this but I can't seem to figure out how to do the General Campaign & Traffic Source Attribution one.
It says that:
// In this example, campaign information is set using
// a url string with Google Analytics campaign parameters.
// Note: This is for illustrative purposes. In most cases campaign
// information would come from an incoming Intent.
but I can't find any doc that specifies what would the name of the string received in the Bundle
, or how exactly I should retrieve that url. I'm guessing it'll be sent to the app automatically, but I'm not 100% on how I must retrieve it.
Any ideas?
Whenever any end-user clicked the ad on some social networking site or email, user will hit a url and this url will be sent to your application intent.
You can retrive this url via following code in your activity class:
Intent intent = getIntent();
Uri data = intent.getData();
and then you can send this data to GA for tracking using setCampaignParamsFromUrl() function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With