I Hate To Be Tracked By Adsense
As what you can see on my blog, I'm a Google Adsense user. Checking Adsense statistic has been one of the activity I did frequently. In the Adsense report, I hate to see inaccurate page impression count because my own visits are included.
And, I thought of using cookies to avoid myself to be tracked. Here's how I do it (if you might be interested).
Firstly, I add a new php page (e.g. "myself.php") to the root of my wordpress with this code:
<?php
// a cookie for 10 years
setcookie('myself', 1, time() + 60 * 60 * 24 * 365 * 10);
?>
Then, I add the following code to each Adsense scripts:
<?php
if (!isset($_COOKIE['myself'])) {
?>
<!-- Place your Adsense code here -->
<?php
}
?>
After that, I point my browser to "http://blog.enrii.com/myself.php". Then, I don't see any Adsense ads anymore. I remove the "myself.php" after that to avoid other people to use it. This should work with site counter scripts (e.g. Statcounter) as well.
The down side of this is I need a second browser to test my ads placement or remove the "if" code out of Adsense script. Hope this helps somebody. Or, is there any better way?
Share this article: del.icio.us | digg it
Related posts: