Daily Income by Adsense for the shown website



It would be really cool if there were a widget that could show the daily income by Google Adsense (perhaps even TradeDoubler / Zanox / …) on the piwik overview page for the shown website.
I do not know if that is possible, but it would be a great add-on…


An good idea for an Plugin.To get these data are easy, if an API is available. Iam not sure, Google AdSense has an public API. But Zanox, Tradedoubler, Affilinet, …


in my opinion thats a good idea


That is a great idea!

For AdSense, this might be a good starting point:

This code has some problems with the new adsense interface. See this issue:

Zanox and Affilinet have a API that could be used.


Thanks for the link to “php-adsense-account-library”. I guess this is actually the only way to get data from Google AdSense. But it works only for the old Google AdSense user Interface.

I use the class in an Plugin, that provided an Widget in the Dashboard of Piwik. You can take a look at the screenshots. It is very simple in use. I have to fix some Bugs and then can you downloaded it.

Screenshots are in german. Translation in english is available. Even if my english is not so good :slight_smile:


Wow, this was fast :wink: From the idea to a working widget in one day…

Looks very promising. I am looking forward to test it.


@ macringo
As you have already found out, the php-adsense-account-library is only working with the old adsense interface. And I think once the new interface gets out of beta, the old interface will be deactivated. So it would be a good idea to find a working solution for the new interface.

I have been playing around with the new adsense user interface (beta). It seems that there is no script at the moment that can fetch information like the income from that user interface. The reason is that all shown information is generated by javascript, and there is no information in the source code that can be read.

But I found one thing that could work:
Once logged in, I can download the following csv file from the old AND THE NEW interface:

It is a csv file with the impressions, clicks, CTR, eCPM and income of the current month. Perhaps it would be a good idea for the widget to download this file and parse it to get that information?


Ive been playing around with the new adsense user interface too. And youre right. Ich guess the CSV Export is a way to get the data with the new interface.

It is my first public plugin. I have to learn something :slight_smile: I will upload the plugin today (version 0.1), so that you can test it, if you want. Make it compatible with the new interface is an issue for version 0.2 :wink:


You can download it -> Google AdSense Earnings · Issue #2289 · matomo-org/matomo · GitHub

Sorry, for the unformatted description inside the ticket. I`ve try to change this, but i can make any changes :frowning:

Please test it and report bugs, issues or suggestions. Please consider, thats my first public plugin :wink:


Works great so far. Can’t find a problem at the moment B)


Thanks macringo, its really help me a lot to check my adsense earning