Personyze Wiki Personyze Wiki docs
Open Personyze
Data & Tracking

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.

Updated 4 days ago 2 min read
A
by Admin

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 a cookie so it survives page navigation.

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.

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

The Personyze admin includes a Privacy & GDPR section under Domain Settings that generates a copy-paste-ready opt-out snippet styled for embedding directly in your privacy policy page. The generated code typically wires up a button that calls _S_T.system.off() and shows the current state via _S_T.system.is_on().

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.