
# Cookie Consent Banner

Each site in Web Analytics can show Karmaflow.ai's cookie consent banner. The banner asks or tells a visitor according to where they are, sets Google Consent Mode before your other tags run, holds Web Analytics until the visitor has answered, removes a declined category's cookies, and keeps a receipt of every choice.

The rules it follows are a **rule pack**: Karmaflow.ai's reading of what each place asks for, written as rows you can read. You can amend any row for your own site, with a reason. Three things are fixed, and the page lists them.

> The rule pack is not legal advice. Whether your site's setup is lawful for your visitors is your decision as the site owner, and every row is yours to change.

## What you'll need

- A site in **Data → Web Analytics**. If you have none, see [Installing the Tracker](/help/web-analytics/installing-the-tracker).
- The **View Analytics** permission to open the page, and **Manage Analytics** to change anything on it.
- Access to your website's `<head>`, to add one tag.

## Turn the banner on

**Data → Web Analytics**, pick the site, then **Configure → Consent**. The page opens on the **Banner** tab.

1. Under **On this site**, turn on the switch beside **The consent banner is off**. It saves at once, and the line changes to **The consent banner is on**.
2. Copy the first block, **Put this first in your site's `<head>`, before analytics and ad tags**, and paste it into your site's `<head>` above Google Tag Manager, Google Analytics and any advertising tag. The order matters: the tag sets Google Consent Mode defaults for each region, and Google's tags have to find them already set.
3. Copy the second block, **A link that reopens the choices (for your footer)**, into your footer. A visitor uses it to change their mind later, which has to be as easy as the first choice was.
4. Open your site in a private window. The banner appears at the bottom with **Settings**, **Reject all** and **Accept all**.

A change on this page reaches visitors within about 10 minutes.

<!-- SCREENSHOT: web-analytics/consent-banner-tab.png — Demo workspace, Brightline Solar site, Configure → Consent, Banner tab with the switch on, both copy blocks and the preview on the right -->

**While the banner is on, Web Analytics waits for it.** The tracker on this site sets no cookie and counts nothing until the banner reports the visitor's answer. Where your rule does not ask first, the banner reports "yes" as the page loads, so those visits are counted from the first page. You do not need to turn on **Wait for consent** under **Configure → Settings** as well.

## Words, languages and look

Still on the **Banner** tab. Everything below is a draft until you press **Save changes** in the bar at the bottom, and the preview under **How it will look** follows the draft as you type.

- **Site name** is shown in the banner title. Left empty, the site's own name is used.
- **Privacy or cookie policy link** opens from the banner in a new tab. The page warns you when a banner is on without one.
- **Languages**: English and French are built in. A visitor gets the language of the page they are on, or of their browser, when it is one you ticked; otherwise the first one.
- Each line of the banner can be reworded, per language. A line you leave empty uses the built-in wording. **All wording (17 lines)** shows every line, including the Settings panel. `{site}` stands for your site name and `{months}` for how long a choice lasts.
- **Look**: an **Accent colour**, **Light or dark** (follow the page, or fix one), and **Position** (across the bottom, bottom left or bottom right).

**Reject and Accept always look the same and sit side by side.** A site cannot restyle one of them: that is what makes the choice a fair one.

The preview is the real banner, drawn from your draft. Use **Banner / Settings**, **Laptop / Phone** and **Light page / Dark page** above it to see each state.

## Who is asked, and how

Open the **Rules** tab. One sentence at the top says what your site does today, for example: *Visitors from 33 places are asked before any optional cookie is set, and everyone else sees a notice and can say no.*

Each row is one rule:

| Column | What it shows |
| --- | --- |
| **Where** | The place the rule covers. |
| **Rule pack** | How the rule pack says a visitor from there is asked, the law or practice it follows, and why. |
| **On this site** | What your site does. **Follows the rule pack.** unless you amended the row. |

A visitor is asked in one of three ways:

| Choice | What a visitor gets |
| --- | --- |
| **Ask first** | Nothing optional runs until the visitor says yes. |
| **Tell, and let them say no** | Optional cookies are on, the banner is the notice, and a no turns them off and removes them. |
| **Show nothing** | No banner. Optional cookies are on, and the footer link still opens the choices. |

The first rule pack asks first in the EU, the EEA, the United Kingdom, Switzerland and Québec, and tells with an easy no everywhere else. It keeps marketing off for any visitor whose browser sends a Global Privacy Control signal.

### Amend a rule

1. On the row, choose **Amend**.
2. Under **Visitors from here**, choose how they are asked. Tick or clear **Global Privacy Control keeps marketing off**.
3. In **Why**, say why in a few words. It is required: the reason is shown beside the rule and kept in the audit log.
4. Choose **Save this rule**.

The row now shows your rule beside the rule pack's, tagged **Stricter than the rule pack** or **Looser than the rule pack**, with your reason, your name and the date. A looser rule is allowed; the form tells you it is looser before you save. **Put back to the rule pack** removes your amendment.

<!-- SCREENSHOT: web-analytics/consent-rules-tab.png — Demo workspace, Rules tab with one row amended (Rest of Canada, Ask first, "Stricter than the rule pack", reason and name visible) and the two cards on the right -->

To set a rule for a place the rule pack does not name on its own, choose **Add a rule for another place** and enter a country code such as `BR`, or a country and region such as `US-TX`. A rule for a whole country also answers for its regions: a rule for `CA` replaces the rule for Québec, the form warns you before you save, and the Québec row then shows your rule instead of the rule pack's.

A change is marked **Looser than the rule pack** when it loosens either thing a rule says: how visitors are asked, or the Global Privacy Control answer.

### What a site cannot change

| Fixed | What it means |
| --- | --- |
| **A "no" is kept** | When a visitor declines a category, its cookies are removed and nothing in it runs. |
| **Reject is as easy as accept** | Wherever the banner offers Accept, it offers Reject with the same weight. |
| **Every choice is recorded** | Each choice is stored as a receipt. |

One more row cannot be amended: **Location not known**. When a visitor's place cannot be read, they are asked first.

### When the rules change

Under **When the rules change** on the **Rules** tab, choose how a newer rule pack reaches this site:

- **Apply new rules automatically** (the default). The site follows a newer pack as soon as it is published. Your amendments stay.
- **Ask me first**. The site stays on the rules it has until someone with Manage Analytics chooses **Move this site to the new rules**.
- **Stay on this version**. The site keeps these rules until someone moves it.

The **Rules** tab always says what happened, in words:

- A site that follows automatically shows **The rules changed on** the date, with each rule that changed, what it was and what it is now, and why. The notice stays for 60 days.
- A site that asks first, or stays on its version, shows the pack that **is waiting** with the same list, and the button to move.
- A change that loosens a rule is tagged **Looser than before**; one that tightens it, **Stricter than before**. A change that affects only some places names them.
- If Karmaflow.ai withdraws a rule pack, the tab says which one, when and why. A site that asked first, or stayed on that version, now follows the newest pack: choose **Keep this site on rule pack** to settle it there. A site that followed it automatically is back on the pack before it.

Your own rules are never changed by a new rule pack, and they still win over it.

## Cookies the banner removes

Under **Cookies** on the **Banner** tab. When a visitor says no to Analytics or Marketing, the banner removes that category's cookies on every page, and the list of known ones is shown under each box (Google Analytics, Google Ads, Meta, Microsoft, LinkedIn, TikTok and others, plus Karmaflow.ai's own).

- Add your own under **Analytics cookies to add** or **Marketing cookies to add**, one name per line. End a name with `*` to match every cookie that starts with it.
- **Less common settings** holds **Cookies to keep** (never removed, for a cookie your site cannot work without), **A choice lasts (months)**, **Where the choice is kept**, and **Set Google Consent Mode defaults from the tag** (leave it on unless your pages already set those defaults themselves, above the tag).

## Cookies the banner has seen

Open the **Cookies** tab. The banner can tell you which cookies your site's pages actually hold, so the lists above stay true without you checking by hand.

1. Under **Learn this site's cookies**, turn the switch on. It saves at once, and the line changes to **The banner reports the cookie names it finds**.
2. Let the site have some visits. Names arrive as visitors answer the banner, and on about one page view in twenty after that.
3. Come back to the tab. One sentence says how many names the banner has seen and how many are waiting for an answer.

**What the banner sends.** Names only, never a cookie's value. A name can carry an identifier (a stream id, a user number, a hash), so the banner cuts each name where a part looks like one and sends the rest with a `*`: `_ga_AB12CD34EF` is sent as `_ga_*`. Nothing about the visitor is kept, only how often a name was reported. A visitor who declined analytics is not asked again after their answer. A name nobody settles is forgotten 30 days after it was last reported.

Each row under **Seen on this site** is one cookie name:

| Column | What it shows |
| --- | --- |
| **Cookie** | The name, how often it was reported, and when it was last seen. |
| **Where it stands** | Its category and who put it there: **Known** (the banner already knows it, for example Google Analytics), **Set by** you or a colleague, **Added by the assistant**, or **Waiting for your answer**. |
| **Your answer** | Choose **Analytics** or **Marketing** (the banner removes it when a visitor says no), **Necessary (keep it)** (it joins **Cookies to keep** and is never removed), or **Leave alone**. **Take it back out** undoes your answer. |

Known cookies are placed at no cost, and you can place every other name yourself.

**A cookie set before visitors answered.** The banner notes which cookies are already on the page when it starts. When an analytics or marketing cookie appears after that and before a visitor's first answer, in a place where your rule asks first, the tab says so at the top and tags the row **Before visitors answered**. The banner removes it on a no, but it looks as if something on your site sets it without waiting. Load that tag after the banner's tag, or from **Configure → Tag manager**, so it waits for the answer.

**Forget the names nobody has placed**, under the list, removes every name that is still waiting. The banner then reports again what your site really holds. Names you placed or left alone stay.

### Let an assistant place new names

*This is an add-on. If your workspace does not have it, the card says so, and you can still place each name yourself.*

Under **Names nobody has placed**, an assistant reads each new name about once an hour and puts it in Necessary, Analytics or Marketing, or says it cannot tell from the name. Choose what happens next:

- **Ask me first** (the default). The row shows **The assistant reads it as Marketing, 94% sure**. Choose **Accept Marketing**, or pick another answer. Nothing changes until someone accepts.
- **Add what it is sure of**. An Analytics or Marketing cookie it is sure of, reported on more than one day, is added to that list. The row then reads **Added by the assistant** with the date, and you can move it or take it back out. It never adds a name it is not sure of, and a pattern ending in `*` always waits for your answer, because a pattern can reach cookies the banner has not seen yet.

**Read N new names now** asks the assistant at once instead of waiting for the hour. If nothing was placed, the card says why: the add-on is not on for your workspace, the workspace has reached its spending limit, or the assistant did not answer.

Every change here, yours or the assistant's, is written to your audit log.

<!-- SCREENSHOT: web-analytics/consent-cookies-tab.png — Demo workspace, Brightline Solar site, Cookies tab with learning on, the list showing one Known row, one row "Waiting for your answer" with Accept Marketing, one row set by a person, and both cards on the right -->

## Receipts

Open the **Receipts** tab. One sentence summarises the last 30 days, and the table lists every choice, newest first: when, what was chosen, how the visitor was asked (and whether that was your own rule), where they were, the site address and the language.

- Filter by **Choice**, **How they were asked**, **Country** and a date range.
- **Export CSV** downloads what the table is showing, with its filters. An export is itself written to your audit log.

A receipt holds the choice, the time, the place and the rule that applied. It holds no IP address.

**How long receipts are kept.** Under the table, **Receipts are kept for** shows the number of months after a visitor's latest choice, then they are removed. It follows the rule pack (36 months in the first pack) until you choose another number; you need **Manage Analytics** to change it. A receipt is never kept for less time than a choice lasts on your site, because it is the proof of a choice that is still in use: the shortest number offered is how long a choice lasts, and every receipt is kept a week longer than the choice it records. Anything that would keep receipts for less time than today asks you first, whether it is this number, a shorter **A choice lasts** on the **Banner** tab, or moving the site to a rule pack that keeps them for less: receipts older than the new number are removed within a day and cannot be brought back.

<!-- SCREENSHOT: web-analytics/consent-receipts-tab.png — Demo workspace, Receipts tab with the summary sentence, filters and a page of rows -->

## If you already use another consent tool

Keep it, and leave this banner off. Connect your tool to Web Analytics instead: see **Connecting your cookie banner** in [Privacy, Consent & Retention](/help/web-analytics/privacy-and-retention). Running two banners on one site asks visitors twice.

## Troubleshooting

**The banner does not appear.** Check that the switch on the **Banner** tab is on and that the tag is in the page's `<head>`. A visitor who has already chosen is not asked again until their choice runs out; use a private window. If the rule for where you are is **Show nothing**, there is no banner: open the footer link instead.

**Analytics stopped counting visits after I turned the banner on.** The tracker is waiting for the banner. That usually means the tag is not on your pages yet. **Configure → Settings** shows a notice when a site that waits has had no events in 24 hours.

**Google Analytics reports fewer visitors from Europe.** That is the rule working: where visitors are asked first, Google's tags do not run until a visitor accepts.

**A page of my site is on another subdomain and asks again.** Under **Less common settings**, **Where the choice is kept** should be **The whole site, subdomains included**.

**The Cookies tab is empty.** Check that **Learn this site's cookies** is on and that the banner itself is on. Names arrive only as visitors answer the banner, so a new site needs some visits first.

**The banner removed a cookie my site needs.** On the **Cookies** tab, set that cookie to **Necessary (keep it)**, or add its name under **Cookies to keep** on the **Banner** tab. If the assistant added it, switch **Names nobody has placed** to **Ask me first**.

**I get "Someone else changed these rules a moment ago".** Two people amended rules at the same time. Reload the page and make your change again.

## Related

- [Privacy, Consent & Retention](/help/web-analytics/privacy-and-retention): what the tracker records about consent, and retention.
- [Installing the Tracker](/help/web-analytics/installing-the-tracker)
- [Web Analytics Overview](/help/web-analytics/overview)
