AdSense
ScrapingAdSense
Download
The script, written in
python, can be 'downloaded'
here.
Motivation
Well, I wanted to know how posts to my blog relate to the earnings achieved. I further wanted to easily see trends in the earnings.
This script relys on:
- PyChart for generating the graph (per default in the SVG-vector format).
- MySQLdb for connecting to a MySQL-database.
Example
Attach:google.svgAttach?:google.png
The current version (not released) generates output like the following.

The graph shows earnings along the y-axis. The date is marked at the x-axis. This graph shows data starting from 2005-01-01 to 2005-05-26.
The small
green dots indicate postings to the blog. The
black line represents the actual earnings, the actual data. The
blue line represents the running mean.
The red lines give means over a short period of time (two weeks per default).
The
orange line indicates the clicktrough rate. There are two
special dates annotated, represented as textboxes.
At the top right of the graph the overall-mean is displayed.
Versioning
1.0 @ 20050508
Official release. Features include:
- Specify earliest date to display on the graph.
- Correlate dates of postings to a blog.
- Other sources possible (e.g. local file).
- Data is retrieved from MySQL-database.
- Retrieving data from WordPress-installation implemented.
- calculates running mean of earnings and displays in graph.
- calculate mean for shorter period of time (called 'prognose').
On my todo list...
- Allow generating graphs for an interval of data. Currently only the lower date can be specified. The upper date always is 'today'.
done...
- Include data of special dates. These should be indicated by vertical lines to show some changes to something that might affect earnings. @ 20050525
- Overlay number of clicks in chart. @ 20050525
Information on AdSense
Suggestions by users
Put your suggestions here...
You can also contact me
directly.
- Maybe you can put the y-axis also on the right cause the diagramm is very widespread ... good luck, Clemens
- I'll see if I can manage that for the next release, thanks. --Steffen