CookieSteward: consent management that stays out of the way.
A cookie banner that blocks trackers until you consent, then scans the site to prove it did. It handles GDPR, California rules and HIPAA healthcare sites.
- RoleProduct, architecture, design and engineering. Built alone.
- StatusAlpha, hosted, with the edge in production
- StackTypeScript, Next.js, Drizzle, Zod, Playwright, Hono
- PlatformCloudflare Workers, KV, D1 and Queues for the edge; a hosted Next.js dashboard
- TestsBanner tests in real Chromium, Firefox and WebKit, plus scan, full-stack and unit suites
What it is
CookieSteward is a hosted consent manager for agencies and site owners. One script tag goes first in the head. Cloudflare's edge serves a small banner that blocks third-party scripts and iframes until the visitor consents, applies opt-in or opt-out depending on where the visitor is, sets Google Consent Mode v2 before any Google tag loads, and writes a receipt for every choice.
Most consent tools show a banner and hope. This one scans the site afterward, with and without consent, and reports whether the blocking held.
HIPAA mode for healthcare sites
In December 2022 the HHS Office for Civil Rights published guidance on tracking technologies on healthcare websites, naming Google Analytics and the Meta Pixel. Under HIPAA, a visitor clicking Accept all is not the authorisation the rules ask for. So HIPAA mode does not ask. It blocks.
Switched on per site, it compiles a curated and growing ruleset of tracking vendors into hard-block rules on every publish: ad platforms such as Google Ads, Meta, TikTok, Microsoft and LinkedIn; session-replay tools such as Hotjar, Clarity and FullStory; social widgets; and Google Analytics. No consent path can release them, which is covered by a browser test. The post-publish scan fails if any of those hosts fires anyway, and regression alerts label the hit as a health-data risk.
Receipts for HIPAA-mode sites never compute an IP hash, because a salted hash of an IP is still linkable. Every classified cookie also carries a HIPAA risk rating, and the banner editor lists trackers seen on the site that are rated high risk and not yet covered. A Business Associate Agreement is available as an add-on. The product is clear about limits: it does not make an organisation HIPAA compliant, it does not detect health information, and server-side integrations are outside its reach.
Consent that matches the visitor's law
- Opt-in for the EU, EEA, UK, Switzerland and unknown locations; opt-out for the United States, applying the California model to every state
- Global Privacy Control honoured from the browser signal or the Sec-GPC header, with an automatic opt-out receipt for US visitors
- A persistent Your Privacy Choices link with the official California icon, and an opt-out that stays sticky across config versions
- Four categories, Accept all and Reject all with equal prominence enforced at publish, a preferences layer with per-category toggles and a cookie declaration table rebuilt from the site's classified cookies
- Re-consent when the configuration changes or consent expires, a withdraw action, and a reopen widget
- Blocked-embed placeholders that name the provider, for YouTube, Vimeo, Google Maps, Calendly, HubSpot and others, sized to the embed so accepting does not shift the page
A scanner that checks its own work
After every publish, on demand, and on a schedule, a real browser loads a representative sample of pages chosen from the sitemap: the homepage, one page per URL pattern, then pages that look like checkout, booking, contact, login or donate. With the banner installed it runs two passes, before and after consent, and reports per rule whether blocking held and which third parties received data before consent.
- Cookies, local storage and third-party requests collected with attribution to the script that set them; raw values never stored
- Leak detection that watches outbound requests for email addresses, page URLs, device fingerprints, forwarded cookie values and an ever-growing library of advertising and analytics identifiers
- Classification against a large, maintained pattern library and a curated vendor map; unknown cookies get an AI investigation using the customer's own key, wrapped against prompt injection, and a person approves the verdict, which then applies fleet-wide
- An install check that confirms the script is present and mounted, loads before Google Tag Manager, and sets the Consent Mode default before any Google tag reads it
- A diff against the previous scan, screenshots per page, and regression emails when something got worse
Signals and integrations
- Google Consent Mode v2 default fired synchronously at boot before Google Tag Manager, mapped across ad_storage, ad_user_data, ad_personalization, analytics_storage and functionality_storage, with ads data redaction while advertising is denied
- A Google Tag Manager bridge with dataLayer events for initialised, given, updated and loaded consent, each carrying per-category booleans
- A window.CMP API and events for single-page apps, and a CookieFirst compatibility shim for migrations
- A WordPress plugin with three placement methods and a check that warns if a Google, Meta, Clarity or Hotjar tag loads before the script
Records you can hand to an auditor
- One receipt per choice: visitor id, regime, action, categories, config version, GPC flag, country, browser family and timestamp; no page URL
- Written through a queue with retries, so a receipt is kept even when something downstream fails
- The config version maps to the exact published banner configuration, including compiled HIPAA rules, so you can show what the visitor was served
- Per-visitor lookup, daily statistics by regime and action, and streamed CSV export per site and date range, formula-safe, available to client-role users
- Multi-year retention enforced automatically, with deletion on request
Performance and delivery
- A zero-dependency runtime in vanilla TypeScript, small enough to ignore in a performance budget, with a size limit enforced in CI
- A single-request embed: the edge returns the visitor's regime, GPC state and the site configuration together with the runtime in one cached response
- Everything renders in a shadow DOM as fixed overlays, so the page does not move; theme presets, several layouts and custom CSS
- Dialog roles, focus management, a Tab trap in the preferences layer, a polite live region, reduced-motion support and touch-sized targets
How it is built
- The edge runs on Cloudflare Workers with KV for configuration, D1 for receipts and Queues for writes; Zod schemas are shared between the dashboard and the edge
- The dashboard is Next.js with each workspace isolated in its own database, roles for owner, admin, staff and read-only client, passwordless and OAuth sign-in, and AI keys encrypted at rest
- Workspaces, sites and clients as the tenancy model; Stripe for annual billing with grace, frozen and stopped states
- Playwright drives the banner tests across Chromium, Firefox and WebKit against a fixture site with real trackers, and the same engine powers the scanner