Guide to using analytics for performance and privacy

Written by Chris Butterworth - February 28, 2020

TL;DR;

Different analytics platforms operate, collect information and store information in different ways and in different locations. They can also use a different amount of bandwidth adding to your websites carbon footprint.

Here’s a quick breakdown.

Platform Size Cookies?
Google Analytics 17KB Yes
GA with GTM 75KB Yes
Minimal GA 1.5KB Yes
Matomo 40KB Yes
Fathom 1.2KB No

 

Data is important, there’s no way around it and analytics is a powerful data set. Showing what’s working and what isn’t, conversions, events and so much more, this data is an incredibly powerful tool when it comes to making decisions for a digital product or website.

Collecting analytical data can have both performance and privacy issues so I’ll run through a few options to help you make the best choice based on what you are looking to collect.

Google Analytics

When it comes to collecting analytical data Google Analytics stands out above the rest; it’s free, easy to setup and has great features making it one of the most popular services online today.

All of these setups can be made GDPR compliant by forcing the anonymisation of IP addresses that can be used to uniquely identify users – whether through a setting when adding the script or within the settings that the platform allows you to change.

Standard setup – without Google Tag Manager

Tracking visitors and their location (and more specific demographics using shared data), pageviews, and additional events and conversions can be done using the standard set up. The tracking script comes in at 17KB so isn’t huge and loaded correctly shouldn’t have much of an impact on performance.

With Google Tag Manager

Running Google Ads or any PPC campaign means you’re more likely to want to track them specifically to track the ROI to make sure it’s effective in gaining traffic and potential customers to your website. Google Tag Manager is great for tracking this as well as everything in the standard set up. This is a lot bigger than the standard set up coming in at 75KB and does impact on performance with the guidance stating to load it in the head of a page which causes it to become a render blocking resource – meaning it will stop the page loading while this is loaded and is one of the recommendations that Google insists on to help with perceived page load.

Minimal Analytics

If you only need basic analytics and not to use the advanced analytics that Google Tag Manager can utilise then the minimal setup you can grab from https://minimalanalytics.com/ may be the perfect answer – coming in at 1.5KB by directly interacting with the API and not loading any of the libraries that are used by default.

This is by far the smallest implementation of Google Analytics and using the built options it can be made to be GDPR compliant by anonymising the visitors IP address.

Matomo (Piwik)

If you are concerned about data ownership and are wary of the data collected by Google not being owned by you and you’d like more control over how the data is used then Piwik might be the best option for you. This can be downloaded and installed on your own server or you can use their hosted platform starting at $19/month.

The tracking script comes in at just under 40KB and is fired last so not to block the rest of the page from loading and minimising its performance impact.

Fathom

Doing some research for this article, I came across Fathom (https://usefathom.com/) which is fully GDPR and PECR compliant by not using cookies and using 256 bit hashes to track users meaning that no single user is identifiable (https://usefathom.com/news/anonymization).

This does miss some of the features such as tracking visitors down to a city level and generating heat maps that Google and Piwik can both do, sacrificing these for greater privacy and performance.

The tracking script comes in at just 1.2KB which is the smallest I’ve seen so far and starts at $14 per month for their Pro version.

Which should I use?

As with a lot of things, it depends.

If you are tracking PPC campaigns, Google Tag Manager has to be the “go to” platform with its depth and breadth of data collection but will need a cookie banner which can sometimes ruin a users experience; not to mention privacy focused browsers (such as Brave and Firefox) and users blocking or tricking tracking cookies (via a VPN or browser extensions) can skew this data too which Matomo and standard GA being affected by this too.

Also, Google Tag Manager is the only platform that creates a render blocking resource which can impact on the performance of your website. The other options can be loaded further down the page i.e. in the footer after the rest of the page has loaded.

If not, the Minimal Analytics set up would work for 99% of use cases and can be GDPR compliant but still faces the issue of being blocked.

If you have the budget and are concerned about data privacy and GDPR and PECR compliance then Fathom wins on all fronts – having the smallest tracking script and having the compliances it has.

With the rise of privacy focussed browsers and some everyday browsers blocking tracking cookies (like Brave and Firefox), this means that data collected from Matomo and Google Analytics may not be 100% accurate and therefore be skewed or not fully complete – Fathom doesn’t use cookies and as such is not affected by these.