> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hiveku.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a Cookie Consent Banner to Your Site

> Turn on the cookie consent banner, choose how it behaves for visitors in different places, and make it match your brand

A cookie consent banner asks visitors before your site loads optional cookies, such as analytics and advertising tags. Hiveku has one built in: you switch it on per environment, then set how it behaves and how it looks.

This guide sets it up on Northwind's Pearl District site.

## Open the site's hosting settings

Open the website, click its name at the top of the page, then **Hosting**. Click **Production** in the row of environments: Production is your live site. Development and Staging have their own switch and consent mode; everything else you set here applies to all of them.

Scroll to **Hiveku Integrations** and find the **Cookie Consent** card.

## Turn the banner on

Click the switch on the card. Once it's on, the card says **Active** and shows **Customize**.

![The Cookie Consent card, GDPR/CCPA compliance, with its switch on and outlined, Active, settings apply on next page load, and Customize outlined](https://mintcdn.com/locusdigital/lZcuweQKlHSSXswv/images/how-tos/websites/ck-01-card-closeup.webp?fit=max\&auto=format\&n=lZcuweQKlHSSXswv\&q=85\&s=a7eb134346be8d266e0fe3ad76a291ce)

The first time you turn it on, deploy the environment so the banner is added to your pages: click **Deploy** at the top right, as in [Publish Your Changes](/how-tos/site-builder/publish). After that, changes to the banner's look, text and categories reach your site on the next page load. A change to **Consent mode** needs another deploy.

## Choose how it behaves

Click **Customize**. The **General** tab sets the rules.

![Cookie Consent, production, General tab: Consent mode Geo-based hybrid (GDPR opt-in in the EU/UK, opt-out across the US), recommended; Privacy policy URL /privacy-policy; Re-prompt after 180 days; Log consent records on; Cancel and Save settings](https://mintcdn.com/locusdigital/lZcuweQKlHSSXswv/images/how-tos/websites/ck-02-general-closeup.webp?fit=max\&auto=format\&n=lZcuweQKlHSSXswv\&q=85\&s=958721e13b6a31020f3e31628524640e)

* **Consent mode** decides what loads before a visitor chooses:
  * **Geo-based hybrid** (recommended) asks first in the EU and UK, and loads by default across the US with a way to opt out.
  * **Opt-in everywhere** is the strictest: nothing optional loads until the visitor accepts, wherever they are.
  * **Opt-out only** loads by default everywhere, with a Do Not Sell link visitors can use.
* **Privacy policy URL** is the page the banner links to. Northwind's is `/privacy-policy`.
* **Re-prompt after (days)** asks visitors again once their choice is this old.
* **Log consent records** keeps a record of each visitor's choice.

## Make it match your brand

Click **Appearance**. Pick a **Layout** (a full-width bar or a box) and a **Position**, set the **Primary**, **Background** and **Text** colors, and edit the **Banner title** and **Banner body**. The **Preview** shows the banner as visitors will see it, with **Manage cookies**, **Decline all** and **Accept all**.

![Appearance tab: Layout Bar (full width), Position Bottom, Primary #4F46E5, Background #1F2937, Text #F9FAFB, Banner title We value your privacy, the Banner body text, and the Preview outlined showing the dark banner with Manage cookies, Decline all and Accept all](https://mintcdn.com/locusdigital/lZcuweQKlHSSXswv/images/how-tos/websites/ck-03-appearance-closeup.webp?fit=max\&auto=format\&n=lZcuweQKlHSSXswv\&q=85\&s=69d5b616a8c58b2484d15a417eb3779f)

## Check the cookie categories

Click **Categories**. **Necessary** cookies are always active. **Analytics**, **Advertisement** and **Functionality** are optional: **Default on** decides whether each starts switched on when a visitor opens **Manage cookies**. You can reword each description.

![Categories tab: Necessary, Always active; Analytics, Advertisement and Functionality each with a Default on switch, off, and an editable description; the Analytics Default on switch is outlined](https://mintcdn.com/locusdigital/lZcuweQKlHSSXswv/images/how-tos/websites/ck-04-categories-closeup.webp?fit=max\&auto=format\&n=lZcuweQKlHSSXswv\&q=85\&s=e247898a48d00ba0f1c7447349fa711b)

**Trackers** is where you list the tools your site uses so the banner can hold them back until a visitor agrees. Google tags follow the visitor's choice on their own; other snippets and pixels you add there load only after their category is accepted. Trackers you add are saved as you go.

Click **Save settings** to keep your changes. Northwind kept the settings shown here, so it clicked **Cancel**.

## Good to know

* **Each environment has its own switch and consent mode.** The banner's look, text, categories, privacy link and re-prompt are shared by every environment, so a change you try on Development changes Production too.
* **Turning it off** stops the banner on the next page load. Deploy right after, so your pages stop waiting for consent too.
* **Test it** in a private browser window on your live site: the banner shows on the first visit.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.