Google Analytics API return no error, but no data either

452 views
Skip to first unread message

Stephane Guerin

unread,
Jan 10, 2011, 6:54:07 PM1/10/11
to google-analytics...@googlegroups.com
Hi,

I have a GA profile that returns no data using the API. The weird thing is that I have data when I go on Google Analytics. Also, all my others profiles return data correctly.

Here's my request:

https://www.google.com/analytics/feeds/data?ids=ga:40666204&metrics=ga:visits,ga:pageviews&start-date=2010-01-01&end-date=2011-01-01

The only thing I could see is that this account was created on the january 3rd 2011. If so, how much time does it takes for data to be available in the Google Analytics API? There is no errors either.

Here's a part of the feed returned:

<generator version='1.0'>Google Analytics</generator>
<openSearch:totalResults>0</openSearch:totalResults>
<openSearch:startIndex>1</openSearch:startIndex>
<openSearch:itemsPerPage>0</openSearch:itemsPerPage>
<dxp:aggregates>
<dxp:metric confidenceInterval='0.0' name='ga:visits' type='integer' value='0'/>
<dxp:metric confidenceInterval='0.0' name='ga:pageviews' type='integer' value='0'/>
</dxp:aggregates>
<dxp:containsSampledData>false</dxp:containsSampledData>

I tried with both version 1 and 2. No luck.

Any idea?

Art

unread,
Jan 10, 2011, 10:54:48 PM1/10/11
to google-analytics...@googlegroups.com
I believe your query is requesting data from January 1, 2010 to January
1, 2011. If the analytic account was in fact created on January 3, 2011,
there should be no data available because the account did not exist
during the specified period.

I think you should run a query beginning Jan. 3, 2011. Unless I don't
get the full picture, of course.

> --
> You received this message because you are subscribed to the Google
> Groups "GA Data Export API" group.
> To post to this group, send email to
> google-analytics...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-analytics-data-...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-analytics-data-export-api?hl=en.

Stephane

unread,
Jan 10, 2011, 11:08:55 PM1/10/11
to google-analytics-api - GA Data Export API
Ok... now I feel terrible. I checked the dates many times!!

It's one of those days...

Thanks a lot ;-)

Stephane


On Jan 10, 10:54 pm, Art <alsta...@gmail.com> wrote:
> I believe your query is requesting data from January 1, 2010 to January
> 1, 2011. If the analytic account was in fact created on January 3, 2011,
> there should be no data available because the account did not exist
> during the specified period.
>
> I think you should run a query beginning Jan. 3, 2011. Unless I don't
> get the full picture, of course.
>
> On 1/10/2011 6:54 PM, Stephane Guerin wrote:
>
> > Hi,
>
> > I have a GA profile that returns no data using the API. The weird
> > thing is that I have data when I go on Google Analytics. Also, all my
> > others profiles return data correctly.
>
> > Here's my request:
>
> >https://www.google.com/analytics/feeds/data?ids=ga:40666204&metrics=g...
Reply all
Reply to author
Forward
0 new messages