Tax & compliance
GDPR & Cookie Consent Management
Indicative price, not an offer: $19-49/mo
Generated from docs/plan/paid/gdpr-cookie-consent-management/PLAN.md in the AstroBaaS repository. Nothing described below is implemented — it is the written plan for it.
Paid module (EUR 19–49/mo) that provides a compliant GDPR cookie banner, blocks tracking pixels until consent is given, manages consent per category (analytics, marketing, functional), integrates with Google Consent Mode v2, and stores consent records per visitor. Merchants face EUR 20M+ fines if they track users without explicit consent.
The problem
I need a cookie banner that blocks tracking pixels until consent is given. GDPR fines are EUR 20M+ and can destroy the business. I have no idea which third-party scripts are tracking; I do not know how to classify cookies into categories (analytics, marketing, etc.); I have no proof of consent if regulators audit.
What it does
- Cookie banner template (customizable): lists cookie categories, consent buttons (‘Accept All’, ‘Reject All’, ‘Manage Preferences’), and privacy policy link
- Blocks tracking pixels and third-party scripts until consent is given (uses gtag/dataLayer for Google, Facebook pixel, etc.)
- Google Consent Mode v2 integration: signals Google Analytics/Ads when user grants or denies consent; Google adapts tracking (no data loss, compliant measurement)
- Cookie categories: Analytics (Google Analytics, Plausible, Matomo), Marketing (Facebook, TikTok, LinkedIn), Functional (required for the site), Preferences (not required; optional personalization)
- Consent is stored per visitor in browser localStorage + server-side (optional, with persistent ID) for proof
- Banner shows once (on first visit); clicking ‘Manage Preferences’ allows re-prompt; consent is persistent until cookie is cleared
- Admin dashboard shows consent aggregates (% who consented to each category) and audit log (visit date, consent grant, categories accepted)
- Settings to customize banner text, button colors, cookie policy link, and duration before banner re-prompts
What it deliberately does NOT do
Each boundary carries its reason. A boundary without a reason gets crossed by the next person who reads this.
- No automatic cookie scan/classification — merchant must list which cookies/scripts are used and categorize them (reason: only the merchant knows their ecosystem; auto-scan has too many false positives and negatives)
- No consent withdrawal workflow — user must clear cookies or re-visit and click ‘Reject’ (reason: true withdrawal requires email confirmation or CRM sync, which is a separate project)
- No legal template generation — merchant must write their own privacy policy (reason: privacy policies are legal documents, not API outputs; AstroBaaS does not provide legal advice)
Data model
Settings: cookie_banner_enabled (boolean), cookie_categories (array of {name, label, description, required}), cookie_banner_text (string), cookie_privacy_link (URL). New ConsentLog entity: {visitor_id, timestamp, consents_granted (array), consents_denied (array), ip_address}. localStorage key: ‘astrobaas_consent_state’ (JSON).
API
- POST /api/consent/record { categories: {analytics: boolean, marketing: boolean, functional: boolean, preferences: boolean} } → { visitor_id, recorded_at }
- GET /api/consent/status?visitor_id=xyz → { consents_granted, consents_denied, recorded_at, expired }
- GET /api/consent/aggregates (admin only) → { category: {consent_rate: 0.75, total_visitors: 1000} }
- GET /api/consent/audit-log (admin only, paginated)
Every route added here must also appear in src/pages/openapi.json.ts — a test
fails the build if it does not.
Admin
Dashboard → Consent: shows pie charts (% consenting to each category), trend (% over time), and audit log. Settings → Privacy → Cookie Banner: enable/disable, customize text/colors, list cookie categories, set re-prompt interval (default 30 days). Preview button shows banner styling. Customer can view their own consent history if visitor_id is available.
The seam — why this is paid
Paid module owns banner UI, consent storage, and Google Consent Mode integration. Core owns privacy settings and audit logging. Merchant owns privacy policy and cookie classification (tells the module which cookies are in which category).
Paid module owns geo-location detection, consent storage, cookie category classification, and Google Consent Mode v2 API integration; compliance liability = commercial
Dependencies
- Privacy settings (core or paid module)
- Google Consent Mode v2 (external JavaScript API)
- Third-party pixel integration (merchant’s script tags)
- localStorage (browser)
Acceptance checks
Each of these must be able to fail. Before claiming this is done, break the code deliberately and watch each one go red.
- Visiting the site shows a cookie banner if consent_banner_enabled=true and no prior consent is recorded
- Clicking ‘Accept All’ records {analytics: true, marketing: true, functional: true, preferences: true} and hides the banner
- Clicking ‘Reject All’ records {analytics: false, marketing: false, functional: true, preferences: false} and hides the banner
- Closing the banner (X button) is treated as ‘Reject All’ per GDPR (no forced consent)
- Google Analytics tag fires only if analytics: true in recorded consent; dataLayer signals Google with consent state
- Admin sees consent aggregates: ‘Analytics: 65% consented’ based on ConsentLog entries
- Same visitor returns 30 days later; banner re-appears because consent is expired (configurable per Settings)
- Admin can customize banner text, button color, and privacy link; changes appear on the next page load
Risks
Google Consent Mode v2 requires a Google Analytics 4 tag; if the merchant does not have GA4, the integration does nothing. Third-party pixels (Facebook, TikTok) need separate consent handling; module only covers Google/analytics. Consent expiry is browser-local; if user clears cookies, they will re-see the banner forever (acceptable, but annoying). Merchant does not update privacy policy; users see ‘Accept’ but have no legal document to reference.
Commercial context
| Suggested price | $19-49/mo |
| Rival anchor | 7 apps (Consentmo, Pandectes, Avada, Complianz, etc.); all freemium with paid $15-99/mo for advanced compliance |
The anchor is what the nearest equivalent charges on Shopify or Magento today. It is context for a pricing decision, not the decision.
Generated from the commerce plan. See docs/COMMERCE-PLAN.md for the full
catalogue and ../../AI-GUIDE.md for how to work on this repository.