There are two things that I do every morning, right after turning on the computer. First, I read the latest strip of Schlock Mercenary. Then I check my Google AdSense earnings for the previous day. It’s the perfect mix of business and pleasure, and a great way to start a new day.
But enough about my habits – lets talk convenience. Manually checking your AdSense earnings is not very convenient – you need to navigate to their site, log in, pick the time period you want to examine from the drop-down… The process is simple, but if you religiously check your stats several times per day (like I do) it can get tedious. Wouldn’t it be nice if there was some kind of a widget that would let you see all of your vital AdSense stats at a glance?
Turns out there are several, but most of them don’t work (any more) and are not supported by their authors. So I took the widget that looked the most promising – AdSensor – and fixed it. You can download the widget below.
What Is AdSensor?
AdSensor is a widget that regularly queries your Google AdSense account and displays up-to-date information about earnings and clicks in the form of a compact table. Update frequency is configurable. The widget also comes with four beautiful skins, works both on Windows and Mac, and is available two different languages : English and Finnish. The widget requires the Yahoo! Widgets framework.
You can find more information about this widget on the author’s site.
If you’re having problems with the above link, try the zipped version.
My version is functionally almost completely identical to the original AdSensor widget. Most of the changes were internal :
- The original login routine relied on cookie-parsing magic and a hard-coded list of form field values. I added a simple regex-based parser that dynamically extracts the actual fields from the login form. This way, there’s a good chance the widget will continue working if Google decides to add a new hidden field to the form.
- I also rewrote the regex that extracts the data on earnings and clicks from Google AdSense reports. For reasons unknown, the original regex would cause the widget to hang permanently on my system.
- Finally, I made the earnings column display the right currency symbol (it can be either dollars or euros, depending on your country of residence and account settings).