Mon 17th Apr 2006
Don’t Dirty Stats with your Visits
Posted early evening, filed under Blogsome , Performancing Metrics , Smarty Templates.I often spend a heap of time tweaking stuff on my blog, and these show up as hits in the Referrers list, as well as on Performancing Metrics, a system of tracking readership.
Now, it’s rather simple to stop your visits counting towards your stats.
First, visit your site, and ensure you are logged in. In your address bar at the top of your browser, type in javascript:document.cookie, and press return. Find the cookie entry that starts with wordpressuser_, and copy the garbage-looking string after it - this is the md5 hash of your server name - to the clipboard.
Find the location of your stat-gathering code. Before it starts, enter:
{if $smarty.cookie.wordpressuser_md5string != "username"}
and after it ends, enter:
{/if}
Make sure to replace md5string with your md5 hash!
•
This could also be used to have any text show/not show when you visit your own blog. Like Google AdSense ads, for instance.
It sounds like i had heared it in another place ;-).
10 hours, 1 minute after the fact.
mmmmmm Sorry for my very bad english.
probably it’s more correct.
10 hours, 57 minutes after the fact.
Yes, it’s similar, but slightly different. This version will only turn off ads for me, not for other readers who have commented.
14 hours, 37 minutes after the fact.
I was talking about my comment
1 day, 3 hours after the fact.
My apologies. I didn’t remember that comment, and was working from a post on another blog, just Blogsom-ify-ing it.
1 day, 4 hours after the fact.
Dear Matthew,
After looking everywhere, I come back to your blog again in search for the light.
This piece of code has worked for me like a dream on Blogsome and I am grateful.
I wonder which code you would use to keep the same function on a PHP/non Smarty powered blog/CMS.
I will appreciate your help very much.
Kind regards.
1 year, 7 months after the fact.
Hmm. I’m not sure.
You’ll need some sort of a function in PHP which gets a cookie, and I don’t know if or how you can do this.
1 year, 7 months after the fact.