Configuration¶
To add a cookies bar on your website, go to and enable Cookies Bar in the Privacy section. This activates Block tracking 3rd-party services by default, including social media, video hosting platforms, and Google services. Click Add domains to the block list to include other external websites. These services remain blocked on your website until visitors accept optional cookies.
Note
Using third-party cookies without a cookies bar does not prevent them from being triggered. Only the presence of a cookie bar and the visitor’s refusal ensure that these cookies are blocked.
Google consent mode (advanced)¶
With the cookies bar enabled, the standard behavior is to block the Google tag (gtag.js) until the
visitor accepts optional cookies, because googletagmanager.com and google-analytics.com are on
the block list of third-party services. As a result, the tag only loads on the next page after
the visitor accepted. Google Analytics 4 then loses the landing page, the gclid parameter of
Google Ads and the referrer of the first page, and the visit is reported as Direct.
The Website: Google consent mode (advanced) module (eyssen_website_consent_mode) fixes this by
removing these two domains, and only these two, from the block list.
Set it up
Install the module from (search for
eyssen_website_consent_mode). It has no setting and no menu.Go to , enable Cookies Bar in the Privacy section, and enable Google Analytics in the SEO section with your Measurement ID (see Google Analytics).
Click Save.
Important
The module removes the two Google domains from the block list of every website that has a Google Analytics Measurement ID. It only has a visible effect when the cookies bar is enabled with Block tracking 3rd-party services, which is the default. Websites without a Measurement ID keep the standard behavior.
How it behaves
The Google tag loads on the first page, before the visitor answers the cookies bar. The consent default stays denied for analytics and advertising storage, so Google does not set analytics cookies until the visitor accepts.
When the visitor accepts or refuses optional cookies, the cookies bar sends the consent update (granted or denied) on the same page, without a reload.
The landing page, the
gclidand the referrer of the first page reach Google Analytics 4.If you added
googletagmanager.comorgoogle-analytics.comyourself with Add domains to the block list, they stay blocked.
Note
This is Google’s advanced consent mode: while consent is denied, Google may receive cookieless pings from the visitor’s browser. Check that this fits your data protection requirements and mention it in your cookies policy.
Check that it works
Open your website in a private browsing window and open the developer tools of your browser (F12), Network tab.
Reload the page, without answering the cookies bar. A request to
googletagmanager.com/gtag/jsmust appear on this first page. Without the module, the script is rendered with the addressabout:blankand no request is made.Click I agree or Only essentials in the cookies bar. In the browser console, the
dataLayerobject receives aconsentupdateentry (granted or denied) on the same page, without a reload.
Note
The module has no effect on other trackers: the other third-party services of the block list (social networks, video platforms, Google Maps, etc.) are still blocked until the visitor accepts optional cookies.
Customization¶
To adapt the display of the cookies bar on your website, click Edit on the website editor, go to the Invisible Elements section at the bottom of the panel, and click Cookies Bar. You can modify the Layout and Size of the cookies bar, and enable Backdrop to gray out the page in the background when the cookies bar is displayed on the screen.
Click anywhere in the building block to further customize the appearance of the cookies bar using Block, Column and/or Inline Text customization options.
To edit the contents of the cookies bar (i.e., the consent message), click directly in the building block.