Cookie Consent
Gate Zigpoll on your visitor's cookie consent, on Shopify or any other platform
Zigpoll stores a small amount of data in the visitor's browser — a page-view counter, a session counter, the referring site, the landing page, and any campaign parameters on the URL — and uses it to decide which survey to show. In regions that require opt-in consent, that data should only be collected once the visitor has agreed.
Zigpoll handles this automatically on Shopify, and gives you a JavaScript API to drive it from any other consent manager.
When consent is denied, Zigpoll is entirely absent: nothing is written to the browser, nothing about the visitor is sent to Zigpoll's servers, and the survey script is never loaded. When consent is granted the survey appears immediately, with no page reload.
Shopify — automatic
If you use the Zigpoll app embed on Shopify, this is already handled. Zigpoll reads Shopify's Customer Privacy API and only collects data when analyticsProcessingAllowed() is true. It also listens for the visitorConsentCollected event, so a visitor who accepts partway through their session gets the survey right away, and one who withdraws consent stops being tracked immediately.
This works with any Shopify consent app — Pandectes, Consentmo, Cookiebot and others — because Zigpoll reads the consent decision from Shopify rather than from the app. That matters, because Shopify does not guarantee the order in which app embeds load.
Configure your consent regions in Shopify. Go to Settings → Customer privacy in your Shopify admin and set the regions that require consent.
Until you do, Shopify reports that analytics processing is allowed, and Zigpoll — along with every other app that respects the Customer Privacy API — will treat visitors as consenting until your banner records a decision.
Showing surveys without waiting for consent
If you would rather your surveys show to every visitor — before a consent decision, and to visitors who decline — you can say so in the dashboard under Settings → General → Cookie Consent: choose Show surveys to everyone and save.
With that setting on, Zigpoll treats consent as granted on your storefront: surveys appear immediately and Zigpoll stores its page-view and session counters in the visitor's browser as it normally would. You are the data controller for your store, so make sure this is covered by your privacy policy. The default, Wait for consent, is the right choice for most stores.
To read the setting, Zigpoll makes one small request before consent — only on a page where Shopify has reported that analytics is not allowed. It carries your store's identity and nothing about the visitor: no page URL, no counters, no cookies. On a store that has not opted in, that request is the only thing that happens, and Zigpoll stays absent exactly as described above.
Anything your page sets itself — requireConsent, analyticsConsent, respectGPC — still takes precedence over the dashboard setting. Changes take effect on your storefront within a few minutes.
Survey links and shared surveys
Consent gating applies to surveys embedded in your storefront. It does not apply to surveys opened from a survey link or public link, which are hosted on Zigpoll's own domain and only load because the respondent chose to open them.
Inline embeds and named surveys
A page that names a specific survey is not gated either. That covers the inline embed snippet — a survey you place on a specific page, such as a returns or contact form — and the "show on click" and "load programmatically" snippets: anything that sets window.Zigpoll.pollId. You put that survey on that page deliberately, and a visitor who has declined cookies can still use a form you put in front of them.
This applies to every Zigpoll survey on that page, not just the named one, and holds even if the visitor later declines your banner on it. If you would rather those surveys wait for consent like everything else, opt back in before the Zigpoll script tag:
requireConsent, respectGPC and an explicit analyticsConsent still take precedence over this exemption.
Any other platform
Use the JavaScript API. It works on WordPress, BigCommerce, custom storefronts, and on Shopify if you would rather drive Zigpoll from your own consent manager than from Shopify's.
1. Lock Zigpoll before it loads
Set requireConsent before the Zigpoll script tag. Zigpoll will do nothing at all until you tell it otherwise.
2. Tell Zigpoll the decision
Call consent() from your consent manager's callback, whenever the decision is made or changed.
It also accepts a Google Consent Mode style object, so you can forward what your consent manager already gives you:
Call it as often as you like, in either direction. Granting starts Zigpoll without a page reload. Denying stops it and removes the data Zigpoll stored.
On Shopify, calling consent() — or declaring analyticsConsent — tells Zigpoll that you are driving consent, and it stops listening to Shopify's Customer Privacy API for the rest of the page. Your decision is not overturned by the visitor's next click on a Shopify consent banner.
Setting the decision up front
If you already know the answer when the page renders — for example your consent manager wrote it to a cookie on a previous visit — you can declare it instead of calling a function:
Use consent() for anything that happens after the page loads.
Examples
Cookiebot
OneTrust
Google Consent Mode / dataLayer
WordPress Consent API
Blocking the script instead
If your consent manager blocks scripts by category rather than calling an API, you can categorize Zigpoll's script tag directly and skip the JavaScript entirely. Zigpoll belongs in the statistics / analytics category.
Cookiebot:
OneTrust:
This works, but the API is preferable where you have the choice: a blocked script cannot start when the visitor later accepts, so those visitors see no survey until they load a new page.
Global Privacy Control
Zigpoll can treat a Global Privacy Control signal as a denial. This is off by default, because GPC is primarily a "do not sell or share" signal rather than an analytics one, some browsers send it for every visitor, and Shopify already accounts for it in its own privacy settings.
Checking your setup
getConsentState() returns 'unknown', 'allowed' or 'denied':
To confirm it's working, open your browser's developer tools:
Network — decline consent and reload. There should be no request to
api.zigpoll.comother than, on Shopify, a singleconsent-policylookup that carries only your store's identity — and no/shim,/dataorembed.js.Application → Local Storage — there should be no
zigpoll-keys.Accept consent. The survey should appear without reloading the page.
If Zigpoll runs when you expect it not to, check that requireConsent is set before the Zigpoll script tag. Set afterwards, it has no effect.
What happens to data already collected
If a visitor grants consent and later withdraws it, Zigpoll stops immediately and removes the counters, referrer, landing page and campaign parameters it stored in the browser.
Their session counter starts again from zero if they consent again later, so a returning customer will look like a new visitor. This is a deliberate consequence of honouring the withdrawal.
To delete survey responses that have already been submitted, see Removing Participant Data.
Last updated

