GA Cookies
caution
You are reading documentation for an outdated version. Here’s the latest one!
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-cookiesyarn add @snowplow/browser-plugin-ga-cookiespnpm 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() ],
});
Context
Adding this plugin will automatically capture the following context:
| Context | Example |
|---|---|
| iglu:com.google.analytics/cookies/jsonschema/1-0-0 | ![]() |
