
Save yourself some time, reduce your frustration, remove code deployment risk and improve your insight by using our technique to quickly test and deploy new web analytics code on your site without the need for staged testing.
Fear driven motivation ...
Quite frequently we needed to test site updates on a staging server for fear of breaking the production site, upsetting customers and losing revenue. This seems like a really good idea, except that when the files are pushed live things don't always happen quite as expected. Staging sites are never the same as production, we've seen perfect copies have issues with cookies due to the different domain, poor version control, different asset location and other network issues like load balancing amongst a range of other problems, the bottom line is they are never the same, period.
In addition to the testing issues, we also need to deal with the fact that assets like Javascript are cached by some browsers. Code roll outs are not immediate, but dribble out over a period of up to a month as browsers invalidate their cache. This is a scary proposition for people relying on the analytics data, especially when frequent updates are required.
Efficiency driven motivation ...
In addition to this, for many of our clients (e.g. banks) we have rare deployment windows as far as 6 months in the future (yes this is not an exaggeration) and aren't allowed to test code outside their building. We have other clients where we need to send them code and wait for a testing response when they can allocate the resources. The feedback loop becomes very slow and sometimes very minor code issues can cause significant deployment delays. The loss in revenue and general inability to find answers to key business questions in a timely manner cannot be underestimated.
Our background is in analytics and strategy, so we're usually dealing with Javascript files for tracking purposes, but the same issues occur with all asset based code updates. We want a simple means to test and deploy new code without making any on page changes or requiring testing in a staging environment. Maybe i'm lazy, but i don't want to test the same code twice! This initially sounds a bit ambitious, but it's actually pretty simple.
The solution ...
We use a single controlling file to include all other Javascript assets. The single file has the ability to switch between different Javascript file versions based on the existence of a cookie (created from a URL parameter when testing is required). This single file is also utilised to control the file version of the asset files without making any on page changes.
Advantages
Implementation
If you know Javascript and you're looking for an example, check out below. If you need more explanation, then drop us a line.
Email Hamish at hogilvy@datalicious.com if you need help with your implementation.
Read about the 40 remaining ways to foster innovation here
http://www.ideachampions.com/weblogs/archives/2009/12/50_ways_to_fost_1.shtml
Google has just added a function in Google Webmaster Tools that let’s you flag parameters you wish Google to ignore when crawling your site. These can include things like session IDs, additional parameters and tracking ids. This is great way of handling the problem rather than forcing the webmaster to implement expensive work-around’s to be found in Google which has historically been the case. Traditionally, sites that use session IDs as a way of tracking users or e-commerce, will have a disadvantage in search engine optimisation for a few reasons:
On the tracking front, and speaking from personal experience, flagging removal of tracking IDs is a big boost to data integrity. A recent campaign I worked on saw several blog and news site pick up a unique tracking URL to refer back to the clients site, a tracking ID that was meant to be unique for an email campaign. Google then decided to pick this URL up as it crawled through the sites and it ranked it well in search. The result was most of the search visitors appeared to the analytics system that they came from the email campaign and the collected data were significantly impacted.
Great news and makes life a lot easier for web masters and marketers stuck with this problem.
http://googlewebmastercentral.blogspot.com/2009/10/new-parameter-handling-too...
Watch our video if you want to know how to create visualizations like this one below form Google search data.