# Cookie Consent

A cookie consent banner that matches your site, plus the switch every other site app obeys: nothing that needs consent is stored until the visitor allows it. Ask everywhere or only in the EU/UK/Switzerland, keep proof of consent, show a cookie table built from your apps, and connect your own banner or consent tool.

**Beta.** Cookie Consent is in beta: it works, but things may still break. Tell us if something does: open an issue at https://github.com/sundoggs/support/issues/new.

Category: [Consent and privacy](/categories/consent-and-privacy.md)

## Requirements (tell the site owner before buying)

- Cloudflare plan: Cloudflare free plan
- Works on: Cloudflare Workers, Cloudflare Pages
- Version: 0.6.2 (needs site layer 0.22.0 or later; it comes in the same download)
- Runs on the Cloudflare free plan, in the same D1 database as your other site apps. No third-party script, no outside requests, no account elsewhere.
- Once installed, visitors in the EU, EEA, UK and Switzerland see a cookie banner and tags that need consent wait for their answer. Everyone else sees no banner and every app and tag works as before. Change who is asked in Settings, When to ask.
- Consent records are stored in your D1 database: a random id, the choices, the policy version, the time and the visitor's country. No IP address, no browser details. One small write per choice made (not per page view).
- The banner is added to pages as they are served, so page views run through the site apps (as with link tagging and forms). It is not legal advice: whether and where you must ask depends on your site and your visitors.
- Cost per visit: no writes on a page view; one small write each time a visitor makes a choice, and an old-records cleanup at most every 6 hours. Consent choices are always saved (not part of the logging budget); if the Cloudflare free database limit is reached, new choices cannot be recorded until midnight UTC.

## Works with

Cloudflare Workers, Cloudflare Pages, Astro, Next.js (with OpenNext), Vite, Hugo, Plain HTML sites, Vanilla JavaScript, Cookiebot, OneTrust, CookieYes, Termly, Google Consent Mode.

## Works with your other apps

Connects with no setup, in any install order: [Analytics](/apps/analytics.md), [Tag Manager](/apps/tags.md), [Popups](/apps/popups.md).

## Price

Free

## What's new in 0.6.2

- Marked as beta: it works, but things may still break. The admin shows where to report a problem.

## Included

- Site admin dashboard (installed with your first app, no extra cost)
- Updates for as long as the app is free (you keep it if that ever changes)
- An agent skill and install guide
- Free License: any number of sites

## Install

Free on every site. The site owner signs in (the client opens the browser), or you send an API key. Then call the MCP tool `get_download` for the site's domain with `apps: ["consent"]`: it claims the app first if the account doesn't own it (or claim it on its own with `claim_free_app`) and gives the files.

The prompt the app page gives the owner to paste into their agent:

```
Install the Cookie Consent app (id: consent) from the Sundogs site apps store on this site.
First read https://sundo.gs/apps/consent.md and tell me what it needs and what it costs.
It's free: get_download claims it for me if I don't have it yet.
Then download it with get_download for this site's domain. Follow the install guide (site-apps/INSTALL.md in the download, also at https://sundo.gs/install-guide.md).
Check it with the install guide's step 6 (the public status, then the self-test once you can sign in to the admin) and tell me what's next.
(Not connected to the store yet? See https://sundo.gs/agents.)
```

## Related playbooks

- [How to vibecode an affiliate site on Next.js (and host it free on Cloudflare)](/playbooks/vibecode-affiliate-site-nextjs.md): Build a whole affiliate site with an AI coding agent, start to finish: pick a niche you can win, plan the pages that earn (best-of lists, comparisons, reviews), set up Next.js as a static export, write content Google rewards, get the SEO basics right, deploy on the Cloudflare free plan, then monetise with affiliate links and an email list, and measure which pages make money. With prompts you can give your agent at each step.
