Skip to main content
Snitcher supports integration with popular Consent Management Platforms (CMPs) to help you comply with GDPR, CCPA, and other privacy regulations. To enable consent management, add waitForConsent: true to your tracking script configuration:
Without waitForConsent: true, Snitcher grants consent automatically on page load and visitor identity persists immediately—bypassing your consent flow.

How It Works

When waitForConsent is enabled:
  1. Before Consent: Snitcher tracks pageviews and sessions, but visitor identity is not persisted across browser sessions.
  2. After Consent: Visitor identity persists across sessions, enabling cross-session recognition and attribution.
Even without consent, Snitcher still tracks pageviews and sessions—visitors just won’t be recognized when they return.

Automatic CMP Integration

Snitcher automatically integrates with these Consent Management Platforms: If you use one of these CMPs, Snitcher will automatically:
  • Detect when a visitor grants analytics or marketing consent
  • Enable persistent visitor recognition
Just ensure your CMP script loads before the Snitcher tracking script.
For custom cookie banners or other CMPs, you can manually grant consent:

Opting Out (CCPA)

Under opt-out regulations like the CCPA, Snitcher identifies visitors by default and the visitor has the right to withdraw consent at any time—for example, through a “Do Not Sell or Share My Personal Information” link. Call denyCookieConsent() when a visitor opts out:
This clears the visitor’s persisted identity (device ID, traits, and session) from cookies and localStorage, and stops recognizing them across sessions from that point forward. The opt-out persists across page loads and future sessions.
The opt-out is reversible. If the visitor later opts back in, call Snitcher.giveCookieConsent() to clear the opt-out and re-enable cross-session recognition.
If a visitor has previously set a preference (stored in your own cookie/localStorage), apply it on page load:

Integration with Tag Managers

Google Tag Manager

Create a Custom HTML tag that fires when your consent trigger activates:
Set this tag to fire on your consent-granted trigger (e.g., when a user accepts cookies).

Cookiebot via GTM

If using Cookiebot through GTM, create a trigger for the CookiebotOnAccept event:

Best Practices

  1. Load order matters: Ensure your CMP script loads before the Snitcher tracking script
  2. Test both scenarios: Verify tracking works both with and without consent
  3. Don’t over-complicate: If using a supported CMP, automatic integration should “just work”

Troubleshooting

  • Confirm giveCookieConsent() was called
  • Check if localStorage is being cleared by the browser
  • Verify consent was actually granted in your CMP
  • Tracking still works without consent—just without cross-session recognition
  • Check network requests to radar.snitcher.com in DevTools