CCPA compliance for website tracking: pixels, GA4 and opt-outs
Under the CCPA and CPRA, ad pixels can count as selling or sharing data. Here is what the opt-out has to do and how tags in Google Tag Manager should react to it.

CCPA compliance for website tracking means one thing above all: if your pixels and tags sell or share personal information, California visitors must be able to opt out, and your tags must actually stop when they do. The California Consumer Privacy Act (CCPA), amended by the California Privacy Rights Act (CPRA), treats cookie IDs, IP addresses and browsing behavior as personal information, so ordinary marketing tags are inside its scope.
This guide explains which tracking counts as selling or sharing, what the opt-out link and the Global Privacy Control signal require, and how to set up Google Tag Manager so the rules are followed in the browser and not only in the privacy policy. This article is not legal advice.
Who has to follow the CCPA?
The CCPA applies to for-profit businesses that do business in California and meet at least one of three thresholds. The first is annual gross revenue above a set amount, originally 25 million US dollars and adjusted for inflation since then. The second is buying, selling or sharing the personal information of 100,000 or more California residents or households. The third is earning 50 percent or more of annual revenue from selling or sharing personal information.
Where your company is located does not matter. An online shop in Texas or Ontario with many California customers can be covered. Nonprofits and government agencies are generally outside the law. The California Attorney General and the California Privacy Protection Agency (CPPA) both enforce it, and the CPPA writes the detailed regulations.
When does tracking count as selling or sharing?
Tracking counts as selling when personal information goes to another company for money or other valuable consideration, and as sharing when it goes to a third party for cross-context behavioral advertising. The CPRA added the term sharing, which took effect on January 1, 2023, precisely to cover targeted advertising, even when no money changes hands.
In practice this covers most advertising tags. The Meta Pixel, the TikTok Pixel, the LinkedIn Insight Tag and Google Ads remarketing send cookie IDs and page activity to platforms that use them to target ads across other sites and apps. Pure measurement of your own site is different: if Google Analytics 4 (GA4) runs without advertising features, and the provider only processes data on your behalf under a contract, that relationship is easier to classify as a service provider. The line depends on contracts and settings, so document both.
- Usually selling or sharing: retargeting pixels, audience building, conversion tags that feed ad personalization
- Depends on settings: GA4 with Google Signals or linked Google Ads accounts, Meta Conversions API
- Usually not: server logs and analytics used only for your own reporting, under a service provider contract
- Always sensitive: precise location, health information and other sensitive categories have their own rules
→ Cookie banner with Consent Mode v2: compliant, with no monthly license
What the opt-out has to do in practice
A business that sells or shares personal information must give visitors a clear way to opt out, usually a link titled “Do Not Sell or Share My Personal Information” in the footer, or an alternative link that the regulations allow. Visitors must not need an account to use it. After an opt-out, the business generally has to wait at least 12 months before asking the person to opt back in.
The opt-out has to work on the page, not only on paper. If a visitor opts out and the Meta Pixel keeps firing on the next page view, the link is decoration. Equally important: the regulations treat a browser opt-out preference signal such as the Global Privacy Control (GPC) as a valid opt-out request, so a visitor with GPC turned on must be treated as opted out without clicking anything.
| Requirement | What it means in Google Tag Manager |
|---|---|
| Opt-out link | A click sets a stored opt-out state that every marketing tag checks |
| Global Privacy Control | The GPC signal sets the same opt-out state automatically |
| Notice at collection | Banner or notice is visible before or when tags start collecting |
| Limit sensitive data | Avoid marketing tags on pages that reveal health or other sensitive information |
| Minors under 16 | No selling or sharing without opt-in consent |
How to set up Google Tag Manager for CCPA opt-outs
Google Tag Manager handles CCPA opt-outs best through Google Consent Mode, the same mechanism used for European consent. For visitors in California you set a consent default with the region parameter, for example US-CA, where ad_storage, ad_user_data and ad_personalization start as granted because the law works on an opt-out basis. When the visitor opts out or sends a GPC signal, you update those three values to denied.
Google tags respect the consent state directly. For other tags, the trigger must check the same state. The Meta Pixel has its own Limited Data Use option for US privacy laws, and Google Ads offers restricted data processing. Use these options in addition to blocking, because they tell the platform how to handle data that was already collected. Keep the opt-out in a first-party cookie or local storage so it applies on every page and on later visits.
→ Setting up Google Consent Mode v2 correctly: no warning in Tag Assistant
How to test whether your opt-out really works
Testing an opt-out takes ten minutes and finds most problems. Open your site in a fresh browser profile, click the opt-out link and watch the network tab of the developer tools while you visit two or three more pages. No request should go to Meta, TikTok, LinkedIn or Google Ads remarketing endpoints after the opt-out. Then repeat the test with a browser that sends GPC, such as Brave, or Firefox with the setting turned on.
A typical failure looks like this: a small online shop in San Diego added a footer link that opens a form, the form emails the request to the owner, and nothing changes in the browser. The pixel keeps firing for weeks. Another frequent error is a consent tool that only blocks tags it knows about, while a pixel hard-coded in the theme or added by a shop app keeps running outside Google Tag Manager.
Privacy policy and documentation
The privacy policy must describe the categories of personal information you collect, the purposes, whether you sell or share it, and how visitors can exercise their rights, including the opt-out link. Keep it consistent with what your tags actually do. A list of every tag on the site, its purpose and whether it counts as selling or sharing makes this much easier and helps when the CPPA or a customer asks questions.
Check your site before you change anything
Before you rebuild your setup, look at what really loads. The free Trackum check at trackum.app/check opens your homepage three times in a real browser, with the banner unanswered, rejected and accepted, plus two subpages, and shows which tags and cookies load in each state. It takes about two minutes and needs no sign-up. If you want the fixes done, Trackum sets up Google Tag Manager, GA4 and Consent Mode v2 for a fixed €150 one-time, tested with and without consent, or repairs the findings of the check in your existing container for €79. Prices plus VAT.
Frequently asked questions
Do I need a cookie banner for CCPA compliance?
The CCPA works on an opt-out model, so it does not require an opt-in banner before every cookie the way European law does. You do need a clear opt-out link, a notice at collection and a privacy policy. Many businesses still use a banner because it is a practical place to show the opt-out and to serve visitors from other states and countries.
Does Google Analytics 4 count as selling or sharing under the CCPA?
It depends on the configuration. Analytics used only to measure your own site, with advertising features and data sharing for ads turned off, is easier to treat as a service provider relationship. Once Google Signals, remarketing or ad personalization are active, the data can feed cross-context behavioral advertising and the opt-out should apply.
What happens if a visitor opts out after the pixels already fired?
The opt-out applies from that moment on: marketing tags must stop sending data for that browser and must stay off on later visits. Earlier data is handled through your normal request process, for example a deletion request. Store the opt-out so it survives page loads and new sessions.
Does the CCPA apply to a small business outside California?
Location does not decide it. A for-profit business that does business in California and meets at least one threshold, such as the revenue threshold or buying, selling or sharing the personal information of 100,000 or more California consumers or households, is covered. Many small businesses fall below these thresholds, but businesses that rely heavily on ad tracking should check carefully.
Sources
- California Attorney General: California Consumer Privacy Act (CCPA) oag.ca.gov
- California Privacy Protection Agency: CCPA regulations cppa.ca.gov
- Google for Developers: Set up consent mode on websites developers.google.com
- Global Privacy Control globalprivacycontrol.org
Read more
FeaturesCookie banner with Consent Mode v2: compliant, with no monthly license
Reject on the first layer, settings per purpose, Consent Mode v2 with every consent type and a record of each choice. No monthly license.
FeaturesSetting up Google Consent Mode v2 correctly: no warning in Tag Assistant
The most common warning in Tag Assistant says a tag read consent before a default was set. How to avoid it, and what else matters.
FeaturesMarketing dashboard with GA4 and Google Ads: every number on one page
Visitors, leads, orders, ad spend and ROAS per campaign on one page, compared with the previous period. One link, nothing to set up.
FeaturesRevenue from your CRM, shop and ERP in one dashboard: HubSpot, Shopify, Odoo and more
Google Analytics only sees what happens on the website. Orders by phone or email are missing. With a data connection, the real revenue from your system appears in the dashboard.
FeaturesWebsite leads with their source in your CRM: HubSpot, Pipedrive, Brevo, Salesforce or webhook
Where did the lead come from? The CRM handover writes source, campaign and click ID into the CRM with every inquiry, without a form plugin.
FeaturesOffline conversions: report sales from your CRM to Google Ads and Meta
Google Ads and Meta learn from what you report to them. If they only get form fills, they optimize for form fills. With offline conversions, they optimize for sales.