Skip to main content
When you finish, you know which signal stops collection, what Datalyr keeps, and how to answer an erasure request. setConsent() takes four booleans: analytics, marketing, preferences, and sale. Call it before init(). The SDK stores the choice and applies it at initialization.
Withdrawing consent clears the queue, the offline queue, the stored traits, the captured email, and the journey. Withdrawing marketing or sale also stops Stripe link decoration and unloads container iframes. Until consent arrives, the SDK holds the anonymous ID in memory only. It writes no cookie and no localStorage entry.

Browser privacy signals

A first-party tracking domain also suppresses the server __dl_visitor_id cookie when the request carries Sec-GPC: 1, DNT: 1, or X-DL-Consent: denied.

Opt-out

privacyMode: 'strict' forces Auto Identify off and stops email prefill on Stripe links. Turn it on in Settings → Identity & Attribution with the Strict mode toggle.

What Datalyr stores

We store every property you send and forward matched properties to your ad platforms. Never send a password, an access token, a full card number, a medical record, or any other regulated field.

Erase one person’s data

A Shopify customers/redact or shop/redact webhook starts an erasure job. Datalyr also accepts a manual request at [email protected]. An erasure never runs workspace-wide, so you can’t wipe a workspace by accident. Every delete carries the workspace ID plus at least one identifier of that person.

Filter outgoing ad events

Turn on Filter health-related fields in Settings → Privacy & redaction. Existing and new rules inherit the setting; you do not need to recreate them. Eligible server conversions continue, while Datalyr-managed Meta, Google and TikTok browser pixels stay off. Use Advanced controls to pause sharing or record a platform notice. Filtering does not guarantee platform approval or change data already collected. Read the setup guide. To limit collection itself, use Filters.

Verify your posture

  1. Open your site in a private window with consent denied.
  2. Open Live and confirm no event arrives.
  3. Grant consent.
  4. Reload and confirm the pageview arrives.
  5. Turn on GPC in a test browser.
  6. Reload and confirm no event arrives.
  7. Call datalyr.reset() and confirm Users shows a new distinct id.

When it does not work

Next