Consent
caution
You are reading documentation for an outdated version. Here’s the latest one!
Installation
npm install @snowplow/browser-plugin-consent
yarn add @snowplow/browser-plugin-consent
pnpm add @snowplow/browser-plugin-consent
Initialization
import { newTracker, trackPageView } from '@snowplow/browser-tracker';
import { ConsentPlugin } from '@snowplow/browser-plugin-consent';
newTracker('sp1', '{{collector_url}}', {
appId: 'my-app-id',
plugins: [ ConsentPlugin() ],
});
Functions
enableGdprContext | Documentation |
trackConsentGranted | Documentation |
trackConsentWithdrawn | Documentation |
Context
Adding this plugin will automatically capture the following context:
Context | Example |
---|---|
iglu:com.snowplowanalytics.snowplow/consent_document/jsonschema/1-0-0 |