Base de conhecimento

The Page Builder Sandwich cookie consent banner

Design a cookie banner with blocks that holds tracking until the visitor agrees, with Google Consent Mode and an optional rule for visitors outside the EU.

Zinn®, o nosso viking, a ler a sua lista de verificação ao lado de um índice de artigos com um aberto.

Page Builder Sandwich Pro includes a cookie consent banner that you design with blocks, and that really blocks tracking until the visitor agrees.

Create the banner

  1. Open Page Builder Sandwich → Marketing → Cookie banner and choose Create a ready-made banner: a bar at the bottom of the screen with a short text, Analytics and Marketing tick boxes, and Accept all, Save my choice and Necessary only buttons. Edit it like any popup.
  2. Switch on Show a cookie banner and choose Save.

To design your own: link buttons to #consent-accept (everything), #consent-reject (necessary only) and #consent-save (the ticked boxes, which must be named analytics and marketing). A link to #consent-open anywhere on your site (in the footer, for example) shows the banner again, so a visitor can change their mind.

What it blocks

Until the visitor agrees:

  • the Google Analytics, Tag Manager and Meta Pixel tags set up under Conversion tracking do not load, and no event is sent;
  • Google Consent Mode starts with every signal denied;
  • any other script you list (by its WordPress handle, as analytics or marketing) stays switched off, and so does any script written as <script type="text/plain" data-<prefix>-consent="analytics">, where <prefix> is the class prefix shown on the plugin's settings screen.

The choice is kept for 180 days (you can change this) in one cookie on your own site. If a visitor takes consent back, the page reloads so nothing that already ran keeps tracking.

Visitors outside the EU

By default every visitor must agree first. You can switch on Outside the EU, EEA and UK: load tracking until the visitor says no: it applies only when your host or CDN reports the visitor's country (for example Cloudflare's CF-IPCountry header) and that country is outside the EU, EEA, UK and Switzerland. The banner is still shown, and a visitor whose country is unknown is treated as inside the EU.

The banner works with page caching: every visitor gets the same page, and their own choice is applied in their browser.

Este artigo ainda não foi traduzido para o seu idioma, pelo que está a ler a versão em inglês.

Mais recentes do blogue

O que temos escrito sobre alojamento, SEO e gestão de sites em escala.

SEO e Link Building a partir da Camada de Alojamento: A Visão de um Operador em 2026

Como o alojamento molda a indexação e a equidade de ligações em 2026: manter páginas indexadas, avaliar domínios antigos antes de construir sobre eles, criar ligações sem rasto de pegada e uma perspetiva realista sobre o que a infraestrutura pode e não pode fazer pelo SEO.

Ler o artigo →

Tornar o WordPress Rápido e Seguro: Uma Lista de Controlo de Desempenho e Plugins

Uma lista de controlo prática para um WordPress rápido e seguro: cache ao nível do servidor, uma cache de objetos por site, os poucos plugins que vale a pena utilizar, manter a infraestrutura atualizada e as páginas do WooCommerce que nunca deve colocar em cache.

Ler o artigo →

Como escolher alojamento web gerido em 2026: Guia do comprador

O que realmente separa um bom alojamento gerido de uma máquina barata com um painel de controlo — migrações, cópias de segurança, isolamento, colocação em cache real e escalabilidade genuína — e como avaliá-lo antes de se comprometer.

Ler o artigo →

Ler o blogue →

Ainda com dúvidas?

O suporte está incluído em todos os planos, o apoio está disponível 24 horas por dia e pode escrever-nos em qualquer um dos nossos 59 idiomas — respondemos-lhe no seu.

Contactar o suporte Todos os artigos