A new product called Datasherpa has just been launched by Clickstream Technoligies with the aim of ensuring all pages served by a webserver are automatically loaded with web analytics tags.
They claim their new product eliminates the burden of creating, inserting and testing page tags, and ensures all pages are tracked accurately.
It’s a really simple idea, and bloody good one. We’ve been caught out before at work when a page hasn’t been correctly tagged and we’ve lost valuable traffic information.
It sounds like it would be really simple to build as a mod_perl handler for Apache. The handler would scan each page served, probably using the HTML::Parser module or even just a simple regular expression, detect the closing page </body> tag, and just before that insert the tracking tag corresponding to the virtual host being served.
We use Webtrends at work, and this approach sounds like it should work really well with their system. It may even be worth mocking up a proof of concept quickly.