Event specifications
The plugin allows you to integrate with Event Specifications for a selected set of plugins. The configuration for the plugin should be retrieved directly from your tracking plan in Snowplow Console.
The plugin will automatically add an Event Specification context to the events matching the configuration added.
The plugin is available since version 3.23 of the tracker.
Install plugin
- JavaScript (tag)
- Browser (npm)
| Tracker Distribution | Included |
|---|---|
sp.js | ❌ |
sp.lite.js | ❌ |
Download:
| Download from GitHub Releases (Recommended) | Github Releases (plugins.umd.zip) |
| Available on jsDelivr | jsDelivr (latest) |
| Available on unpkg | unpkg (latest) |
window.snowplow(
'addPlugin',
'https://cdn.jsdelivr.net/npm/@snowplow/browser-plugin-event-specifications@3/dist/index.umd.min.js',
['eventSpecifications', 'EventSpecificationsPlugin']
);
npm install @snowplow/browser-plugin-event-specifications@3yarn add @snowplow/browser-plugin-event-specifications@3pnpm add @snowplow/browser-plugin-event-specifications@3
import { newTracker } from '@snowplow/browser-tracker';
import { WebVitalsPlugin } from '@snowplow/browser-plugin-event-specifications';
newTracker('sp1', '{{collector_url}}', {
appId: 'my-app-id',
plugins: [ EventSpecificationsPlugin(/* plugin configuration */) ],
});
Configuration
The configuration of the plugin would be in the form of:
- JavaScript (tag)
- Browser (npm)
window.snowplow(
'addPlugin',
'https://cdn.jsdelivr.net/npm/@snowplow/browser-plugin-event-specifications@3/dist/index.umd.min.js',
['eventSpecifications', 'EventSpecificationsPlugin'],
[
{
[Plugin integration name]: {
/* Key value pairs of event names and event specification ids */
},
/* More integrations */
}
]
);
EventSpecificationsPlugin({
[Plugin integration name]: {
/* Key value pairs of event names and event specification ids */
},
/* More integrations */
});
You can retrieve the configuration for your Event Specifications directly from your Tracking Plan after clicking on the Implement tracking button.
![]()