Add a GDPR cookie consent banner to a page
Ask visitors for consent before a landing page tracks them, choose what waits for it, and set the banner's text and look in Page settings.
On this page
GenPage can show its own consent banner on a landing page, so visitors decide whether the page may track them before anything that needs consent loads. You set it up per landing page, in the editor under Page settings.
Before you start
- The Consent tab is on every plan.
- GA4, the Meta Pixel and custom scripts are added on the Scripts tab, which needs the Scale plan or higher.
Turn on the banner
-
Open the page in the editor, open the Editor menu and choose Page settings.
-
Open the Consent tab and turn on Ask for consent before tracking.
The Consent tab of Page settings with Ask for consent before tracking turned on and highlighted, GenPage banner selected, and a preview of the banner in the bottom-left corner of a page -
Under Consent banner, choose GenPage banner. If you use a consent management platform (CMP), choose Your consent platform instead and paste its installation script; that option works as it always has, and pages that were set up with a CMP keep it selected.
-
Set the banner's text and look (see below), then click Save changes.
To check the result, open the published page in a private browser window.
What waits for consent
The banner offers three categories. Essential is always on; Analytics and Marketing are off until the visitor turns them on, and nothing is pre-ticked.
- Analytics: GenPage's own tracking, heatmaps, session replays, and GA4.
- Marketing: the Meta Pixel, and the Google Ads conversion a form reports when it is submitted.
- Custom scripts: each script on the Scripts tab has its own category next to its name. Analytics & marketing, the default, waits for both; Analytics or Marketing waits for that one. Essential — always load loads before any choice, so use it only for scripts the page cannot work without.
Forms work whatever the visitor chooses. If a visitor's browser sends a Global Privacy Control signal, marketing stays off even when they click accept.
Set the text
- Language picks the built-in text: English, Français, Deutsch, Español, Italiano, Nederlands or Português. Every visitor sees the language you pick.
- Title, Message, Accept button, Reject button and Customize button replace the built-in text. Leave a field blank to keep the built-in text for the language.
- Privacy policy URL is marked recommended. It is linked after the message, so visitors can read what you collect and why.
Set the look
- Layout: Box, bottom left, Box, bottom right, Bar across the bottom, or Centered, blocks the page, which dims the page until the visitor chooses.
- Theme: Light or Dark.
- Button color: left blank, it uses the primary color of the page's brand, or a neutral color when the page has no brand. Accept and reject always share the same color and weight.
The Preview at the top of the tab updates as you type. Switch it between Banner, what a visitor sees first, and Preferences, the view Customize opens.
Let visitors change their choice
Once a visitor accepts or rejects, the banner closes completely and nothing stays on the page. Withdrawing consent has to be as easy as giving it, so give visitors a way back to their choice:
- Add a link to
#genpage-consentanywhere on the page, for example a "Cookie settings" link in your footer. It opens the banner's preferences. - Or, from your own code, call
window.genpage.consent.open().
How long a choice lasts
A choice is remembered in the visitor's browser, separately for each landing page, for six months. After that, the banner asks again.
When a visitor withdraws consent, GenPage's tracking stops at once. If a third-party script such as GA4, the Meta Pixel or one of your custom scripts has already loaded, the page reloads so that script stops running.
Google tags and embedded pages
- Google Consent Mode v2: Google tags in your custom scripts are told the visitor's choice. Everything starts as denied; analytics consent grants analytics storage, and marketing consent grants the advertising signals.
- Embedded pages: pages shown on your own site through the Embed SDK ask on every visit, because the embedded frame cannot store the choice. The SDK never loads GA4, the Meta Pixel or custom scripts, so there the banner covers GenPage's own tracking.
Was this article helpful?