Enhanced Link Attribution breaking your analytics?

Andy Hey
By Andy HeyOperations Director
5 minutes to read

We came across an issue today that had us puzzling for a while.

We recently added the Enhanced Link Attribution plugin to a sites analytics account and saw the rather unexpected result of it stopping ALL analytics traffic from the site!

So head well and truly scratched we started to debug the issue. A great tool for this is the Google Analytics Debug extension for Chrome. Once installed you can turn it on an off easily from the menu bar and it allows you to seamlessly intercept the request the page makes to the ga.js file and replaces it for the debug version (you knew about the debug version right?). Once activated and you have your developer console open you will see the inner workings of the analytics plugin output to your console.

Enhanced Link Attribution breaking your analytics?

This proved really useful as we could see the analytics stopped work right after we’d requested the link attribution plugin. It seemed like our analytics was sitting and waiting for the plugin JavaScript.

We reviewed the code we’d been supplied and the analytics code was correct, the implementation correct and the plugin loading matched the code Google were providing on their own support pages. STUMPED!

We then checked the protocols used for requesting the plugin JavaScript and what transpired was that the protocols mattered little but the TLD provided by Google as .co.uk actually resulted in a server timeout. Replacing this with .com seemed to return the javascript as quick as you would expect!

Enhanced Link Attribution breaking your analytics?

Swapping the .co.uk to .com in the pluginUrl variable fixed the issue immediately and our analytics started working again.

Looking back this page was right around the 4th April as we had copied the code to send to another clients developers so this seems to be a relatively new issue. Hopefully this helps you out so you’re not as stumped as we were!

comments powered by Disqus

Articles by Andy Hey

Andy has worked in the industry for over a decade and has a wealth of experience.