Different values when querying with the "ga:users" metric

161 views
Skip to first unread message

ti...@swydo.com

unread,
Sep 10, 2015, 5:42:54 AM9/10/15
to Google Analytics Reporting API
Hi there,

Today we noticed different values are returned when you add the "ga:users" metric to queries.

For example: 
{
  ids
: 'ga:[id-removed]',
 
'start-date': '2015-01-01',
 
'end-date': '2015-08-31',
  metrics
: 'ga:transactionRevenue',
  dimensions
: 'ga:yearMonth',
  sort
: '-ga:yearMonth',
  filters
: 'ga:medium==(none),ga:medium==(not set),ga:medium==e-mail,ga:medium==organic,ga:medium==referral,ga:medium==rss',
  quotaUser
: '[removed]',
 
'start-index': 1
}

returns a transaction revenue of 123 149,73 for August, and a total transaction revenue of: 1 043 408.95.


But:

{
  ids
: 'ga:[id-removed]',
 
'start-date': '2015-01-01',
 
'end-date': '2015-08-31',
  metrics
: 'ga:users,ga:transactionRevenue',
  dimensions
: 'ga:yearMonth',
  sort
: '-ga:yearMonth',
  filters
: 'ga:medium==(none),ga:medium==(not set),ga:medium==e-mail,ga:medium==organic,ga:medium==referral,ga:medium==rss',
  quotaUser
: '[removed]',
 
'start-index': 1
}

returns a transaction revenue of 110 543,97 for August, and a total transaction revenue of: 1 027 915,70


Except for the "ga:users" metric, the queries are identical.

Matt

unread,
Sep 14, 2015, 11:40:20 AM9/14/15
to Google Analytics Reporting API
Hello,
Can you include the full response? Does the problem persist if you remove the ga:yearMonth dimension? Does the response indicate weather or not sampling is taking place?
Feel free to respond directly and include your profile id.
-Matt


On Thursday, September 10, 2015 at 2:42:54 AM UTC-7,

ti...@swydo.com

unread,
Sep 15, 2015, 6:27:19 AM9/15/15
to Google Analytics Reporting API
Hi Matt,

Thanks for your reply! For different dimensions it doesn't seem to happen. The numbers only differ when adding the dimension ga:yearMonth in combination with the ga:users metric. Removing either ga:users or ga:yearMonth fixes the issue. How can I see if sampling is taking place or not?

I will respond privately in a bit with a response and the profile ID we first noticed this with!

Best regards,
Tiana
Message has been deleted

ti...@swydo.com

unread,
Sep 15, 2015, 9:02:50 AM9/15/15
to Google Analytics Reporting API
Hi Matt,

When getting the response data I found that sampling is taking place as soon as I try to request more than 5 months in one go. This is one of the reasons why the numbers are so different. Is there any way to get set sampling to false?

Thanks,


Tiana

On Monday, 14 September 2015 17:40:20 UTC+2, Matt wrote:

Matthew Cohoon

unread,
Sep 15, 2015, 11:53:05 AM9/15/15
to Google Analytics Reporting API
Hi There may not be away to do away with sampling entirely for a request for such a large date range. You can however adjust the samplingLevel, which would improve the accuracy. And if the property is a Google Analytics Premium property you can use the Unsampled Reports API. But the easiest solution would be to break your request up into individual months and drop the additional dimension.
-Matt


--
You received this message because you are subscribed to a topic in the Google Groups "Google Analytics Reporting API" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-analytics-data-export-api/C46DASMWfNE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-analytics-data-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages