In this article, you will learn everything about the integrated Cookie Consent Bar.
Table of contents
How to add the Cookie Consent Bar
The Cookie Consent Bar is a native solution inside the Website Editor that will block all third-party JavaScript until the visitor clicks the button to accept cookies. To add the Cookie Consent Bar click on the Features category in the left Content Sidebar and drag and drop the Cookie Consent Bar into the website.
Please note that the Cookie Consent Bar will only be added to the site that you are currently working on. To ensure that it will be visible on all pages we recommend adding the Cookie Consent Bar to the website's footer and using references.
Whitelist
If you want to exclude specific third-party widgets from being blocked, you can add them to the whitelist by adding the following code to your meta tags under More > SEO:
<script>!function(w,s,b){Array.isArray(w[s])&&w[s].push(b)}(window,'YETT_WHITELIST',/THIRD-PARTY-DOMAIN/)</script>
You need to replace THIRD-PARTY-DOMAIN by the domain name (or file name) of your third-party script, for example:
<script>!function(w,s,b){Array.isArray(w[s])&&w[s].push(b)}(window,'YETT_WHITELIST',/third-party.com/)</script>
You can also define multiple URLs using |
<script>!function(w,s,b){Array.isArray(w[s])&&w[s].push(b)}(window,'YETT_WHITELIST',/third-party.com|script-name.js/)</script>
or simply use keywords, for example, to unblock the Ecwid shop:
<script>(function(w,a,i){w[a]=w[a]||[];w[a].push(i)})(window,'YETT_WHITELIST',/ecwid|storefront|ecomm|new-frontend/)</script>
Comments
0 comments
Article is closed for comments.