Cookie consent banner for surveys

A survey that loads tracking tools such as Google Tag Manager, Google Analytics or Meta Pixel sets analytical and advertising cookies in the respondent’s browser. The cookie consent banner lets respondents decide before any of those tools load.

Use it when you share a survey publicly with tracking turned on and your privacy policy requires consent for analytics or advertising cookies. If your organization already runs a consent tool such as Cookiebot, you can use that instead, as described at the end of this article.

What the banner does

When the banner is on, a respondent opening the survey sees a short note with three buttons: Accept all, Reject all and a cookie preferences button that opens the list of categories. The banner shows a link to the cookie policy and appears in the survey’s language.

Cookie categoryWhat it controls in the survey
Strictly necessary cookiesAlways on. Cookies the survey needs to work, for example the one that blocks repeated submissions.
Analytical cookiesGoogle Tag Manager and Google Analytics, including the form events sent to GTM.
Functional cookiesA separate category the respondent can accept or refuse.
Advertising/profiling cookiesMeta Pixel.
  • Until the respondent decides, no tracking tool loads.
  • After Accept all, the tools load straight away and events from the started survey are delivered.
  • After Reject all, none of the tracking tools load. The survey itself works the same.
  • The choice is saved for 365 days in the respondent’s browser, on the survey’s domain, so the banner does not come back on every visit.
  1. Open the survey in the editor.
  2. Go to Settings.
  3. Turn on Show cookie consent banner.
  4. Save and publish the survey.
  5. Open the live survey link in a private browser window and check that the banner appears.

To test the whole flow, accept cookies and confirm in GTM Preview (Tag Assistant) that your container loads. Then repeat in a new private window with Reject all and confirm that it does not.

The survey does not accept custom scripts, but Google Tag Manager does. Consent platforms such as Cookiebot, CookieYes or Usercentrics provide a GTM template, so your own banner can run on the survey.

  1. Keep Show cookie consent banner off in the survey settings. Otherwise respondents would see two banners.
  2. Add your container ID in Integrations → Google Tag Manager: see Google Tag Manager integration.
  3. In GTM, add your consent platform’s template, for example Cookiebot CMP, and set its trigger to Consent Initialization – All Pages.
  4. Set the consent requirements on your other tags (GA4, Google Ads, Meta Pixel) as described in your consent platform’s documentation.
  5. In your consent platform, add the domain the survey runs on to the list of allowed domains.
  6. Publish the container and test the survey in Preview.

Consent is stored per domain. If the survey runs on a custom domain such as survey.yourcompany.com, set up your consent platform for that domain the same way as for your other subdomains.

Which option to choose

Built-in bannerYour consent platform via GTM
SetupOne switch in SettingsTemplate and consent rules in GTM
Banner designMatches the surveyYour consent platform’s banner
Consent recordsStored in the respondent’s browserLogged in your consent platform
Best forSurveys that use GTM, GA or Meta Pixel without a company consent toolTeams that already manage consent with Cookiebot or a similar tool

Respondent consent rules differ by country and by the tools you use. If you are unsure which categories your tags fall into, check with your privacy or legal team before you launch.

Related: Google Tag Manager integration, Google Analytics integration, Meta Pixel integration and custom domain. Running surveys inside your own site? See website surveys.

FAQ

Does the cookie banner block Google Tag Manager until consent?

Yes. With the banner on, Google Tag Manager and Google Analytics load only after the respondent accepts analytical cookies, and Meta Pixel only after advertising cookies. If the respondent rejects, none of them load.

Can I use Cookiebot instead of the built-in banner?

Yes. Keep the built-in banner off, add the Cookiebot CMP template to your Google Tag Manager container with the Consent Initialization – All Pages trigger, and add the survey's domain in Cookiebot. Cookiebot then shows its own banner on the survey and controls your tags.

How long is the respondent's choice remembered?

For 365 days in the respondent's browser, on the survey's domain. The banner does not show again until the choice expires or the respondent clears cookies.

Need help or have more questions?