6.5K members online now
Understand information in your reports and troubleshoot reporting issues such as self-referrals, (not set) data, and inaccurate information
Guide Me

Analytics API gives wrong users count when fetching paginated result

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Trying to get data using GA API for java like it's described in the devguide.


  • pagePath
  • date
  • country
  • hostname
  • userType


  • pageviews
  • sessions
  • users
  • uniquePageviews
  • bounceRate
  • pageValue
  • exitRate

I'm quering for a single date, max-result = 10000. There are more than 10k rows in result, so I'm quering in a loop using start-index.

The problem with that query is that in the resulting data number of users is ~3 times greater than number of sessions. When I'm making a simpler query (ga:users, ga:sessions broken by ga:datefor the same date) the ration seems valid -- users/sessions = 0.8

Source code is available in a repository

Any ideas on how to get valid users count with that more complex query?