vigour-track

4.0.0 • Public • Published

Build Status js-standard-style npm version Coverage Status

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-track

Documentation

Syntax examples:

Short notation, fires on all listeners and sends default values to services.

track: true

Event 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 }
}

Package Sidebar

Install

npm i vigour-track

Weekly Downloads

36

Version

4.0.0

License

ISC

Last publish

Collaborators

  • vigour-io