google analytics doesn't show the active user in Real time overview

后端 未结 2 541
再見小時候
再見小時候 2020-12-31 05:08

i have setup every thing in my app for using google analytics V4 and i get every things working and i can see it but when i go to real time overview in my mobi

相关标签:
2条回答
  • 2020-12-31 05:54

    I've been looking at the v4 analytics today, and have also had trouble getting screen views to post. Here are a couple things I've dug up during my investigations that may be helpful for you:

    • AppViewBuilder is deprecated in favor of ScreenViewBuilder (see the HitBuilders source code). This part of the documentation is, presumably, out of date. Edit Mar 6, 2015: it would appear that the linked documentation has now been updated to use ScreenViewBuilder.

    • If my interpretation of the documentation is correct, it should not be necessary to explicitly post screen views using a ScreenViewBuilder when the auto activity tracking feature is enabled (which I see is the case in your configuration file).

    • By default, the current date is not included in your Google Analytics stats. You can choose to include it by manually selecting a date range (see drop-down control at the top right of most GA pages).

    • Make sure you shorten the dispatch period for debug builds - by default, events are batched and sent every 30 minutes, but for testing it's ok to reduce this to a few seconds. See the answer from @vangoz for implementation details.

    Hope some of that helps you.

    Edit: related, but I see you've already posted there: Google Analytics API v4 for Android Does NOT Send Screen Views

    0 讨论(0)
  • 2020-12-31 05:58

    For me it turns out Google Analytics only dispatch the data every 30 minutes by default. So changing the dispatch time for testing show the realtime data with some delay.

    GoogleAnalytics.getInstance(this).setLocalDispatchPeriod(15);
    

    Reference: https://developers.google.com/analytics/devguides/collection/android/v4/dispatch

    0 讨论(0)
提交回复
热议问题