Matthias Bathke Avatar

from

Reading time: 6 minutes

Cookie Consent vs. PageSpeed Optimization

What effect does UserCentrics GDPR cookie consent have on PageSpeed? Analysis & Recommendation

We don’t live in the 90s anymore – websites have to meet numerous requirements nowadays: entire industries exist virtually only through their websites, complex business processes are mapped. Websites are a digital platform and no longer a “business card”. Websites make the device irrelevant, scale on any platform and the only access required is an up-to-date browser.

As different as any website, the legal requirements are also. Whereas in the past it was easy to go live, in addition to numerous technical requirements, legal requirements must now be met.

It was also time

Age of Data Protection

The introduction of the GDPR has led to a break that has a greater impact on life on the Internet than any copyright novelty or warning risks posed by competition law. Whereas in the past data protection was only a fig leaf, now, in principle, consent must be given to every data collection by users.

A website that wants to track data from its users comes into an avoidable danger situation without legally secure cookie consent.

The functions of a website must therefore be coordinated with numerous interests. If you want to track your users via Google Analytics or embed a YouTube video, it’s no longer a matter of pure technical feasibility or the supposedly best functional solution – the entire feature must also be legal under copyright law, competition law and data protection law.

This is exactly where Usercentrics comes in, because the Cookie Consent, together with our SV Tracking Manager, is actually a Fire&Forget solution that solves all cookie-consent problems in one fell swoop.

But even this solution is not (so far) perfect.

But now fast

Better Done Than Perfect

When the GDPR came into force in 2018, many website operators panicked, and the new law was virtually dormant around the world. Not only did there be a lack of technically tried and tested solutions, but the rules for the concrete implementation of these solutions were simply unclear due to the lack of court rulings and the federal legal structure in Europe.

Most websites were often somehow labelled with a cookie banner in a breakneck manner with semi-cooked and flawed technical solutions. We have really seen all sorts of flowers:

  • Some banners are faulty, the user decision is not respected or some tracking scripts are not intercepted
  • Some banners only inform that the track has been
  • Some banners hide the button to reject tracking

Most websites we check do not have error-free cookie management. Even today, many website operators are in the wrong belief that their cookie consent is already so okay. A reckless approach to a penalty of up to 10% of annual turnover.

As already described, there is a solution with Usercentrics, for example.B. that makes very secure cookie consent particularly easy. But here, too, there are downsides.

Does Google matter to you?

PageSpeed

What in our experience does not yet create a comprehensive cookie-consent solution is not to negatively affect the PageSpeed. The impact is sometimes immense and means that the website can be ranked worse by Google effectively after activating a cookie-consent solution.

This is not a problem of Usercentrics alone: If you want a high PageSpeed, you currently only have the choice between not providing external services for the website or developing an individual, highly optimized cookie-consent solution yourself.

However, the problem is not only avoidable, cookie-consent solutions such as Usercentrics should actually improve PageSpeed. And to do this, I compared 5 scenarios on our website:

  1. PageSpeed without tracking scripts
  2. PageSpeed with Tracking Scripts
  3. PageSpeed with Usercentrics CMP v1
  4. PageSpeed with Usercentrics CMP v2
  5. PageSpeed with Usercentrics CMP v2 without Content Blocker

The different scenarios provide each of them exciting insights that help to understand how small changes to the setup of a website can strongly influence pageSpeed and the role of cookie-consent solutions.

PageSpeed

without tracking scripts

Without third-party scripts, we achieve a PageSpeed of 91 on mobile – surely we can still optimize this to the maximum 100. But we are already moving into micro-optimization, which we always approach periodically when we can spare the time for this. But a PageSpeed over 90 is always the goal, then users and Google are mostly satisfied.

However, the waiver of third-party services means that we no longer receive an evaluation from Google Analytics, cannot include Hubspot support chat, and much more.

Now there are two options: local installation of functions that you would have liked to have outsourced to specialized providers, or the use of a cookie consent solution.

PageSpeed

with tracking scripts

