Web Analytics Best Practices
I'm putting together an analytics report for my customer. My customer has been gathering web stats for years, but never had anyone sit down and go through the numbers. So this is not just a report on how the site is performing, but also a basic education on web analytics.
Before we can even start digging into the numbers, we have to make sure they were gathered correctly. If web analytics isn't implemented correctly, it's the good old "garbage in - garbage out" model.
Here are the best practices to follow:
- Tag all your pages. If your page is not tagged, you have no data and you have no way of going back and finding it. There are lots of free validation services available. Run it once a week and send the report to your web team with a list of missing tags.
- Place tags last. The tag should be the last thing to load on the page for best performance. Otherwise the analytics server does its thing and can delay page load. Your JavaScript tag should be placed as close to the </body> tag as possible.
- Place tags inline. Don't place them in places like inside tables or frames and other such things.
- Identify your unique page definition. You will need to "teach" your analytics tool which combination of filename and parameters identifies a page. Is it a simple .html that identifies the page as unique or is it a long product code? Whatever it is, you need to make sure your analytics tool knows this.
- Use cookies intelligently. Use first-party cookies as much as possible. Be aware that IE6 & 7 limit cookies to 20 per domain. There are ways to get around this like consolidating cookies or using subdomains. Also be sure to disclose in your privacy policies what you collect.
- Validate the data is being captured correctly. All web analytics tools behave differently. It's important that you validate in a quality audit exactly what your tags are capturing what they're suppose to when they're supposed to. Your analytics tool probably has a nifty utility to validate and review the data being collect by your tags. Try to check it once a month.
- Correctly encode rich media. Standard analytics tools were designed to measure "pages". Rich media aren't pages but "experiences". The entire experience could be represented by one page view. A site with lots of rich experiences need a completely different data collection plan.
The above tips are from an really good book "Web Analytics, An Hour a Day" by Avinash Kaushik. His blog is also filled with a lot of good tips. Check him out.


