How It Works

How SmartConsent works

What happens when a visitor lands on your site, from the first page load to the moment your analytics are allowed to run.

The Journey

From page load to consent

  1. 1

    The page loads

    SmartConsent sits in the page's <head>. Scripts you have tagged stay switched off until the visitor chooses.

  2. 2

    The banner appears

    Every visitor sees one ask-first banner, built to the strictest of the consent rules SmartConsent carries for 10 jurisdictions, plus a strict default for the rest of the world.

  3. 3

    The visitor chooses

    They can accept, reject, or choose category by category. Their choice is saved in their browser.

  4. 4

    Your scripts follow the choice

    Categories the visitor accepted switch on straight away, and Google's tags are told what they chose. Anything they didn't accept stays switched off.

Inside the Engine

What runs inside

One script, under 25 KB gzipped, with every rule file built in. No framework, no server and no third-party dependencies.

Country from the time zone, not the IP address

SmartConsent works out the visitor's country on their device, from its time zone, with no IP lookup, and there is no lookup to wait for.

Rules as data

Each region's rules live in a data file, not in the code, and no AI model makes the choices. Where rules differ, the strictest setting wins, choice by choice.

Holding back scripts

Tag any <script> with data-consent-category. It won't run until the visitor accepts that category. Tagged scripts added to the page later are held back too.

What the Visitor Sees

What your visitors see

A clear banner with no pre-ticked boxes, where Reject is as easy to find as Accept.

https://yoursite.com

We value your privacy

We use cookies to enhance your browsing experience, analyse traffic, and personalise content. You can accept all, reject non-essential, or customise which categories you allow.

Your choice is kept for up to 13 months, or less where local rules require.

Reject as prominent as Accept
Choose by category
Visitors can accept some categories and not others.
Change your mind later
A small badge in the corner reopens the choices.
Global Privacy Control
If a visitor in California has it switched on, SmartConsent treats it as an opt-out.

How You Install

Add it to your site

Run the free scan or open your dashboard, and you get a snippet with your site's ID. Paste it into your site's <head>, then tag your analytics and advertising scripts.

Paste into <head> before any analytics or marketing script. Works with WordPress, Shopify, Wix, and any static site.

HTML
<script>
window.dataLayer = window.dataLayer || [];
window.gtag = window.gtag || function () { window.dataLayer.push(arguments); };
window.gtag('consent', 'default', {
  ad_storage: 'denied',
  ad_user_data: 'denied',
  ad_personalization: 'denied',
  analytics_storage: 'denied',
  functionality_storage: 'denied',
  personalization_storage: 'denied',
  security_storage: 'granted',
  wait_for_update: 500
});
window.smartconsent = window.smartconsent || function () { (window.smartconsent.q = window.smartconsent.q || []).push(arguments); };
</script>
<script async src="https://cdn.smartgenie.co.uk/v1/smartconsent.min.js" data-site-id="YOUR_SITE_ID"></script>

See it running on your site

A free scan tells you which scripts need gating, which cookies need classifying, and which regulations apply to your visitors.