Collecting data with Trackers and Webhooks

  1. Home
  2. Docs
  3. Collecting data with Trackers and Webhooks
  4. Trackers – collecting data from your own applications
  5. JavaScript Trackers (Web and Node.js)
  6. JavaScript Tracker
  7. Snowplow Plugin for getanalytics.io

Snowplow Plugin for getanalytics.io

The Snowplow JavaScript Tracker can now be deployed directly into your web and node applications using the analytics and @analytics/snowplow NPM packages.

This is particularly useful for modern web applications built with Single Page Application frameworks such as React, Angular or Vue. It’s also a great package if sending events to multiple platforms.

Quick Start

npm install analytics npm install @analytics/snowplow
Code language: CSS (css)

Initialise the plugin:

import Analytics from 'analytics' import snowplowPlugin from '@analytics/snowplow' const analytics = Analytics({ app: 'awesome-app', plugins: [ // Minimal recommended configuration snowplowPlugin({ name: 'snowplow', scriptSrc: 'https://cdn.jsdelivr.net/gh/snowplow/sp-js-assets@2.17.3/sp.js', collectorUrl: 'collector.mysite.com', trackerSettings: { appId: 'myApp', contexts: { webPage: true } } }) ] })
Code language: JavaScript (javascript)

Then track a page view event:

analytics.page()
Code language: CSS (css)

Full documentation

Snowplow Plugin documentation (getanalytics.io)

Analytics package documentation (getanalytics.io)

If you’d like to learn more about Snowplow Insights you can book a demo with our team, or if you’d prefer, you can try Snowplow technology for yourself quickly and easily.