@snowplow/browser-plugin-privacy-sandbox
v4.0.4
Published
Allows for the collection of Privacy Sandbox specific data.
Downloads
4,072
Keywords
Readme
Snowplow Privacy Sandbox Tracking
Browser Plugin to be used with @snowplow/browser-tracker
.
Allows for adding Privacy Sandbox related data to your Snowplow tracking. To learn more about the Privacy Sandbox you can visit the official website. As more and more APIs become available or further refined, we will be upgrading the plugin with more capabilities and options as more APIs are added to the Privacy Sandbox.
Currently supported APIs:
Note: Some of the APIs and data will not be available by default in all users. This is commonly due to these APIs being dependent on browser support, user privacy preferences, browser feature-flags or ad-blocking software. The plugin will not modify or request access explicitly to any of these features if not available by default.
Maintainer quick start
Part of the Snowplow JavaScript Tracker monorepo.
Build with Node.js (18 - 20) and Rush.
Setup repository
npm install -g @microsoft/rush
git clone https://github.com/snowplow/snowplow-javascript-tracker.git
rush update
Package Installation
With npm:
npm install @snowplow/browser-plugin-privacy-sandbox
Usage
Initialize your tracker with the PrivacySandboxPlugin:
import { newTracker } from '@snowplow/browser-tracker';
import { PrivacySandboxPlugin } from '@snowplow/browser-plugin-privacy-sandbox';
newTracker('sp1', '{{collector}}', { plugins: [ PrivacySandboxPlugin() ] });
With the plugin added to your tracker, a new context will be attached to every event, when Privacy Sandbox Topics are detected for a user.
Copyright and license
Licensed and distributed under the BSD 3-Clause License (An OSI Approved License).
Copyright (c) 2023 Snowplow Analytics Ltd.
All rights reserved.