vigour-track
v4.0.0
Published
Tracking module
Maintainers
Readme
Vigour Track
Vigour Track makes it easy to collect data and send it to different tools using a single command.
Installation
$ npm install --save vigour-trackDocumentation
Syntax examples:
Short notation, fires on all listeners and sends default values to services.
track: trueEvent specific notation, fires on specific listener (click) and sends default values to services.
track: [click]
track: { click: true }Override id by entering a string as a value
track: 'custom id'
track: { click: 'custom id' }Event specific notation with custom values, overriding default values.
track: {
click: {
name: 'haha',
value: 2
}
}Special property defining custom behaviour (e.g. for a pageview).
track: {
click: { pageview: true }
}