As I have promised to upload my adsense tracker script at previous post, My Adsense Tracker, finally I have finalized my codes and uploaded it here. At the time I have finished the coding and testing, I found AdsenseLogger. Em… but never mind, at least I have my own tracker.
Adsense Tracker – A tracking script that tracks adsense clicks on one’s website. Adsense tracker gives a general idea on what ad your visitor is looking for.
Adsense Tracker consists of 3 modules:
- Tracking scripts with multiple channels supported.
- A very simple login page.
1. Tracking script with multiple channels supported:
- Tracking adsense clicks (Ad Unit and Link Unit).
- Support multiple channels for multiple pages/sites.
- Track referrer’s and current page’s URL.
2. A very simple login page:
- Since the script is for personal use only, it requires password only to login
- Support different time zone by setting the time offset.
- Group ad by Ad Unit (title only) or Link Unit (keyword only) and click count.
- Show individual clicks.
- Generate report based on date range.
- Generate report based on channel.
- Purge old transactions to keep database small and for performance wise.
- Channel maintenance (Add, Rename, Delete).
- PHP and MySql database.
- Basic knowledge of editing PHP script.
- Basic knowledge of MySql’s database administration.
- Download and unzip to a temporary folder. It should only have the following files:
install.php– Installation page
login.php– Login page
maintenance.php– Maintenance page
report.php– Report page
tracker.php– Tracking script
style.css– Style sheet
- Use text editor to open the file
setting.php. Modify the parameter in the file as appropiate.
- Upload all the files to your web’s directory so that you end up with
- Create an empty database and run the installation script, e.g.
- Login to Adsense Tracker at
/at/login.phpand create your own channel, e.g. ‘mainpage’.
- At the PHP page where you want to track the adsense clicks, insert the following script at the bottom of your page (just before the </body> tag) –
<?php include_once ('at/tracker_js.php'); ?>
<?php gettracker_js('mainpage'); ?>
* where ‘mainpage’ is the channel that you have created at previous step.
- Adsense Tracker 1.0 – original
- This script is intend for personal use only and not for commercial purposes. You can download, modify and use this script at your own risk.
- Any comments are welcome.