Glancygrowth analytics
UnderstandImproveMonitorReplace your stackPricing
Log in
Getting started
  • Introduction
  • Quickstart
  • Events, users and sessions
  • Turning features on and off
SDKs
  • Script tag (glancy.js)
  • JavaScript (npm)
  • Next.js
  • React Native and Expo
  • iOS and macOS (Swift)
  • Android and JVM (Kotlin)
  • WordPress
  • Segment
  • Content Security Policy
Understand
  • Overview, real time and reports
  • Saved reports and dashboards
  • Session replay and heatmaps
  • Ad attribution
  • Ask AI
Improve
  • A/B testing
Monitor
  • Performance (web vitals)
  • Errors
  • Uptime
  • Monitoring and notifications
Data and privacy
  • Integrations and Shopify
  • Autocapture and actions
  • Ad conversions (Meta, Google Ads, TikTok, Taboola)
  • Privacy and your data
  • Cookie banner and consent
Account and reference
  • Organizations, people and usage
  • HTTP API

Cookie banner and consent

The cookie banner is part of the infrastructure every plan includes (Plans). Find it in Setup → Consent. It runs on your site through the script tag, the WordPress plugin or the Next.js provider (with the JavaScript SDK, pass settings: true).

Ask visitors for consent before Glancy uses cookies, with a banner Glancy shows on every page until they choose. Or, depending on where they are, show a notice they can opt out from, or nothing at all (see Regions). Already have a cookie banner? Glancy can follow the choice visitors make in it instead (see Using your own cookie banner).

Consent isn't a separate product in Glancy: it's part of how Glancy handles personal data. The visitor's choice decides what everything else may do. Before they agree, Glancy can still count visits without cookies; replays, heatmaps and A/B tests wait; and ad conversions are only sent for people who allowed marketing. See Privacy and your data for the rest.

Open Setup → Consent, keep Glancy's banner selected under Banner, and make it yours. The Preview shows it as visitors will see it, as you go:

  • Content: the Title (optional), Text, Accept button and Reject button labels, and an optional Privacy policy link with its Link text.
  • Position: a box in the Bottom left or Bottom right corner, a full-width Bottom bar or Top bar, or a box in the Center of the screen.
  • Colors: start from a preset (Light, Dark, Brand) and pick the Background, Text, Accept button and Accept button text colors.
  • Corners (how round), Width (for boxes; bars are full width) and Text size.
  • Reject button: Outlined, or a less prominent Text link.
  • Font: the device's (System) or Your site's, so it matches your pages.
  • Shadow, and Dim the page behind it (useful with the center position).

Below the colors, Glancy checks their contrast against WCAG AA (text 4.5:1, the accept button 3:1 against the background). The presets all pass; if you pick your own colors, a note reminds you to check the contrast, since custom colors can fall outside it and make the banner hard to read.

Save changes, then turn Cookie banner on in Setup → Features (the On / Off pill at the top of the page takes you there). Reset to default starts over.

Customize with Ask AI (top of the page) asks Ask AI to design the banner with you: your brand colors, the texts in your language and tone, the position, the categories. It shows a card with a preview of the banner (and its choices) and Apply sets it (bucket admins). It only proposes colors that pass the contrast check, and you can ask from anywhere in Ask AI too, e.g. "Make the cookie banner dark with our green #16a34a and write it in Portuguese".

#Regions

Privacy laws differ by place, so the banner can behave differently for visitors depending on where they are. In Regions (the first card in Setup → Consent), pick what happens in each one:

