Consent
Installationโ
npm install @snowplow/browser-plugin-consentyarn add @snowplow/browser-plugin-consentpnpm 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 | ![]() |