With third-party scripts, PageSpeed deteriorates sharply to a value of 58. Third-party services usually take no account of PageSpeed, optimization does not take place on the provider side. The errors of the providers are usually the same:

  • Javascript and CSS files are bloated and not optimized in terms of modular or file size
  • These files lead to high calculation costs in the browser due to lack of optimization
  • The cache life of the delivered files is usually too short

Unfortunately, Usercentrics also makes the same mistakes, although it has huge chances to optimize website with scripts in PageSpeed due to its function. More on that later.

PageSpeed

with Usercentrics CMP v1

First of all, Usercentrics also leads to a deterioration of the PageSpeed on the website. Here you can see the current stable version of Usercentrics with Smart Data Protector enabled.

Usercentrics already reliably blocks external tracking scripts and services, such as Google Analytics and Hubspot. Usercentrics’ Smart Data Protector also blocks embedded third-party content, such as Youtube or Twitter feeds.

Now, it is important to know that all these external scripts are not loaded until the website visitor clicks “Accept” in Usercentrics’ Cookie Consent banner. The only external script is therefore only that of Usercentrics and leads to a sharp deterioration of the PageSpeed.

This problem has certainly not only been communicated to us but also by other customers to Usercentrics. The hopeful answer: The problem is known there and a complete rebuild of the Usercentrics API is already being worked on to reduce, among other things, the high PageSpeed impact of Usercentrics. Unfortunately, there is no reason to celebrate yet.

PageSpeed

with Usercentrics CMP v2

Even with the new version of Usercentrics and the smart data protector activated, the PageSpeed only improves by a meagre 8 points.

This is mainly due to the fact that the Smart Data Protector has not yet received a rebuild and continues to have a very high impact on the size and execution time of the website.

On this screenshot you can see very well the effects of the Smart Data Protector (uc-block.bundle.js), this function takes a full 2 seconds to execute.

In addition, the cache policies of all Usercentrics scripts are not optimized.

PageSpeed

Usercentrics CMP v2 without Content Blocker

Without Smart Data Protector, PageSpeed increases to 78 – a full 20 points more than if our tracking scripts were output directly.

If you can do without the Smart Data Protector from Usercentrics, you should do so.

Fonts from Google Fonts, embedded Youtube videos or Twitter feeds and other content from external sites should be integrated locally into the website. For example, videos should be delivered directly from your own website.

Usercentrics can even improve pagespeed compared to the website version with tracking scripts. The ideal, however, would be that a website with active cookie consent would have the same PageSpeed as without tracking scripts.

However, Usercentrics must further optimize its own code for this – in particular, increasing the cache times would be easy to implement. Modular, efficient code with low overhead would greatly reduce PageSpeed impact.

Consider PageSpeed already in development

Recommendation

Similar to space travel, safety usually takes precedence over efficiency – but you can’t do it completely without efficiency. The goal should therefore be: maximum security and low resource consumption.

We hope that Usercentrics will continue to work on optimizing their cookie consent. Resource-efficient code design always pays off and is an important argument for using third-party solutions.

For us as a WordPress agency, it is particularly bitter when we deliver a website with high PageSpeed to our customers and at the same time recommend to him, for legal reasons, to accept a greatly reduced PageSpeed by using Usercentrics.

It needs to be improved.

result

At the same time, we see little alternative: third-party services remain important to provide and use high-quality features on a website.

In our experience, Usercentrics offers the best cookie-consent experience for users and webmasters. Only pagespeed still disappoints Usercentrics, even if slight progress can be seen.

Due to the high risk of a faulty implementation and the high costs, we do not recommend to develop a technically optimized but legally uncertain self-solution on our own.

What remains is once again a compromise of different interests. What is most important to you? A high PageSpeed? A high added value with legal security?

We hope to convince Usercentrics that a high PageSpeed should be part of the product promise. Countless websites would benefit from this abruptly. The first improvements made by the CMP v2 are in the right direction, but are far from sufficient. There is no reason to wait for further optimization.