Group: http://groups.google.com/group/adsense-api/topics
- How do I generate a report for a custom channe? [2 Updates]
- About persisting authentication for Java program [1 Update]
- diggdugg <dbreaker@gmail.com> Jun 20 08:06PM -0700
How do I get reporting for a custom channel? I see data in my adsense
account for that channel, but when I go through the API, I see null values.
Request
GET
https://www.googleapis.com/adsense/v1.1/accounts/pub-9515103549350423/reports?startDate=2012-06-19&endDate=2012-06-19&dimension=DATE&metric=TOTAL_EARNINGS&key={YOUR_API_KEY}
Authorization: Bearer
ya29.AHES6ZR4WLdS1N3OdEhcll7bljT_UX5KlFvqJMWRA9PQh6OOVM7u9MA
X-JavaScript-User-Agent: Google APIs Explorer
Response
200 OK
- Show headers -
{
"kind": "adsense#report",
"totalMatchedRows": "0",
"headers": [
{
"name": "DATE",
"type": "DIMENSION"
},
{
"name": "TOTAL_EARNINGS",
"type": "METRIC_CURRENCY",
"currency": "USD"
}
],
"totals": [
"",
null
],
"averages": [
"",
null
]
}
Here's the URL of the report in adsense:
https://www.google.com/adsense/v3/app#viewreports/d=today&ag=date&dd=1YchannelY1YMYPUBIDAND
CHANNELID&ss=&oc=&oo=ascending&gm=earnings&co=d&sgs=&sgds=&drh=false&cc=&viewmode=1
- "Sérgio Gomes" <sergiomdgomes@gmail.com> Jun 22 06:09PM -0700
Hi there,
It looks like you ran the report for a single day, are you sure there's
reporting data for that period?
In any case, if you want to break down the data by custom channel, all you
need to do is use one of the CUSTOM_CHANNEL_* dimensions (depending on
what you prefer) in your report. You can also set up a filter on one of
these dimensions if you want to limit results to selected channels.
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
---
On Thursday, June 21, 2012 4:06:32 AM UTC+1, diggdugg wrote:
- "Sérgio Gomes" <sergiomdgomes@gmail.com> Jun 22 06:04PM -0700
Hi there,
What sort of application are you developing? Is it a desktop application, a
general web server application, or an AppEngine application? This involve
slightly different flows, so it would be helpful to know.
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
---
On Wednesday, June 20, 2012 7:11:07 PM UTC+1, Xiaohu wrote:
You received this message because you are subscribed to the Google Group adsense-api.
You can post via email.
To unsubscribe from this group, send an empty message.
For more options, visit this group.
You received this message because you are subscribed to the Google Groups "AdSense API Forum" group.
To post to this group, send email to adsense-api@googlegroups.com.
To unsubscribe from this group, send email to adsense-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/adsense-api?hl=en.
No comments:
Post a Comment