How to Add a CCPA Opt-Out to a Client Site

How to Add a CCPA Opt-Out to a Client Site

A CCPA opt-out needs three working parts: a Do Not Sell or Share link that opens a request form, a site that treats the browser’s Global Privacy Control signal as an opt-out, and a notice that the signal was processed. Install the ConsentLayer tag, which holds known trackers until the visitor consents, then add a California opt-out region group. GPC handling is on every plan, including Free, and the footer link and region groups need Solo or higher.

What the CCPA opt-out requires

Under the CCPA, a California visitor can tell your client’s business to stop selling or sharing their personal information. On a typical client site, the “sharing” is the retargeting pixel the client’s ad agency asked you to add, plus any other script that follows the visitor across sites for advertising. The request arrives as a clicked link or a browser signal, and the site has to accept both (the link and the signal compared).

Three working rules follow for whoever maintains the site:

  • Whoever handles requests, on your side or the client’s, acts on each one within 15 business days, so name that person before launch.
  • The site waits at least 12 months before it asks an opted-out visitor to opt back in, which rules out a banner that returns on the next visit.
  • A visitor submits the request without an account, so the form can’t sit behind the client’s customer login.

Since January 1, 2026, the CCPA regulations also require the site to show whether it processed the visitor’s opt-out preference signal, with sample wording such as “Opt-Out Request Preference Signal Honored”. From January 1, 2027, the California Opt Me Out Act requires browsers to be able to send that signal, so more visitors will arrive with it on. All of this is technical setup, and the client’s lawyer decides whether it’s legally sufficient.

The link visitors click

The link text is “Do Not Sell or Share My Personal Information”, or the shorter “Your Privacy Choices”. It goes in the footer of every page, including the homepage and any page that collects personal information, such as a contact form or a checkout. Clicking it has to open an interactive form where the visitor sends the request. A plain link to the privacy policy gives them nothing to act on.

The signal the browser sends

Global Privacy Control is the signal the California Privacy Protection Agency accepts. Some browsers and extensions send it by default, so a visitor can opt out without ever seeing your banner. Your site reads it from navigator.globalPrivacyControl, which is true when the signal is on, and it must honor that value as a valid opt-out of sale and sharing.

if (navigator.globalPrivacyControl === true) {
  // treat this visitor as opted out of sale and sharing
}

What you need before you start

Start with edit access to the client site’s <head>, whether that’s the theme code, the site builder’s head-code setting, or an agent that can deploy for you. Next, get a list of the ad pixels and other trackers on the site. Those are what sale or sharing means in practice. Ask the client’s marketing contact too, who often remembers a pixel that nobody on your team added.

On Studio and Agency, one pageview allowance covers every site in the organization, and a new client site draws from the pool you already pay for.

Add the CCPA opt-out step by step

1. Install the ConsentLayer tag on the client site

Ask your agent, with the domain of the site you’re setting up (your own or a client’s) in place of the placeholder:

"Set up ConsentLayer on <your-domain>"

What happens: your agent adds the site to your organization and returns the tag, which is one script tag for the site’s <head>. Paste it near the top, before the other scripts and without async or defer, because a tracker that loads first can fire before the banner holds it.

Without an agent: add the site in the ConsentLayer dashboard, copy the tag from its install screen, and paste it at the top of <head> in the same way.

2. Apply the California opt-out rule

With this region group, a California visitor sees no opt-in banner, and the site’s tracking runs until that visitor opts out. A region group changes behavior only for its own region, and EU visitors keep the opt-in banner. Region groups can target the EU/EEA and UK block, 65 countries, and 51 US states including DC.

"On <your-domain>, add a region group for California visitors with opt-out behavior, and keep opt-in for EU visitors"

In the dashboard, the same change is a new region group in the site’s geolocation settings, with California selected and the behavior set to opt-out. Leave the EU group as it is, since switching the whole site to opt-out would also drop the opt-in banner for EU visitors.

3. Keep Global Privacy Control switched on

The banner honors Global Privacy Control by default, and the only task here is to leave that setting as it is. When a visitor’s browser sends the signal, the banner doesn’t open. ConsentLayer records a reject with the Do Not Sell flag set, then shows a short notice.

