How to create a GDPR-compliant consent popup
A plain-English guide to consent popups under GDPR — what consent mode means, how to withhold tracking until the visitor agrees, and how to set it up.
If you have EU visitors, you generally need consent before setting non-essential cookies or running analytics that identify users. A consent popup asks for that permission — and your tooling should respect the answer.
This is general guidance, not legal advice. Consult a professional for your specific obligations.
What 'consent mode' actually means
Consent mode is when your tools buffer analytics and withhold any tracking identifier until the visitor agrees. Campaigns can still display; what's gated is the tracking and storage — which is the part that needs consent.
How to set it up
- 1
Enable consent mode
Turn on the require-consent option so the widget holds analytics and doesn't persist a tracking ID by default.
- 2
Show a clear consent notice
Use a bottom bar that explains what you collect, with an accept action and a link to your policy.
- 3
Grant consent on accept
When the visitor accepts, signal consent so buffered events flush and tracking storage is enabled.
- 4
Respect a decline
If they decline, keep analytics off — display still works, but you don't track or store identifiers.
<!-- 1) Enable consent mode on the embed -->
<script async src="https://noundesk.com/widget.js"
data-key="nf_live_xxxxx" data-require-consent="true"></script>
<!-- 2) When the visitor accepts in your consent banner -->
<script>window.NounDesk && window.NounDesk.consent(true)</script>Good practices
- Don't pre-tick or assume consent — it must be a clear, affirmative action
- Make declining as easy as accepting
- Link to your privacy/cookie policy
- Keep a record of how consent is handled
FAQ
Do I need a consent popup for GDPR?+
If you serve EU/EEA visitors and use non-essential cookies or identifying analytics, you generally need prior consent. A consent popup collects that permission. Essential, functional storage is treated differently — check your specific obligations.
What is consent mode in a popup tool?+
Consent mode buffers analytics and withholds tracking identifiers until the visitor consents, while still allowing campaigns to display. NounDesk supports this with a require-consent flag and a consent() call you trigger when the visitor accepts.
Can I still show popups before consent?+
Yes. Displaying a campaign isn't the same as tracking. With consent mode, popups can render while analytics and tracking storage stay off until the visitor agrees.