Sites in AdSense Mgmt API and Reporting API

45 views
Skip to first unread message

Eduardo Scoz

unread,
Jan 27, 2012, 10:30:55 AM1/27/12
to adsen...@googlegroups.com
Hi guys,

the documentation for the new API doesn't seem to make any mention on how to get the sites info for an AdSense Account. I'm talking about the data available on the site at "Performance reports -> sites", not Url channels.

Any idea on how to get that data?

I've been using the API for my new iOS app, QuickAdsense, that was just released in the AppStore! http://escoz.com/quickadsense

Thanks guys!

Eduardo

Sérgio Gomes

unread,
Jan 27, 2012, 10:52:37 AM1/27/12
to adsen...@googlegroups.com
Hi Eduardo,

I believe what you're looking for is the DOMAIN_NAME dimension: http://code.google.com/apis/adsense/management/v1.1/reference/reports/generate.html

Scheduling a report with DOMAIN_NAME as the dimension and your metrics of choice should give you the same information that is displayed on that page.

Hope this helps!

Cheers,
Sérgio

---
Sérgio Gomes
Developer Relations

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

Eduardo Scoz

unread,
Jan 27, 2012, 11:17:02 AM1/27/12
to adsen...@googlegroups.com
Hi Sergio!

Thanks for the quick reply! That's exactly what I'm looking for, but how do I get the list of domains available for an adsense account?

Sérgio Gomes

unread,
Jan 27, 2012, 11:26:49 AM1/27/12
to adsen...@googlegroups.com
Hi Eduardo,

The report itself would provide the list.

I'm assuming you've been running reports based on dates (DATE, WEEK, MONTH, YEAR) so far, as they're the most common ones. In a daily report, for example, you get the date you're looking at as part of the report (as the first column).

In this case, your dimension (i.e., what your report gets aggregated by) would be the DOMAIN_NAME instead, thus being returned in the report as the first column.

This blog post should help with understanding the way dimensions, metrics and other report parameters interact, so that you can get the exact report you're looking for: http://adsenseapi.blogspot.com/2011/11/adsense-management-api-diving-into.html

Eduardo Scoz

unread,
Jan 27, 2012, 11:50:52 AM1/27/12
to adsen...@googlegroups.com
Oh I see.. Well, thanks much for the info. I have another question, but I'll post a different thread for that!
Reply all
Reply to author
Forward
0 new messages