Page contents
show page contents
If this plugin is used, the tracker will look for Google Analytics cookies (specifically the “__utma”, “__utmb”, “__utmc”, “__utmv”, “__utmz”, and “_ga” cookies) and combine their values into an event context which gets sent with every event.
Installation
npm install @snowplow/browser-plugin-ga-cookies
yarn add @snowplow/browser-plugin-ga-cookies
pnpm add @snowplow/browser-plugin-ga-cookies
Initialization
import { newTracker, trackPageView } from '@snowplow/browser-tracker';
import { GaCookiesPlugin } from '@snowplow/browser-plugin-ga-cookies';
newTracker('sp1', '{{collector_url}}', {
appId: 'my-app-id',
plugins: [ GaCookiesPlugin() ],
});
Code language: JavaScript (javascript)
Context
Adding this plugin will automatically capture the following context:
Context | Example |
---|---|
iglu:com.google.analytics/cookies/jsonschema/1-0-0 | ![]() |