Region Who's in it Default
Europe The EU and EEA, the UK and Switzerland (GDPR). Also visitors whose location isn't known. Ask for consent
US states with privacy laws California, Colorado, Connecticut, Delaware, Indiana, Iowa, Kentucky, Maryland, Minnesota, Montana, Nebraska, New Hampshire, New Jersey, Oregon, Rhode Island, Tennessee, Texas, Utah and Virginia Show a notice
Rest of the world Everywhere else No banner
  • Ask for consent (opt-in): the banner shows until they choose, and Glancy follows Before consent until they allow Analytics.
  • Show a notice (opt-out): Glancy tracks them as usual from the start, and a notice tells them so, with a button to opt out. Opting out works like Reject. A visitor whose browser sends Global Privacy Control is opted out of marketing (ad conversions, Google's ad consent) without asking. Set the notice's Text, Dismiss button and Opt-out button in the Notice card, which shows up when a region uses it.
  • No banner: Glancy tracks them as usual and nothing is shown. A Cookie settings link still opens their choices.

Glancy works out the region from the visitor's IP address when glancy.js asks for your settings. The address is used only for that and isn't kept. Preview as a visitor in (above the preview) shows the banner, the notice or nothing, as each region sees it.

Banners you set up before regions existed ask for consent in every region, as before, until you change them. The JavaScript SDK and Next.js packages follow regions from version 0.4.0; older versions ask for consent everywhere. With the Next.js middleware, the region comes from your own site's geo headers (Vercel, Cloudflare or CloudFront); without them, Europe's rule applies.

#Accessibility

The banner follows WCAG 2.2 AA:

  • It comes first in the page, so keyboard and screen reader users meet it before the content, as a labelled region (or, with Dim the page behind it, a modal dialog that takes the focus and keeps it until they choose).
  • Everything works with the keyboard: Tab through the buttons, Customize opens the categories as switches (Space turns one on or off), each with its description read out. A banner reopened from a Cookie settings link takes the focus, closes with Escape and gives the focus back to the link.
  • Focus rings use the text color, the policy link says it opens in a new tab, and there's no animation for people who ask their device to reduce motion.
  • Contrast depends on your colors: keep the check above green.

#Before consent

Choose what Glancy does before visitors allow Analytics, and after they reject it:

  • Count anonymously (the default): page views and events are counted with no cookies or storage, as one anonymous id per visitor and day worked out by Glancy's servers and never stored on their device. The id is a hash of their IP address and browser with a random salt that Glancy deletes once the day is over, so it can't be linked to another day's or traced back to them afterwards. The IP address itself isn't stored.
  • Send nothing: nothing leaves the browser until they allow Analytics. When they do, the page they're on is counted.

#Cookie categories

Visitors can Accept all, Reject, or Customize and pick categories one by one. Necessary is always on; Analytics, Marketing and Preferences can each be offered or not (Analytics always is), with your own name and description. Rename the Customize and Save choices buttons too, and switch the Preview to Choices to see that panel.

Analytics not allowed Analytics allowed
Page views and events As set in Before consent Yes
Who they are One anonymous id per day (or nothing); identify waits until they allow Analytics A lasting anonymous id (and the user after identify)
Session replay, heatmaps, web vitals, errors, autocapture No As set on your script tag
A/B tests No: they see the original Yes

Ad conversions are sent only for visitors who allowed both Analytics and Marketing.

#Changing their mind

The choice is remembered on the visitor's device, so the banner doesn't come back. Give people a way to reopen it, for example a Cookie settings link in your footer. It opens on the categories, with their current choice:

  • A link to #cookie-settings: works in any menu or footer builder (WordPress, Webflow, Shopify…), since it's just a URL. On another page, /#cookie-settings opens the choices once the page loads.

    <a href="#cookie-settings">Cookie settings</a>
    
  • data-glancy-cookie-settings on any button or element:

    <button data-glancy-cookie-settings>Manage cookies</button>
    
  • From your code: glancy.showCookieBanner().

Neither the link nor the attribute needs any JavaScript of yours, so they also work with a strict Content Security Policy.

Floating button: for sites with nowhere to put a link, turn on Show it under Floating button. Visitors who have chosen then see a small round cookie button in the bottom corner you pick, with your banner's colors; clicking it reopens the choices. It's off unless you turn it on.

If they turn Analytics off after allowing it, Glancy forgets their ids on that device.

#Your other scripts

The banner can hold back your other tags (Google Analytics, the Meta pixel, chat widgets…) until their category is allowed. Change the script's type to text/plain and add data-glancy-consent with the category:

<script type="text/plain" data-glancy-consent="marketing" src="https://connect.facebook.net/en_US/fbevents.js"></script>
<script type="text/plain" data-glancy-consent="analytics">
  // runs once Analytics is allowed
</script>

Several categories (data-glancy-consent="analytics marketing") need all of them. For a module script, add data-glancy-type="module". If your site has a Content Security Policy with nonces, put the nonce on the held tag: Glancy carries it over when it runs the script (Content Security Policy).

  • Google tags with Consent Mode: if gtag is on the page, Glancy updates analytics_storage, ad_storage, ad_user_data, ad_personalization, functionality_storage and personalization_storage from the choice. Set your defaults to denied before your Google tag, as Google asks.
  • Anything else: glancy.getConsent() returns { necessary, analytics, marketing, preferences } (or null before the visitor chooses where the banner asks first; where it shows a notice or nothing, what applies until they opt out), and a glancy:consent event fires on window with the same object in event.detail whenever they choose:
window.addEventListener("glancy:consent", (e) => {
  if (e.detail.preferences) loadChatWidget();
});

#Using your own cookie banner

If your site already has a cookie banner (Cookiebot, OneTrust, Usercentrics, CookieYes, Complianz, Didomi, iubenda, Shopify's own…), keep it: Glancy can follow the choice visitors make there instead of asking again. In Setup → Consent, under Banner, choose:

  • Your banner, via Google Consent Mode: for banners that send Google Consent Mode, as most consent platforms do for Google's own tags (turn Consent Mode on in your banner's settings if it isn't). Glancy reads the gtag("consent", …) defaults and updates, and the consent state of banners installed as Google Tag Manager templates.
    • analytics_storage granted turns on Glancy's full tracking (the Analytics category).
    • ad_storage granted, unless ad_user_data is denied, allows ad conversions (Marketing).
    • functionality_storage or personalization_storage granted is Preferences.
  • Your WordPress consent plugin: for WordPress sites with a consent plugin that supports the WP Consent API (Complianz, CookieYes, Cookiebot and others) and the WP Consent API plugin itself. Statistics turns on full tracking, Marketing ad conversions, Preferences preferences. Anonymous statistics alone isn't enough for cookies. Install the WordPress plugin 0.3.0 or later, so consent plugins list Glancy as following the API.
  • Your Shopify store's cookie banner: for Shopify stores with glancy.js in the theme, using Shopify's own cookie banner (Settings → Customer privacy in Shopify) or a consent app built on Shopify's Customer Privacy API. Its Analytics choice turns on full tracking; Marketing, unless the visitor opted out of the sale or sharing of their data, allows ad conversions; Preferences is preferences. Shopify answers according to your store's privacy settings for the visitor's region. The Shopify source's Custom Pixel isn't affected: it follows the permissions you give it in Shopify (Settings → Customer events).

Save changes, and make sure Cookie banner is on in Setup → Features. Glancy then shows nothing on your site:

  • On each page, Glancy waits a moment for your banner's choice before sending anything (a few seconds at most). Until visitors allow Analytics, and after they withdraw it, they are counted as Before consent says: anonymously without cookies, or not at all.
  • When they change their mind in your banner, Glancy follows straight away, without a reload.
  • With the Next.js provider, page views sent from your server wait for your banner's choice too, everywhere: they start once a visitor has allowed Analytics there.
  • If Glancy can't find your banner's choice (Consent Mode isn't on, the WP Consent API isn't installed, or the page isn't a Shopify storefront), it counts visitors without cookies and warns in the browser console.
  • Regions, the banner's look and the Cookie settings link don't apply: your banner decides where it asks and reopens its own choices.
  • Scripts held back with data-glancy-consent and glancy:consent listeners (above) still work, and glancy.getConsent() returns your banner's choice. Glancy doesn't update Google's tags itself: that's your banner's job.

Using a consent tool that sends neither? Leave the cookie banner off and see Consent.

Previous
Privacy and your data
Next
Organizations, people and usage
On this page
  • Regions
  • Accessibility
  • Before consent
  • Cookie categories
  • Changing their mind
  • Your other scripts
  • Using your own cookie banner
Log in