Docs

Cookie consent

Show a cookie banner, hold back tracking code until visitors agree, and support Google Consent Mode v2.

On this page

Uncoder has a built-in cookie banner. It asks visitors before analytics and marketing code runs, and it makes rejecting as easy as accepting. Your tracking snippets in Custom code wait until the visitor agrees to their category.

The Northwind Studio home page with the cookie banner along the bottom: the title Cookies & privacy, a short message and the buttons Preferences, Reject all and Accept all
The cookie banner as visitors see it.

Turn on the banner

  1. Open the setting

    Go to Uncoder → Settings → Cookie consent.

  2. Show the banner

    Turn on Show the banner. The other options appear.

  3. Adjust the look and text

    Choose the Position, and change the texts if you like (see below).

  4. Save

    Click Save changes in the bar at the bottom of the screen.

The Cookie consent settings: Show the banner, Position, Title and message, Button labels, Privacy policy link, Google Consent Mode v2, Cookie settings button and Ask everyone again
Settings → Cookie consent
Cookie consent
SettingWhat it does
Show the bannerShows the banner to visitors until they choose. Their choice is remembered for 180 days.
PositionBar along the bottom, Box, bottom left or Box, bottom right.
Title and messageThe banner's title and text. Leave them empty for the default "Cookies & privacy" and a short standard message. Links are allowed in the message.
Button labelsYour own words for Accept all, Reject all and Preferences. Empty fields use these defaults.
Privacy policy linkAdds a Privacy policy link to the message. Leave it empty to use the page chosen in WordPress under Settings → Privacy.
Google Consent Mode v2Tells Google tags (Analytics, Ads, Tag Manager) that storage is denied until the visitor agrees, and updates them when the visitor accepts. See Use Google Consent Mode.
Cookie settings buttonShows a small round button with a cookie icon after the visitor has chosen, so they can change their mind later.
Ask everyone againClick Ask again to show the banner to every visitor again, for example after you add a new tracking tool. Save your other changes first. The current version number is shown next to it.

What visitors can choose

  • Accept all allows every category.
  • Reject all allows only what is necessary.
  • Preferences opens the three categories with a short explanation each, and a Save choices button:
The banner with Preferences open: Necessary (always on), Analytics and Marketing checkboxes, and a Save choices button
Preferences show the three categories.
CategoryMeaning
NecessaryNeeded for the site to work, such as security and remembering the visitor's choice. Always on.
AnalyticsStatistics about which pages are visited and how.
MarketingPersonalized ads and measuring campaigns.

The choice is saved in a cookie called uncoder_consent in the visitor's browser. List it in your privacy or cookie policy.

Hold back tracking code until visitors agree

Add your tracking code as snippets in Settings → Custom code and give each one a Cookie category:

  • Necessary — always runs
  • Analytics — needs consent
  • Marketing — needs consent

While the banner is on, snippets marked Analytics or Marketing are not run when the page loads. They start as soon as the visitor accepts that category, without a page reload. Visitors who reject never run them. When the banner is off, all snippets run as usual.

The ready-made Google tag (GA4) and Google Tag Manager snippets start as Analytics, and Meta Pixel as Marketing.

With Google Consent Mode v2 on, Uncoder tells Google's tags at the top of every page that ad and analytics storage is denied. When a visitor accepts, it updates that signal. Google's tags then decide themselves what they may store.

When you use Consent Mode, put your Google tags (GA4, Google Ads, Tag Manager) in the Necessary category, so they load right away and follow the consent signal. Keep other tools, such as a Meta Pixel, in Analytics or Marketing.

Let visitors change their choice

  • Turn on Cookie settings button for a small round button in the corner of the page.
  • Or add a link anywhere, for example in your footer, with the address #uncoder-consent. Clicking it opens the preferences. In the editor, type #uncoder-consent into any link field.

Good to know

  • Uncoder itself adds no tracking. Embeds from other services are a different matter: the Video widget can load YouTube and Vimeo only when played (Load player on click, on by default), and the Google Maps widget can wait for a click too (Load on click). See Video and Google Maps.
  • The banner, its texts and its buttons are not a legal review. Check what your local law requires.