简体   繁体   中英

Check Google analytic (android) integrate is success or not?

I have just integrate the google analytic but in the console there is no result (even the real time).

Are there any way to know whether it is fail or success but need some times to effective and show result?

From log cat there is some logging like this:

Thread[GAThread,5,main]: putHit called
Thread[GAThread,5,main]: Sending hit to service   PATH: https:  PARAMS: sr=1080x1776,  ht=1428910710894,  cd=org.oshc.oshpedia.Activity.Main,  _u=.8,  cid=18ce1ff1-1cf5-4562-b295-f32e908e5382,  av=1.0,  a=1223578316,  v=1,  an=OSHPedia,  ul=en-gb,  t=screenview,  tid=UA-48005731-3,  sc=start,  aid=org.oshc.oshpedia,  

Also , if I just want to know the number of active users, do I need to put the code

Tracker t = gs.getTracker(TrackerName.APP_TRACKER);
        t.setScreenName("Main Page");
        t.send(new HitBuilders.AppViewBuilder().build());

in all activities/ fragment or just the entry activity (MainActivity)? Since when I initial the tracker I config it like this already

tracker.enableAutoActivityTracking(true);

Thanks for helping.

Enabling verbose/debug logging and looking at the logcat for GAV4 tags is the easiest way to validate what data is Analytics sending. If you see Sending hit to service then your data is being uploaded:

Thread[GAThread,5,main]: Sending hit to service ...

Real-time reports gets about 2 minutes to update on Google Play devices (most Android phones) but if you setup a new account sometimes it might take up to a day for real-time to start showing up in the console.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM