- By filtering out your IP
- By placing a cookie
Both works OK but what if you have a dynamic IP and not a static site, i.e. a blog? The following method is for people who have blogs on blogspot domains:
- Create a backdated post using the scheduling feature so that the post is not easily spotted; take note of the URL for step four.
- Do not link to this post under any circumstances.
- Now comes the tricky part: Find the following section in your template by clicking "Edit HTML" tag.
</head> your code will go here <body> ...
- Now insert the following code between the closing head and opening body tags:
</head> <b:if cond='data:blog.url == "YOUR-URL-GOES-HERE"'> <body onLoad='javascript:pageTracker._setVar("test_value");'> </body> </b:if> <body>
- Save your template and visit the page. Check the source code if the body tag really contains the onLoad function.
- Go to your Analytics page and create a filter as per Google's instructions.
Short URL for this post
Wow this is an excellent and well written how-to! Thank you so much! I am about to do this on my blog and will see how it goes!
ReplyDeleteIt does work for me, here. A word of caution: The default view in Analytics is monthly. Switch to daily to see if it really ignores your own visits as your previous visits will show up in the monthly view for another 30 days.
ReplyDeleteNice article, probably helpful to blogspot users, and even the Google Instructions work for Wordpress users.
ReplyDeleteGoogle's instructions are written with static sites in mind. As I have a dynamic IP and blogs on blogspot domains, I simpy documented what I had done in the hopes that it would be useful who had similar constraints.
ReplyDelete