I have a single app, but depending of user's choice, it will be monitored totally separated in google analytics, so I NEED to set "ga_trackingId" for EasyTracker programmatically.
I've tried EasyTracker.getTracker().setAppId(id)
with no luck.
I have a single app, but depending of user's choice, it will be monitored totally separated in google analytics, so I NEED to set "ga_trackingId" for EasyTracker programmatically.
I've tried EasyTracker.getTracker().setAppId(id)
with no luck.
For changing the id for the EasyTracker, do this:
onStart()
onStop()
i found
myInstance.setDefaultTracker(myNewTracker);
not working. I did this instead: Set up a common library project. Each apk project gets a analytics.xml in res\values folder with its unique id.The accepted answer didn't work for me, as I saw this in my logs:
The solution for analytics v3 is:
Calling it this way got rid of the error and I can see my events on the analytics page.
I didn't try it myself, but from description in here, you can create a new tracker by
You can have two different config xml files and set it like this:
Note, that you are passing xml file, not the trackingId file:
Note the difference xml.app_tracker vs string.ga_trackingId!
Use
xml.app_tracker
configuration file!