Personyze Wiki Personyze Wiki docs
English
Open Personyze
Docs/ Privacy & Consent/ GDPR Compliance & Opt-Out for Personyze Tracking
Privacy & Consent

GDPR Compliance & Opt-Out for Personyze Tracking

How to opt visitors out of Personyze tracking for GDPR/privacy compliance using JavaScript, and how to verify and re-enable tracking when consent is granted.

4 min read Updated 2 days ago

Personyze tracking can be programmatically turned off, on, or queried per visitor — useful for GDPR, CCPA, and other privacy frameworks where users must consent (or actively opt out) before behavioral data is collected.

When to use this

  • Cookie consent banners — call off() by default, then on() only after the user accepts non-essential / analytics cookies.
  • Privacy preference centers — let visitors toggle Personyze tracking from a settings page.
  • Region-specific compliance — disable tracking for visitors in jurisdictions where consent hasn’t been collected yet.

What gets controlled.These calls govern Personyze’s collection of behavioral data — page views, product interactions, audience matching. They do not affect campaigns that have already rendered earlier in the session.

JavaScript API

Opt out (turn tracking off)

_S_T.system.off()

After this call, no further events are sent to Personyze for the current session. The opt-out state is persisted in the stat_track_off cookie so it survives page navigation. That cookie lasts 730 days (2 years) even when your account sets a shorter cookie lifetime: an opted-out browser no longer runs the tracking that would renew it, so a shorter life would quietly end the refusal. (The public API is unchanged — only where the refusal is stored moved. Opt-outs made before this cookie existed are still honored: the flag’s legacy location inside stat_track_u_id is still read.) See Personyze client-side cookies for the full cookie list, and Consent Mode if you would rather load Personyze and wait for consent than block it entirely.

Opt in (turn tracking on)

_S_T.system.on()

Re-enables event collection. Use this when a visitor grants consent through your cookie banner or preference center.

Check current state

_S_T.system.is_on()  // returns true | false

Useful when conditionally rendering UI (“You are currently opted out — click to re-enable”) or in audit logs.

Forget the visitor in this browser

_S_T.delete_cookie()

Deletes the visitor-id and session cookies (stat_track_u_id, _stat_track_s_id) and their copies in localStorage, so the next page view starts as a new visitor. It leaves the opt-out cookie alone. To delete what Personyze holds about the person, use Settings → Data & privacy → Visitor requests.

Common implementation pattern

A typical cookie-consent integration looks like this:

// On page load — opt out by default until consent is given
if (!localStorage.getItem('analytics_consent')) {
  _S_T.system.off();
}

// When the user accepts the consent banner
function onConsentGranted() {
  localStorage.setItem('analytics_consent', 'granted');
  _S_T.system.on();
}

// When the user rejects or revokes consent
function onConsentRevoked() {
  localStorage.setItem('analytics_consent', 'revoked');
  _S_T.system.off();
}

Generated opt-out code

Settings → Data & privacy → Access & documents → Privacy policy clause and cookie list (also reached from Tracking Code → Privacy & compliance → Privacy policy) gives a copy-ready opt-out snippet for your privacy policy page, under Letting visitors opt out. It renders an on/off switch showing the visitor’s current status; switching it off stops tracking for that visitor and removes any personalization already on the page.

Verifying opt-out is working

  1. Open your site in a private/incognito window with the dev tools network tab open.
  2. Filter the requests by counter.personyze.com.
  3. Trigger the opt-out (call _S_T.system.off() from the console, or click your privacy banner).
  4. Navigate to a new page on your site. You should see no further requests to counter.personyze.com.
  5. Run _S_T.system.is_on() in the console — should return false.

Already-rendered content stays.Opt-out stops collection of new behavioral data, but a personalization that already loaded earlier in the page continues to display. To prevent any campaign from rendering for opted-out visitors, gate the Personyze tag itself with your consent check before loading stat-track-lib.js.
Did this page answer your question?
Thank you — that goes to whoever maintains this page.