Consent Management
Respecting user privacy is a core pillar of the Pintelly SDK. Depending on your jurisdiction (e.g., GDPR in Europe, CCPA in California), you may be legally required to obtain explicit consent before tracking users or assigning unique identifiers to their devices.
How Consent Works in Pintelly
Consent in Pintelly dictates whether the SDK generates a persistent Fingerprint (a unique identifier stored securely in the user's browser).
- Granted: The user receives a persistent ID. All interactions across multiple sessions are stitched together to the same user profile.
- Denied / Pending: The user remains completely anonymous. Events are still tracked (to provide macro-level analytics like total page views), but they cannot be traced back to an individual user, and a new anonymous session is generated upon returning.
Dashboard Configuration
In your Project Settings, you can toggle the Require Consent switch.
When Require Consent is OFF (Implicit)
By default, the SDK assumes consent is granted. It will immediately generate a fingerprint and track all metrics. No UI banner is shown.
When Require Consent is ON (Explicit)
The SDK suspends fingerprint generation. It automatically injects a floating UI banner asking the user to Accept or Decline cookies.
- If accepted, the fingerprint is generated and tracking is linked.
- If declined, tracking remains anonymous.
Programmatic Override (MyAnalytics.setConsent)
If you already have your own Custom Cookie Banner (like OneTrust or Cookiebot) and do not want to use Pintelly's built-in UI, you can manage the consent status programmatically.
Even if you have disabled "Require Consent" in the dashboard, a user's explicit runtime denial using setConsent(false) will override the dashboard setting.
MyAnalytics.setConsent(granted)
Updates the user's consent status programmatically.
Parameters:
granted(boolean):trueto accept,falseto decline.
Behavior:
- When set to
true: Tracking begins immediately (including device/browser fingerprinting for unique users) without needing a page reload. - When set to
false: Explicitly disables unique fingerprinting. Events will still be tracked anonymously (without a session ID) on the next page load. - Override Dashboard Setting: If
require_consentis disabled in the dashboard (which defaults to implicit tracking), callingsetConsent(false)respects the user's explicit opt-out and forces anonymous tracking.
Example:
// Accept Tracking
MyAnalytics.setConsent(true);
// Decline Tracking (revert to anonymous data only)
MyAnalytics.setConsent(false);