cuongpd / gapi-google-analytics-php-interface

Automatically exported from code.google.com/p/gapi-google-analytics-php-interface
0 stars 0 forks source link

Illegal combination of dimensions and metrics - visitors with hour #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Trying to fetch data with combination of visitors with hour but its
giving error "Illegal combination of dimensions and metrics".
2.
http://code.google.com/apis/analytics/docs/gdata/gdataReferenceDimensionsMetrics
.html
provides the details of dimensions and metrics.
3. "ga:visitors  | Total number of visitors to your site for the requested
time period. When requesting this metric, you can only combine it with time
dimensions such as ga:hour or ga:year."
Above text is mentioned but "ga:visitors is not running with ga:hour", but
it is working with ga:year.

What is the expected output? What do you see instead?
Data should be available with given dimensions and metrics but it is
showing error.

What version of the product are you using? On what operating system?
gapi.class.php 1.0 on windows vista, also tried on windows xp

Please provide any additional information below.
There is a wrong condition in the code for "ga:visitors with ga:hour".
Changing the condition will solve the issue.

Original issue reported on code.google.com by thakur.r...@gmail.com on 28 May 2009 at 11:17

GoogleCodeExporter commented 9 years ago
Hi thakur.raghubir,

This error is generated at the Google end. They are refusing to accept the 
metric
ga:visitor with the dimension ga:hour.

There is no bug with GAPI - the interface is correctly sending the metrics and
dimensions in the Url:

https://www.google.com/analytics/feeds/data?ids=ga:16062985&dimensions=ga:hour&m
etrics=ga:visitors&sort=ga:visitors&start-date=2009-04-29&end-date=2009-05-29&st
art-index=1&max-results=30

GAPI responding to the 404 error from Google with an exception, the 'Illegal
combination of dimensions and metrics' message is being returned from Google 
Analytics.

Please notify Google of this bug.

Cheers,
Stig

Original comment by stigmann...@gmail.com on 29 May 2009 at 1:47