Beyond California, the US state privacy laws share a common pattern: visitors can opt out of the sale of their personal data, of targeted advertising and of certain kinds of profiling, and an increasing number of states mandate that you honour a browser privacy signal as that opt-out. Sensitive data is handled differently, because most of these states require opt-in consent before you can process it.
A Shopify store selling across the US meets the state privacy laws in two places: the advertising pixels in the theme and apps, and Shopify's own data sharing through the Customer Privacy API. A single opt-out has to reach both.
| Requirement | What the law expects |
|---|---|
| Opt-out rights | Give visitors a way to opt out of the sale of personal data, targeted advertising and certain profiling, through the banner or a persistent link |
| Universal opt-out signals | A growing number of states require you to honour a browser signal such as Global Privacy Control as an opt-out; the list expands as new laws take effect |
| Sensitive data | Most of these states require opt-in consent before processing sensitive data. Maryland goes further: strictly necessary use only, with no sale of sensitive data permitted |
| Minors | Targeted advertising or sale involving known minors requires opt-in consent, and some states prohibit it entirely. Age bands vary by state |
| Request channels | Provide a privacy notice and a mechanism for access, deletion, correction and portability requests where the state grants those rights |
How CookieBeam's US Opt-Out States preset handles it
CookieBeam provides a regional preset designed for visitors from US states with privacy laws. Applying it generates an editable rule that ships with the following starting values.
Of the states the preset covers, the laws of Colorado, Connecticut, Delaware, Maryland, Minnesota, Montana, New Hampshire, New Jersey, Oregon and Texas require you to honor a universal opt-out signal such as Global Privacy Control. The preset honors it in every state it covers, which is the simpler rule to run.
| Setting | CookieBeam preset |
|---|---|
| Who it matches | Visitors in 18 states (Colorado, Connecticut, Delaware, Iowa, Indiana, Kentucky, Maryland, Minnesota, Montana, Nebraska, New Hampshire, New Jersey, Oregon, Rhode Island, Tennessee, Texas, Utah and Virginia) |
| Banner mode | Opt-out: tags run from the first page view until the visitor opts out |
| Buttons | "Accept Cookies" and "Reject All" on the first layer, plus "Your Opt-Out Rights", which opens the US opt-out panel |
| Persistent opt-out link | Off when the rule is created; turn on the rule's Do-Not-Sell link option to keep "Your Opt-Out Rights" available after the first choice |
| Google Consent Mode defaults | All storage types start granted until the visitor opts out |
| Global Privacy Control | Honored automatically as an opt-out, with no click needed; it cannot be switched off for visitors this preset matches |
| Stored choice | Expires after 365 days, then the visitor is asked again |
Where Shopify sites leak data
- Shopify's own tracking. Shopify analytics and apps that check consent via the Customer Privacy API only learn a visitor's choice when something passes it along. CookieBeam's Shopify bridge calls
setTrackingConsentwhenever the API is available on the page, sending analytics, marketing, preferences andsale_of_data. The app embed also loads the API so it is available earlier. - Pixels added in theme code or by apps. A tracking pixel dropped straight into
theme.liquidruns at page render unless you mark it as inert so CookieBeam can activate it later. Pixels that come from installed apps need individual verification. - Checkout. Theme code and theme app embeds don't run on checkout pages, which means the banner won't show there. The choice the shopper made on the storefront is stored by the Customer Privacy API and carries through to checkout.
One opt-out, two audiences
CookieBeam's Shopify bridge writes sale_of_data from the ad-user-data signal, so an opt-out of sale and targeted advertising reaches Shopify whether you use the app embed or theme code. The app embed loads the Customer Privacy API early, giving Shopify the signal sooner. Verify with currentVisitorConsent() after opting out.
Set up CookieBeam on Shopify for the US state privacy laws
Publish your banner first
Build the banner in CookieBeam, set up its consent categories, and publish it to production so the loader script has a live configuration to serve. See the quickstart.
Add the store's domains to the banner
In CookieBeam, add both the *.myshopify.com domain and any custom domain to the banner.
Load the banner on every storefront page
Using the CookieBeam app: navigate to Online Store › Themes › Customize › App embeds, enable CookieBeam consent banner, enter the banner ID and save. The app isn't in the Shopify App Store yet. Without it, paste the production loader as the first script in <head> of layout/theme.liquid. Do not add async or defer.
Turn off Shopify's own cookie banner
In Shopify admin, go to Settings › Customer privacy and disable the built-in banner so visitors see a single prompt instead of two competing ones.
Apply the US Opt-Out States preset
On the banner's Regional settings page, add a rule from the US Opt-Out States framework preset. It matches visitors in 18 states (Colorado, Connecticut, Delaware, Iowa, Indiana, Kentucky, Maryland, Minnesota, Montana, Nebraska, New Hampshire, New Jersey, Oregon, Rhode Island, Tennessee, Texas, Utah and Virginia) with an opt-out banner: tags run from the first page view until the visitor opts out. Its preferences button reads "Your Opt-Out Rights" and opens the US opt-out panel. Turn on the rule's Do-Not-Sell link option so a persistent link stays available after the first choice. Add the CCPA/CPRA preset too for California visitors. See regional rules.
Mark the tags that sell or share
Advertising pixels and data-sharing tags belong in the marketing category. Scripts that appear in your reviewed scan inventory are managed by CookieBeam once you turn on blocking; scripts hard-coded in the page need inert markup (type="text/plain" with a data-category attribute) so CookieBeam can control them. See script blocking. In opt-out mode these tags run by default and are deactivated once the visitor opts out.
Save, publish and test
Click Save Settings, then Publish in the banner header. Changes to rules only take effect for visitors after you publish. Full install instructions: Shopify install docs.
<!-- layout/theme.liquid: first script in <head> -->
<script
id="CookieBeam"
src="https://cdn.cookiebeam.com/banner/PUBLIC_BANNER_ID/default/loader.js"
type="text/javascript"
data-cfasync="false" data-no-optimize="1" data-no-defer="1"
data-no-minify="1" data-noptimize="1" nowprocket data-pagespeed-no-defer
></script>Test your Shopify store like a visitor from a US privacy-law state
- Open the site in a fresh browser profile from one of the covered states, or with a geo-simulated preview, and confirm the opt-out banner appears.
- Open the opt-out choices, opt out of sale and targeted advertising, reload the page and check the Network tab: advertising pixels should no longer be loading.
- In a GPC-enabled browser, load the site fresh and verify that advertising tags never fire without any click required.
- Confirm the persistent opt-out link is still accessible after the visitor has made their first choice.
- Run
window.Shopify.customerPrivacy.currentVisitorConsent()in the browser console after each consent choice and confirm that the returned flags match what you selected.
The cookie banner QA checklist walks through additional checks.
Frequently Asked Questions
Is opting out of sale different from opting out of targeted advertising?
Yes. The state laws treat them as separate rights, and the US opt-out panel presents them as separate choices. A shopper can opt out of one without the other, so test both paths.
Can I keep Shopify's built-in cookie banner alongside CookieBeam?
Turn it off. Two banners means two prompts that can return conflicting answers. CookieBeam relays the choice to Shopify through the Customer Privacy API, so Shopify's own tracking still follows the visitor's decision.
Does the banner appear at checkout?
No. Theme code doesn't run on Shopify's checkout pages. The choice the shopper made on the storefront is stored by Shopify's Customer Privacy API and carries through to checkout automatically.
Do the US state privacy laws require a cookie banner?
Not an opt-in banner for ordinary cookies. They require an opt-out covering sale, targeted advertising and profiling, and several states also mandate automatic handling of Global Privacy Control. Sensitive data is a separate matter: most of these states require opt-in consent before you process it.
Which states does the US opt-out preset cover?
The US Opt-Out States preset matches 18 states: Colorado, Connecticut, Delaware, Iowa, Indiana, Kentucky, Maryland, Minnesota, Montana, Nebraska, New Hampshire, New Jersey, Oregon, Rhode Island, Tennessee, Texas, Utah and Virginia. California has its own CCPA/CPRA preset.
Related guides and sources
For Shopify: Shopify's Customer Privacy API. For the law: US state privacy cookie banner checklist, which states require universal opt-out signals, sensitive data under US state privacy laws. Other platforms: US privacy law setup by platform.
Primary sources: Global Privacy Control specification.
This page summarises the law as we understand it in October 2026 for website and cookie decisions. It is not legal advice. Statutes, regulations and regulator guidance change, so check the current text with counsel before relying on any threshold or date mentioned here. CookieBeam's regional presets are configurable starting points, not a legal determination for your site.






