Docs

Cookie consent

Show a cookie banner, remember each visitor's choice and pass it on to Google Consent Mode v2 and other tools.

On this page

Urmi has a built-in cookie banner. It asks visitors whether analytics and marketing tools may track them, and it makes rejecting as easy as accepting. Urmi remembers the choice and passes it on, so Google tags and other tools can wait for the answer.

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 Urmi → 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.

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. This includes Google tags added by other plugins. 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 urmi_consent in the visitor's browser. List it in your privacy or cookie policy.

How tracking tools get the answer

Urmi does not add tracking tools to your site. You add them with the plugin or service you prefer, and they follow the visitor's choice in one of two ways:

  • Google tags (Google Analytics, Google Ads, Tag Manager) follow it through Google Consent Mode. See below.
  • Other tools can read the urmi_consent cookie, or listen for the urmi:consent event (see For developers).

If a visitor turns off a category they had allowed before, the page reloads, because tracking that has already started cannot be stopped halfway.

With Google Consent Mode v2 on, Urmi 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:

  • Analytics allows analytics storage.
  • Marketing allows ad storage, ad user data and ad personalization.

Google's tags then decide themselves what they may store. This works for Google tags added by other plugins or by your theme, so they wait for the visitor's answer without extra setup.

For developers

The choice is announced on the page with the urmi:consent event. It fires when the page loads if the visitor has already chosen, and again each time they save a choice. The event says which categories are allowed:

JavaScript
document.addEventListener('urmi:consent', (event) => {
  if (event.detail.analytics) {
    // Start your analytics tool.
  }
  if (event.detail.marketing) {
    // Start your marketing tool.
  }
});

Add the listener before the page finishes loading, so it does not miss the first event.

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 #urmi-consent. Clicking it opens the preferences. In the editor, type #urmi-consent into any link field.

Good to know

  • Urmi 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.