1.1.0 • Published 5 years ago
kwk-analytics v1.1.0
kwk-analytics
Typescript definitions included
Install
npm install --save kwk-analytics
Configuration
In index.js or similar bootstrap page:
import * as kwk from 'kwk-analytics'
kwk.config({appId: '<your app id>', analyticsHost: '<your analytics host>'})
Logging Actions
Any action can be logged, places this can be inserted include:
- route change event handlers
- state change event handlers
- web page load script
You can supply your own values in the second parameter, optionally you can supply a user object as the third parameter.
kwk.log('<action name>', { yourCustomValue: '<val>', ... }, {id: user.id, username: user.username})