Re: Report with dimension DOMAIN_NAME nd metriv PAGE_VIEWS give error

73 views
Skip to first unread message

Jose Alcérreca (AdSense API Team)

unread,
Mar 21, 2013, 7:53:39 AM3/21/13
to adsen...@googlegroups.com
Hi there,

Your query seems to be using COUNTRY_CODE instead of DOMAIN_NAME. In either case, the 500 error should have a reason or a message and it may be telling you that the dimensions and metrics specified are incompatible.

Cheers,
Jose


---
Jose Alcérreca
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902


Google Inc.| Developer Relations | AdSense API Team | developers.google.com/adsense


On Thursday, 21 March 2013 10:58:46 UTC, The Mediacommentator wrote:
Hi,
 
The following query
gives me the following error: 500 Internal Server Error
 
while some other querys work OK
 
Please help

Jose Alcérreca (AdSense API Team)

unread,
Mar 21, 2013, 10:23:08 AM3/21/13
to adsen...@googlegroups.com
Hi,

Looks like there is something wrong because I just tried the same request and it worked:


GET https://www.googleapis.com/adsense/v1.2/reports?startDate=2013-01-01&endDate=2013-03-21&dimension=MONTH&dimension=COUNTRY_CODE&metric=PAGE_VIEWS&key={YOUR_API_KEY}


200 OK
{
"kind": "adsense#report",
"totalMatchedRows": "2",
"headers": [
{
"name": "MONTH",
"type": "DIMENSION"
},
{
"name": "COUNTRY_CODE",
"type": "DIMENSION"
},
{
"name": "PAGE_VIEWS",
"type": "METRIC_TALLY"
}
],
...

Can you please email us your account address so we can check if there's something wrong? adsense...@google.com

Thanks,
Jose

---
Jose Alcérreca
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902


Google Inc.| Developer Relations | AdSense API Team | developers.google.com/adsense


On Thursday, 21 March 2013 14:02:20 UTC, The Mediacommentator wrote:
Yes, I first tried DOMAIN_NAME, when it failed, I tried COUNTRY_CODE which failed in exactly the same way.
In both cases the 500 Error gave Null as the reason
 
Where do I go now?

Jose Alcérreca (AdSense API Team)

unread,
Mar 21, 2013, 11:12:03 AM3/21/13
to adsen...@googlegroups.com
Hi,

Everything looks OK. Are you using client libraries for the request? it may be a problem with multiple dimensions. Can you try making the request with the APIs explorer? Please copy everything you can if you get the error.


Thanks!
Jose


---
Jose Alcérreca
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902


Google Inc.| Developer Relations | AdSense API Team | developers.google.com/adsense



On Thursday, 21 March 2013 14:32:41 UTC, The Mediacommentator wrote:
Hi,
Thanks for getting back so soon, I'm logged in as mediacom...@gmail.com

Jose Alcérreca (AdSense API Team)

unread,
Mar 22, 2013, 9:25:42 AM3/22/13
to adsen...@googlegroups.com
Hi,

There is a limit but it should you should see a specific error and we're investigating the issue. If you make the same request using the AdSense website (google.com/adsense/) you'll see that you have too many sites. You don't even need to specify MONTH to hit the limit. We'll look into the issue with your account and I'll let you know once we have an answer.

Cheers,
Jose


---
Jose Alcérreca
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902


Google Inc.| Developer Relations | AdSense API Team | developers.google.com/adsense


On Friday, 22 March 2013 10:09:07 UTC, The Mediacommentator wrote:
Hi,
Thinking on this problem, is there any limit on the number of rows that can be handled???

Jose Alcérreca (AdSense API Team)

unread,
Mar 26, 2013, 5:26:51 AM3/26/13
to adsen...@googlegroups.com
Hi there,

Yes, you should be able to see the report throughout the week. 

Cheers!
Jose


---
Jose Alcérreca
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902


Google Inc.| Developer Relations | AdSense API Team | developers.google.com/adsense



On Tuesday, 26 March 2013 09:13:58 UTC, The Mediacommentator wrote:
Hi Jose,
 
Any progress on this?

Jose Alcérreca (AdSense API Team)

unread,
Mar 26, 2013, 12:03:16 PM3/26/13
to adsen...@googlegroups.com
Hi,

You can use the request data:

GET https://www.googleapis.com/adsense/v1.2/reports?startDate=2010-10-10&endDate=2012-10-10&dimension=MONTH&metric=PAGE_VIEWS&key={YOUR_API_KEY}

Authorization:  Bearer ya19.HES6ZTmlH2GSXXXXXXXXXXXXXXXXXXXXXXXXXXX
X-JavaScript-User-Agent:  Google APIs Explorer

To generate this URL:


Bear in mind that the access token expires quickly.


Cheers,
Jose

---
Jose Alcérreca
Developer Relations

Google UK Limited
Registered Office: Belgrave House, 76 Buckingham Palace Road, London SW1W 9TQ
Registered in England Number: 3977902


Google Inc.| Developer Relations | AdSense API Team | developers.google.com/adsense


On Tuesday, 26 March 2013 15:13:04 UTC, The Mediacommentator wrote:
Jose,
 
It is working now from the APIs Explorer , thanks for all your help.
 
When I copy the generated request to the address bar of my browser and add the parameter alt=csv, the application says Login Required. How do I Login?
 
Regards
 

On Tuesday, 26 March 2013 10:11:52 UTC, The Mediacommentator wrote:
Hi Jose,
 
Should it be working now? I've tried it and I see no change.
 
Regards
Reply all
Reply to author
Forward
0 new messages