AbdFatah / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Runtime setup ga_trackingId #263

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Name of related component: Mobile Tracking
SDK: Google Analytics SDK for Android v2 (Beta)

Request summary:
For basically usage need put ga_trackingId in static res file.
I want to setup my ga_trackingId later on runtime.
I get ga_trackingId from API at web server, when app starts I dont have any 
tracking id, and i get my tracking id later from api.

How I can setup ga_trackingId on runtime?

For previous version of sdk, I use source code from examples: EasyTracker.
It has ParameterLoader, I implement my ParameterLoader, it parse setting from 
xml file, but tracking id was parsed from web api and I init easy tracker when 
api is ready.

In current version EasyTracker included to sdk lib. And it not have any public 
method to setup my own ParameterLoader.
Can you implement something like:
public void setContext(Context context, ParameterLoader parameterLoader);
Or something else?

Thousands, millions of users can install the application. And in the future 
I'll need to change the tracking id, to do this it is necessary to release a 
new version, and all users will need to upgrade. However, you can simply change 
the tracking id in the API on a remote server, and all users will use the new 
tracking id, and will not need to update the entire application.

Thanks.

Original issue reported on code.google.com by omi...@gmail.com on 9 Feb 2013 at 9:46

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
i have the same problem, wait for the answer

Original comment by dimmyChe...@gmail.com on 7 Mar 2013 at 11:17

GoogleCodeExporter commented 9 years ago
I am also having the same problem. I also see there is no answer yet.

Original comment by justin.s...@gmail.com on 3 Apr 2013 at 6:54

GoogleCodeExporter commented 9 years ago
Please support runtime configuration of EasyTracker.
This is needed to keep Debug builds from polluting Release builds reporting.

Original comment by npeer2...@gmail.com on 21 May 2013 at 3:09

GoogleCodeExporter commented 9 years ago
This use case is supported. To set the tracking ID of an EasyTracker at runtime 
in v2.x:
EasyTracker.getTracker().set(ModelFields.TRACKING_ID, "UA-XXXX-Y");

This is also similarly supported in v3.x of the SDKs.

Re: server-side configuration of GA, Google Tag Manager for Mobile enables 
server-side, on the fly configuration of your Analytics implementation, 
including the tracking ID, and other configuration options for both Android and 
iOS.  More info here: http://www.google.com/tagmanager/

Closing issue.

Original comment by awa...@google.com on 8 Nov 2013 at 11:46