Differences between Reporting API data and UI data

1,695 views
Skip to first unread message

Emiliano Martinez

unread,
Nov 21, 2014, 3:43:11 PM11/21/14
to google-analytics...@googlegroups.com

Hi!

I have an installed application that uses the Core Reporting v3 API to get real time data from Google Analytics, and show it in our own dashboard.

Now we are trying to make comparatives with previous year data, and I found some differences in pageviews, between data from Core Reporting v3 API, and data from Analytics UI, for the same client, same date, etc

Anyone could know why exists this difference, and how we can fix it?


Thanks and regards,

Emiliano

Kushan Shah

unread,
Nov 22, 2014, 8:49:30 AM11/22/14
to google-analytics...@googlegroups.com
Hi Emiliano,

Can you confirm whether the data from the API or UI has been sampled? Discrepancy in the metrics could arise due to Sampling.

Emiliano Martinez

unread,
Nov 22, 2014, 10:57:04 AM11/22/14
to google-analytics...@googlegroups.com
Hi, Kushan:

In the UI we use "Slower response, greater precision" and with the API we set the sampling Level in HIGHER_PRECISION.
I think it is the right way to do it

Thanks and regards
Emiliano

Emiliano Martinez

unread,
Nov 24, 2014, 3:42:47 PM11/24/14
to google-analytics...@googlegroups.com
 
Expanding the issue, it appears that the problems are in with ga:pageviews and with the Average time on site (we use ga:sessionDuration and ga:sessions for this metric)
We need to fix this ASAP, so any help or any guide will be great!

Thanks and regards
Emiliano

Mike Sullivan

unread,
Nov 24, 2014, 8:08:42 PM11/24/14
to google-analytics...@googlegroups.com
It would help if you told us exactly what was in your query and what report you were comparing it to.  

dimensions=?
metrics=?
filter=?
segment=?
date range=?

My experience is that you can get the numbers to match, so long as you can match the query conditions exactly. Your challenge is to figure out why the query you are using is not the query they are using for the UI data you are looking at.

Emiliano Martinez

unread,
Nov 25, 2014, 10:49:56 AM11/25/14
to google-analytics...@googlegroups.com
Hi, Mike:

I'll try to expand the information:
In the UI what we do it's going to Audience->Overview and there we add a new segment, for Organic Traffic. The metric we use is Pageviews. Here, for example, for a profile, we get 794 pageviews for a particular day, November 2, 2013.

With the API, I set:

no dimensions (we tried with ga:keyword, but the sum af all the data has the same error)
metrics=ga:pageviews
filter=ga:medium==organic
start-date=2013-11-02
end-date=2013-11-02

Here, in the same example and the same profile, we get 794 pageviews, a difference of 2.

This is just an example, real, but an example. We have several accounts with this problem

Thanks and regards,
Emiliano

Mike Sullivan

unread,
Nov 25, 2014, 12:52:19 PM11/25/14
to google-analytics...@googlegroups.com
OK - very subtle difference between the two queries: a filter is not the same as a segment.  In most cases there should be absolutely no difference between the two responses, but I have found there are odd cases that pop up from time to time that create exceptions.

Try making a query with the API applying the Organic segment (gaid::-5) and see if the results are the same. If they are, you can start questioning how that might be possible....but you will have solved your reporting differences.

m

Emiliano Martinez

unread,
Nov 25, 2014, 3:54:45 PM11/25/14
to google-analytics...@googlegroups.com
Mike, thank you very much!!! Me must continue the testing, but it appears like exactly that was the problem!! You are really a life saver!

Thanks and regards,
Emiliano
Reply all
Reply to author
Forward
0 new messages