Reputation: 15402
I installed the Google Analytics SDK in my app.
I want to be able to have real time analytics (new feature proposed by Google).
My code:
tracker = GoogleAnalyticsTracker.getInstance();
// the tracker is started with a dispatch interval of 20 seconds.
tracker.startNewSession("UA-XXXXX", 20, theContext);
tracker.trackEvent("Init", theContext.getPackageName(),"NoLabel", 0);
tracker.dispatch();
I can follow the "Init" event but the real time stats (giving for example the actual number of users using my app) doesn't work, even if I took can to init my tracker with a dispatch time, and not like this:
tracker.startNewSession("UA-XXXX", theContext);
Do you know how to solve this issue ?
Thanks !!
Upvotes: 1
Views: 1953
Reputation: 10348
You should use trackPageView if you want it to work with real time Google Analytics. They haven't yet enabled this for events, only for page views, unfortunately.
Upvotes: 9