Proper web analytics tagging for static HTML

If you have a Yahoo! Store, one of the main benefits is that all your pages are static HTML. Make sure however that you use this fact to your advantage! I have come across many examples where the HTML structure is not optimal.

It’s already bad enough if you put everything in one gigantic table, something that looks like this:

Badsetup_3

The browser will have to parse the contents of every row in that table before displaying it. But at the very least, do not put Javascript web analytics tags in the table even if it is towards the bottom. The browser may wait before displaying the visible elements of the table until it has downloaded any external Javascripts. Better to completely take the JS’s out of the table:

Goodsetup_2

Of course you may still have all kinds of dynamic elements being pulled in form various external websites, such as Hackersafe or Live Chat. If at all possible, try to isolate completely static elements (such as your top navigation) and keep them in their own container. That way the browser can just pull up the cached version on subsequent pageviews. So something like this would be even better:

Bettersetup_2

Take this into account when you build your site or considering a re-design. It’s just a little common sense that can have a big impact. Faster sites=more sales.