Website tracking scripts, more harm than good?
We all know the pressure to perform online. You need to know how many visitors are coming to your website, and how they are interacting with it. So you get on to Google Tag Manager, you copy a piece of code, and you embed it into every page of your website. And voilà. The data comes streaming in, giving you all sorts of information on your audience and lets you measure how much bang you’re getting for your buck when it comes to advertising. It even allows you to track your social networking sites and other applications.
But what you may not realise is that these bits of code might also be affecting your site’s performance.
Regulations and privacy
There has been a lot of movement in the EU recently around online tracking and privacy, and cookies, analytics and fonts have all come under scrutiny due to data transfers to the US, so you really need to be aware of what script you’re adding to your websites and what happens to any data they may collect – including IP addresses.
A German court recently ruled that companies cannot use a cookie management provider that relies on a US-based service to collect data. We wrote about issues around cookies recently, including the fines handed to Google and Facebook over their cookies practice and the European Parliament itself that was found guilty of breaching data protection laws and cookie compliancy on one of its internal websites.
Following recent rulings in Europe, Google Analytics is now illegal (Austria) and so is Google Fonts (Germany) because of data transfers to the US (even if it's “only” IP addresses, they still fall under data protection legislation).
We often find overlapping tools - three or four tools doing the same job – a Venn diagram of capabilities, if you wish. And although there are four tools that are supposed to target four different things, if you look at the report there will be an overlap. There is a need to be more targeted about what tools are being used.
Each of those tools provides an opportunity for performance improvement. Remember that you will very rarely find a single big performance optimisation. What you will find is lots of micro-optimisations that all add up, and each tracking code or script adds up.
The people who create these tools don’t care too much for performance because it’s not their problem. They’ll say theirs is fine, but Annertech team has gone back and found ways to make significant improvements.
So how do you know which ones are causing the problems and how much they are affecting your site?
Unless you’re aware which third-party scripts are loaded by your site and what their performance impact is, it’s impossible to know how to optimise them.
Many free web speed test tools can give you this information, including Chrome DevTools, PageSpeed Insights and WebPageTest. They can tell you how many third-party scripts are loaded by your site and which take the most time to execute.
Once you have identified whether there any scripts slowing down the site you can have a look at the ones that are taking the longest and see if they can be tweaked, made asynchronous or compressed to make downloading and rendering quicker.
When that is done, make sure to keep monitoring the performance of your scripts and communicate with your third-party providers. The web changes constantly and there are no guarantees of a script’s performance a few months down the line.
The bottom line is that third-party scripts need to be used with discretion. They can be a cause of performance slow-downs and these are often caused by resources outside of your control. And with data protection finally getting the recognition it deserves in courts across the EU, you don’t want to be caught on the wrong side of the law.
Are third-party scripts bogging down your site?
Let us see what’s going on, streamline things and get your website performing the way it should.
Alan Burke Director of Technology
As Director of Technology, Alan plans and architects solutions to the complex problems Annertech solves on a daily basis.