Cerin
Cerin

Reputation: 64901

Query Google Adsense data by URL?

Is there any way to query data in the Google Adsense Python API by URL? For example, find the number of ad clicks on a specific page?

I can find no direct method listed in the documentation. The only possible workaround I see is to manually create an "Ad Channel" for each unique URL, then use that channel Id in the ad code on each page, and then query by that channel. However, that's not practical for sites with hundreds, much less thousands of pages. You'd either have weeks of tedious manual work creating channels and copy and pasting ad code, or would have to build out a sophisticated tool to automate ad channels for each URL.

I find it hard to believe no one working at Google nor anyone using Google tools has never wanted to find the ad value of a specific webpage.

Is there a simpler or more direct way to find this information?

Upvotes: 2

Views: 680

Answers (1)

Donovan McMurray
Donovan McMurray

Reputation: 199

You can use URL Channels to declare the specific pages you want to track, and then in the API you can include the URL_CHANNEL_ID or URL_CHANNEL_NAME dimension in your report to break down by page.

Upvotes: 0

Related Questions