That notice is how the site shows it processed the signal. Designers ask more than once to hide it with custom CSS for a cleaner page, and the answer is no.

4. Add the Do Not Sell or Share link to the footer

Put the link in the global footer template rather than on individual pages. A landing page someone builds next year inherits a template link, while a page-by-page link always misses one. You turn on Do Not Sell requests per site:

"Turn on Do Not Sell requests for <your-domain> and give me the footer link"

Without an agent, turn on Do Not Sell requests in the site’s settings in the dashboard and copy the link from the same screen. A visitor who clicks the link gets a form to send the request (handling Do Not Sell requests).

Each request waits in the site’s Do Not Sell request list until a person on your side or the client’s processes it, inside the 15 business days. Clients tend to assume the agency watches the request list, so write the name into the handover notes. Processing usually means removing the visitor’s email from any customer list the client uploads to an ad platform, and then closing the request:

"Show the open Do Not Sell requests for <your-domain>, then mark the one I name as processed"

Check that it works

Run this on the live domain, not a staging copy, after all four steps:

  1. Turn on Global Privacy Control in a browser that offers it, such as the setting in Firefox, or open the site in Brave.
  1. Load the client site as a California visitor would. From anywhere else, that means a VPN exit in California, because the region group decides by location.
  1. Confirm that the banner skips the prompt and shows a short notice.
  1. Open the consent log and find your visit. Each record holds the visitor ID, country, jurisdiction, categories, per-service decisions, GPC and Do Not Sell flags, consent version, anonymized IP, user agent, locale, template, geo group, and a link to a snapshot of the banner version you saw. The GPC and Do Not Sell flags should both be set, and the geo group should be the California region group.

A live log with no GPC visitors after launch doesn’t mean the setup failed. Why a test log can show no GPC visitors explains the usual causes.

Common problems and fixes

Ad pixels keep firing after a visitor opts out

The Marketing category holds the ad pixels. A pixel that the scan put in another category keeps firing after an opt-out. When a visitor withdraws a category from the preferences modal, that category’s cookies are deleted and the change is recorded in the consent log. That only stops the pixel if it sits in that category.

California visitors get the EU opt-in banner

Each site can use opt-in, which is the default, or opt-out, and without region groups that one setting applies to every visitor. A site left on the default therefore shows its opt-in banner to California as well. The fix is the California region group from step 2.

CCPA opt-out FAQ

Does a visitor have to prove who they are to opt out?

No, ConsentLayer runs no identity check on Do Not Sell requests. Keep it that way if you build a custom form on top, and don’t add an email confirmation that the visitor must pass before the request counts.

How long does an opt-out last before you can ask again?

ConsentLayer keeps a consent decision for 365 days by default, so the banner stays away from that visitor for the full year the law makes you wait. Leave that default alone on California sites: a shorter lifetime would bring the banner back too early.

How long should you keep opt-out requests?

On Solo and up, Do Not Sell requests delete themselves after 24, 36, 48, or 60 months, and you choose the period per site. Pick 24 months unless the client’s lawyer asks for longer. The shortest archive holds the least personal data to protect.

Does a CCPA opt-out change the Google Consent Mode signals?

It does when Marketing is rejected, and Google tags then receive ad_storage, ad_user_data, and ad_personalization as denied, since ConsentLayer maps Marketing to all three. Statistics maps to analytics_storage and Essential to functionality and security storage, so analytics changes only when Statistics is rejected too.

Roll the opt-out to the next site

On the next client site, the whole setup is one prompt to the AI you already use. Replace the placeholder with the domain of the site you’re setting up, your own or a client’s:

"Set up ConsentLayer on <your-domain>, add a California opt-out region group, keep opt-in for EU visitors, turn on Do Not Sell requests, and give me the footer link"

Once the tag is live and the link sits in the footer template, repeat the GPC visit from a California VPN exit and find its record in the consent log before you hand the site over. Keep that record for the client as proof that the live site honored the signal.

Set up the California opt-out on your next client site with the ConsentLayer quick start.