US Privacy: CCPA, GPC and DoNotTrack
Manage privacy compliance for your US users (CCPA/CPRA, GPC, DoNotTrack) with the Dastra cookie consent widget.
Regulatory context
Unlike the GDPR which requires opt-in (prior consent), US privacy law is primarily based on an opt-out model: trackers can be placed by default, but users must be able to object easily.
Key regulations to be aware of:
CCPA / CPRA
California
Opt-out
2020 / 2023
CPA
Colorado
Opt-out
2023
VCDPA
Virginia
Opt-out
2023
CTDPA
Connecticut
Opt-out
2023
Recommended approach with Dastra
1. Create a geo-targeted variant for the United States
The simplest way to handle your US users is to create a geo-targeted variant from the Variants tab of your widget.
For California (CCPA/CPRA), configure the variant with an opt-out model: non-essential cookies are active by default, and users can opt out. Also consider adding a "Do Not Sell or Share My Personal Information" link in your site footer that opens the widget directly.
For other US states without a banner requirement, you can enable the "Do not display a banner" option with default consent values configured according to your policy.
Geo-targeted variants2. Honour GPC and DoNotTrack signals
Two browser signals allow a user to express their refusal to be tracked without interacting with a banner:
GPC (globalPrivacyControl)
W3C
✅ Yes (CPRA)
Opt-out signal for the sale/sharing of personal data
DNT (doNotTrack)
W3C
❌ No
"Do not track" preference signal (not legally enforceable)
Native activation (recommended)
Dastra now supports these signals natively via a toggle in the widget configuration. Enable the "Enable Global Privacy Control (GPC)" option from Widget configuration > Advanced settings.

When this option is enabled, the widget automatically refuses analytics and marketing cookies for any visitor whose browser sends a GPC or DoNotTrack signal — with no additional code required.
Advanced option — Custom JS snippet
If you need finer control (for example displaying an acknowledgment message or applying opt-out to specific categories), you can use the following JS snippet in addition to the native toggle, or instead of it if you manage the widget via the JS API:
This snippet must be placed before the Dastra widget loading tag so it is taken into account on the very first page load.
Category labels to use with setPurposeConsent:
Necessary
Necessary
Preferences
Preference
Analytics
Analytical
Marketing
Marketing
Other
Other
Unclassified
Unclassified
3. Displaying an "Opt-Out Request Honored" acknowledgment message
When a GPC or DNT signal is detected, regulations such as CPRA recommend informing the user that their opt-out request has been acknowledged. Dastra does not generate this message natively — you need to inject it into the page yourself.
Two approaches are available depending on the user experience you want.
Option A — Ephemeral toast
A message that appears for a few seconds then disappears automatically. Easy to implement, but the user may miss it if they are not looking at the page at the right moment.
Option B — Persistent banner (recommended)
A fixed bar at the bottom of the page, visible as long as GPC is active in the browser. More robust for compliance: the indication is permanent, not only visible on first load. A Dismiss button lets the user close it.
Summary
CCPA geo-targeted variant
Dastra interface
✅ Yes
GPC detection
Native toggle (widget config) — recommended
✅ Yes (CPRA)
DNT detection
Native toggle (widget config) — recommended
❌ Recommended
Acknowledgment message
JS snippet (advanced option)
❌ Recommended
Last updated
Was this helpful?