Until a permanent solution is in place, we do have a workaround available, which can be found in the bottom of this article.
Overview of Google Core Web Vitals
Google is looking to enhance its Google Search ranking, using page experience signals that measure user experience in quantifiable ways. On November 10th 2020, Google announced it was focusing on Core Web Vitals for its new rankings in May 2021. Google Core Web Vitals will rely on three key points of measurement and we'll explain these in layman's terms below:
Largest Contentful Paint (LCP) measures loading performance. The largest contentful paint is the largest image or block of content on your site that is visible to a user. Anything off screen is ignored. An ideal measurement will be below 2.5 seconds.
First Input Delay (FID) measures interactivity. This is how quickly a user can interact with your page - whether it be a click on a link or filling in a form. An ideal measurement will be less than 100 milliseconds.
Cumulative Layout Shift (CLS) measures visual stability. Just as houses need a good foundation, so does code. If you've ever tried to click on a link and then an advertisement loads, and the page shifts up--that is Cumulative Layout Shift. In other words, how fast the webpage forms its final structure. An ideal measurement will be a score of less than 0.1.
How Cookiebot CMP will affect your Google Core Web Vitals score
We have been working with Google Engineers to ensure that your Cookiebot CMP implementation will not have a large impact on your Core Web Vitals score. We continuously monitor and improve the performance of our consent service to make sure our banners are as light-weight as possible to not impact your site. Google has an article that describes how Google Page Experience will affect its search results.
How enabling TCF will impact your Core Web Vitals score
Enabling the Transparency and Consent Framework (TCF) will apply additional content to your cookie banner. To minimize the impact this has on your Core Web Vitals score, it is important to ensure that you configure TCF to only ask for consent for the Partners, Features, and Purposes that you actually intend to use on your website.
You can find detailed instructions on how to do so in this guide.
How to test your Google Core Web Vitals Score
Google has provided multiple tools to test your Core Web Vitals score including:
One of the easiest tools to use is Google PageSpeed Insights. It will easily analyze your page, provide you with a score across the different Core Web Vitals and offer recommendations on what you can do to increase performance.
Steps to test Google PageSpeed Insights.
- Visit the Google PagesSpeed Insights page.
- Enter the domain name of your site and click the ‘Analyze’ button. (See note below on how to test with the Cookiebot CMP banner)
- You will then see a report - one for Mobile and one for Desktop.
- Your grade will be listed along with ways you can improve your site’s Core Web Vitals performance.
g_disable_bot_detection
and you assign that a value of 1.Let’s look at how it works with the cookiebot.com domain.
If you click this link it will take you to the report for Cookiebot’s desktop ranking.
There is a thumbnail showing the site and you can see there is no banner shown.
Clicking this link will show you the Cookiebot desktop report, but this time the banner is displayed because we’ve added the ?g_disable_bot_detection=1
query parameter after the domain name. This will work on any page. If you already have some query parameters on your site, just replace the question mark (?) with an ampersand (&) and attach the end of your URL. You can see the banner is now shown in the thumbnail.
Temporary workaround for hiding the Cookiebot banner from Web Vitals scans
We are still looking for a more permanent solution to getting our banner hidden from Google Lighthouse/Pagespeed tests and are following the Google Lighthouse developer discussions closely.
Until a more permanent solution is in place, we have written a script you can use to force our banner to hide, when combined with adding a query parameter to the URL that you provide to Google Lighthouse/Pagespeed.
You will need to add the following script to your website, anywhere before the Cookiebot (uc.js) script:
<script>
window.addEventListener("CookiebotOnDialogInit", function() {
if (Cookiebot.getDomainUrlParam("CookiebotScan") === "true")
Cookiebot.setOutOfRegion();
});
</script>
You then add the following query parameter to your website URL, when performing your Google Lighthouse/Pagespeed tests: ?CookiebotScan=true
.
For example, if you wanted to test https://www.cookiebot.com/, your would use the URL https://www.cookiebot.com/?CookiebotScan=true instead.
The combination of having the above script on your website and the query parameter will send a full consent opt-in before the Cookiebot banner loads, which will effectively hide the banner.
Questions?
Please reach out to us with any Google Core Web Vitals related questions on google@cookiebot.com
Comments
4 comments
Hi,
Are you still working on this? Any new developments that you can share?
When will there finally be a solution for this? This workaround doesn't work, they just try to hide it from the customer. But that is not a solution for us. When will there finally be a solution? For us, all customers are affected by this and we have no more arguments.
Greetings
Any Updates regarding this issue?
Any update on this issue?
Please sign in to leave a comment.