Mobile app version of vmapp.org
Login or Join
Samaraweera270

: Number of users today - two sources of truth? I built a custom webapp which shows today's total number of users for an analytics property. Wanting to verify that the shown value is correct,

@Samaraweera270

Posted in: #AnalyticsApi #GoogleAnalytics

I built a custom webapp which shows today's total number of users for an analytics property. Wanting to verify that the shown value is correct, I get three different values from google analytics:


on a custom dashboard, I created a widget configured to show a pie chart of new and returning users. Configuration is unfiltered, displaying Users by User Type. It shows the most users (149).
at Audience > Overview I can see a tile "Users". It shows around 10 less than the custom dashboard (135).
Lastly, the reporting API v4 sends a value for ga:users close to what is shown in audience overview, but tends to fluctuate: once I'm sent 140 users, 10 or 20 seconds later, the response is 135, then again back to 140.


I verified that the date is set to "today" for each of these methods.

Does anybody know why these values diverge? Perhaps, the two latter values are just lagging behind? Are the user numbers for the current day not reliable in general?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Samaraweera270

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sent6035632

Don't know that I can answer why, but let's look at what's happening.


Your custom app, see how you are calculating current users, how often do you refresh with new data? When do your time periods start and end?
Look at how you are determining "returning" from "new" visitors.
for the API and Analytics: You're using 1 day, and you've set your date range appropriately. And that is based on number of unique visitors who initiated sessions on your app on that day (from 00:01-23:59), (per Google's documentation) and that could be totally different from the number of users at the time you look at your stats.
Why is it fluctuating? Perhaps something with the lag between getting the metric from Analytics and displaying it on your screen.


I would recommend that you confirm that your app is using the exact same time parameters as Google's API and Analytics. On your custom dashboard, could it be that some users are being double counted by that "user type" grouping? Make sure your comparison is apples to apples and then launch it fresh (clear history, cache, fresh browser window.)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme