> ## Content Index
> Fetch the complete content index at: https://www.ectobuilder.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Cookie consent on Ghost: how to set up a banner that actually blocks trackers
- URL: https://www.ectobuilder.com/blog/ghost-cookie-consent/
- Published: 2026-10-12T15:43:51.000Z
- Updated: 2026-10-13T15:04:40.000Z
- Description: Ghost has no cookie banner, and most pasted-in ones don't stop the trackers. How to set up cookie consent in an Ectobuilder theme that holds back analytics, pixels, comments and your own scripts until visitors agree.
- Author: Michal Wlosik
- Tags: Guides, Privacy

If your Ghost site loads Google Analytics, a Meta Pixel or a comments widget, visitors from the EU and UK need to be asked before those scripts run. Ghost doesn't ship a cookie banner, so most sites paste one in from a third-party service, then discover the trackers fire anyway because nothing connects the banner to the scripts.

This guide shows how cookie consent works in an Ectobuilder theme: how to switch the banner on, what each setting does, and how it holds back analytics, ads, comments and your own scripts until a visitor says yes.

## How it works

The banner is part of your theme, not a separate service. That matters because the theme also adds your tracking tools, so it can load them in a waiting state:

- **Scripts wait.** Every optional script is written as `type="text/plain"` with a `data-ecto-consent` category. The browser doesn't run it. When the visitor allows that category, the banner turns it into a real script and it runs.
- **Categories.** Necessary cookies (signing in, Ghost's own member cookies) always work. Functional, Analytics and Marketing are optional, and you choose which ones the banner asks about.
- **The choice is remembered** in the visitor's browser. If you later add a category, everyone is asked again.
- **Google Consent Mode v2.** Turn it on and Google tags start with consent "denied", then update when the visitor chooses.

No extra script from a consent company, no monthly fee, and the banner uses your theme's fonts, colours and corners.

## Step 1: Switch on the banner

Open your theme in Ectobuilder, click **Settings**, then **Privacy**, and turn on **Cookie banner**. The rest of the settings appear below it.

![Ectobuilder Settings, Privacy tab: Cookie banner switched on, layout, corner and colour choices, title, message, privacy policy link and category switches](https://www.ectobuilder.com/content/images/2026/10/image-mv5f1z09.webp)

Settings → Privacy in Ectobuilder.

## Step 2: Choose how it looks

- **Layout:** *Box* is a card in a corner (left or right), *Bar* runs along the bottom of the page, and *Popup* sits in the middle with the page dimmed behind it.
- **Colours:** Light or Dark. Buttons use your theme's accent colour either way.
- **Title, message and privacy policy link:** write them in your own words. The link can be a page on your site, like `/privacy/`, or a full address. Leave it empty for no link.

![A cookie banner in the bottom-left corner of the Ectobuilder home page with Customize, Reject all and Accept all buttons](https://www.ectobuilder.com/content/images/2026/10/image-mv5f225b.webp)

The Box layout, bottom left, in the theme’s own colours.

## Step 3: Pick the categories

Only ask about what you use. Each category you switch on gets a checkbox when the visitor clicks **Customize**.

| Category   | What waits for it                                                                          |
| ---------- | ------------------------------------------------------------------------------------------ |
| Necessary  | Nothing. Always on: Ghost's sign-in and member cookies.                                    |
| Functional | Third-party comments (Hyvor Talk, Disqus and others) and any embed you mark as functional. |
| Analytics  | Google Analytics 4, Plausible, Fathom, Umami.                                              |
| Marketing  | The Meta Pixel and other ad or campaign tags.                                              |

![The cookie banner opened with Customize: checkboxes for Necessary, Functional, Analytics and Marketing, and Save choices, Reject all and Accept all buttons](https://www.ectobuilder.com/content/images/2026/10/image-mv5f24pk.webp)

What visitors see after clicking Customize.

Two more switches sit under the categories:

- **Reject all button.** Shows "Reject all" next to "Accept all". EU regulators expect rejecting to be as easy as accepting, so leave it on.
- **Google Consent Mode v2.** Turn it on if you use Google Analytics or Google Ads. Google tags then load with consent denied and are updated from the visitor's choice, which lets Google model some of the visits you can't measure.

[![CTA Image](https://www.ectobuilder.com/content/images/size/w256h256/2026/06/Ecto_builder_logo_sq_small.png)](https://editor.ectobuilder.com/login?mode=signup&plan=free&ref=ectobuilder.com) 

****A cookie banner that actually blocks the trackers.** Ectobuilder themes connect the banner to your analytics, pixels and comments, so nothing runs before visitors agree. Start free.

[Try it free ](https://editor.ectobuilder.com/login?mode=signup&plan=free&ref=ectobuilder.com) 

## Step 4: Add your analytics in the theme

The banner can only hold back scripts it knows about. The simplest way is to let the theme add them: open **Settings → Analytics**, switch on Google Analytics 4, Plausible, Fathom, Umami or the Meta Pixel, and paste the ID. With the banner on, each one is added in its waiting state and runs once the visitor allows Analytics (the Meta Pixel waits for Marketing).

If the same tool is also pasted into Ghost's code injection, Ectobuilder warns you. Remove the old snippet from Ghost Admin, or it runs for everyone and counts every visit twice. Our [guide to analytics on Ghost](https://www.ectobuilder.com/blog/ghost-analytics/) covers each tool.

## Step 5: Hold back your own scripts

For a tool Ectobuilder doesn't list, such as a chat widget, a heatmap or an ad tag, use **Other scripts** at the bottom of the Privacy tab. Paste the code the tool gave you, choose which category it waits for, and copy the result into **Ghost Admin → Settings → Code injection** in place of the original.

The change is small. A script like this:

```
<script src="https://example.com/widget.js"></script>
```

becomes:

```
<script type="text/plain" data-ecto-consent="functional" src="https://example.com/widget.js"></script>
```

You can make that edit by hand too. The category must be one the banner asks about, or the script never runs.

## Step 6: Let visitors change their mind

People should be able to change their choice later. Any link to `#cookies` reopens the banner with their current choices. In Ghost Admin, go to **Settings → Navigation → Secondary navigation**, add an item called *Cookie settings* and set its URL to `#cookies`. It shows in your footer.

## Step 7: Deploy and test

1. Click **Deploy** in Ectobuilder.
2. Open your site in a private window. The banner should appear.
3. Open the browser's developer tools, **Network** tab, and reload. You should see no requests to Google Analytics, Meta or your comments provider.
4. Click **Reject all** and browse a page: still nothing.
5. Click your *Cookie settings* link, choose **Accept all**, and the requests appear.

## Do you need a banner at all?

Not always. Ghost's own analytics, Plausible, Fathom and Umami set no cookies, and many sites using only those run without a banner. Once you add Google Analytics, the Meta Pixel or third-party comments, you need to ask first if you have visitors in the EU or UK. Rules differ by country and change over time, so check with your own adviser if you're unsure. This guide is not legal advice.

[![CTA Image](https://www.ectobuilder.com/content/images/size/w256h256/2026/06/Ecto_builder_logo_sq_small.png)](https://editor.ectobuilder.com/login?mode=signup&plan=free&ref=ectobuilder.com) 

****Build your Ghost theme without code.** Cookie consent, analytics, comments, SEO and redirects, all set from one Settings panel. Start free and only pay when you publish.

[Start building ](https://editor.ectobuilder.com/login?mode=signup&plan=free&ref=ectobuilder.com) 

## FAQ

#### Does Ghost have a built-in cookie banner?

No. Ghost leaves it to your theme or a third-party service. Ectobuilder themes include one you switch on in Settings → Privacy.

#### Will the banner block scripts I pasted into Ghost's code injection?

Only if they're marked with type="text/plain" and a data-ecto-consent category. Use Other scripts in the Privacy tab to convert them, or add the tool in Settings → Analytics instead.

#### Does it work with Google Consent Mode v2?

Yes. Switch it on in the Privacy tab. Google tags start with all consent types denied and are updated when the visitor chooses.

#### Where is the visitor's choice stored?

In their own browser (local storage). Nothing is sent to a consent service, and you don't need one.

#### Do comments work before visitors accept?

Third-party comments wait behind a short note with a Load comments button. Ghost's own native comments need no consent and always load.

Adding comments too? See [how to add comments to a Ghost site](https://www.ectobuilder.com/blog/ghost-comments/).