senternet-site-ccpa

Implements a California-only CCPA opt-out cookie banner that gates Google Analytics tracking.

Updated May 8, 2026
One-click install
npx skills add https://github.com/MattSenter/senternet-site-skills --skill senternet-site-ccpa-mattsenter
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: senternet-site-ccpa
Source: https://github.com/MattSenter/senternet-site-skills/tree/main/.claude/skills/senternet-site-ccpa
Command: npx skills add https://github.com/MattSenter/senternet-site-skills --skill senternet-site-ccpa-mattsenter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Marketing and product sites serving California visitors need a compliant way to let users opt out of analytics tracking, but most consent implementations either treat all US traffic as CCPA or fail to actually stop tracking after rejection. This Skill adds a geo-scoped CCPA opt-out toaster that detects California visitors and genuinely disables Google Analytics when they reject. ## Core Features & Use Cases - California geo detection: Resolves country and region from CDN/hosting headers plus a server-side IP geo fallback, requiring US country and CA region before showing the banner. - Opt-out consent model: Analytics may load before the visitor chooses, but Reject sets the ga-disable flag, removes gtag, and clears _ga cookies so tracking actually stops. - Shared regime system: Stores a single consent state (gdpr, ccpa, or none) in localStorage so it pairs cleanly with a GDPR opt-in banner instead of stacking two unrelated notices. - Use Case: After wiring Google Analytics into a Next.js or Vite marketing site, run this Skill to add a footer toaster that only California visitors see, letting them reject analytics cookies while sign-in and security storage keep working. ## Quick Start Ask the AI to add a California-only CCPA analytics opt-out banner to the site, wired into the existing Google Analytics setup and shared consent storage.

Frequently Asked Questions about senternet-site-ccpa

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a CCPA cookie opt-out banner to my website?▼

Add a footer toaster that only appears for California visitors, offering Allow all and Reject unnecessary choices. Analytics may load until the visitor rejects, at which point you set the ga-disable flag, remove gtag, and clear _ga cookies.

How to detect California visitors for CCPA compliance?▼

Read country and region headers from your CDN or hosting platform, such as x-vercel-ip-country-region or cloudfront-viewer-country-region. If the country is US without a region, call a server-side IP geo endpoint that returns state, since country-only lookups cannot identify California.

What is the difference between GDPR and CCPA cookie consent?▼

GDPR is opt-in: analytics must stay off until the visitor accepts, and it applies to EEA and UK traffic. CCPA is opt-out: analytics may load by default for California visitors but must stop and clear cookies when they reject.

Does rejecting cookies actually stop Google Analytics tracking?▼

Only if you explicitly disable it. Set window['ga-disable-' + gaId] to true, send a consent update denying analytics_storage, delete window.gtag, and expire the _ga, _gid, and related cookies, since unmounting a component alone leaves tracking active.

Should CCPA consent block Firebase auth or reCAPTCHA?▼

No. The CCPA banner gates only analytics cookies. Sign-in sessions, anonymous Firebase auth, and security storage like reCAPTCHA must keep working after a visitor rejects analytics tracking.