1

I'm using the Ruby gem Garb to pull some view counts from Google Analytics. I can authenticate with no problem using my username/password. When I attempt to pull data, however, I get the response:

<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<errors xmlns=\"http://schemas.google.com/g/2005\">
<error>
<domain>usageLimits</domain>
<code>userRateLimitExceededUnreg</code>
<internalReason>User Rate Limit Exceeded. Please sign up</internalReason><extendedHelp>https://code.google.com/apis/console</extendedHelp>
</error>
</errors>

I've already signed up at https://code.google.com/apis/console/. There it shows that I have 50K courtesy requests per day. Problem is, even when I don't make one request in 24 hours and then attempt to make one, I'm getting the error. Any idea how to proceed? Thanks.

modulaaron
  • 2,856
  • 3
  • 24
  • 28
  • I had a similar issue, but with the maps api and this blog post helped me out - http://www.raymondcamden.com/index.cfm/2013/2/13/Getting-a-quote-error-with-Google-and-youve-barely-touched-your-limit could be a false positive with a bad error message – Matt Busche Feb 23 '13 at 01:51
  • Thanks. I have that enabled already for GA. For some GA accounts, I was able to pull data yesterday, though the traffic reports section of the console page shows no requests. This makes me wonder if the 50K daily quota is even being applied to me. I am connecting using a username/password instead of an API key - should that make a difference? – modulaaron Feb 23 '13 at 02:55

2 Answers2

0

The error may be the result of running queries within a loop. As you are restricted to 1 query per second by default. You may increase it to 10 qps but I don't think that solves your problem totally. You may add some intervals. Say using sleep(1).

Xoder
  • 1
0

I have the same issue in a different way :

  • When i try from localhost, it works fine .
  • When i execute from production, it gives me that error .

Maybe Google Analytics server block the IP adress of my production server ? if this is the case, how to unblock it again ?