A browser side activity tracker
npm install @linkorb/activity-trackeractivity-tracker
========
activity-tracker.js is a simple way to track browser side user behavior. It is helpful for analyzing users' behavior when reading your web articles.
npm install @linkorb/activity-tracker
`
To build activity-tracker into your lib with webpack:
`
require('@linkorb/activity-tracker');
`Demo
Check the
demo/ directory for an demonstration + example on how to use activity-tracker. To run the demo for test:
`
php -S 127.0.0.1:8888
`
Then you can access the demo from: __http://localhost:8888/demo__It is possible to configure the activity-tracker:
`html
`Re-provision
When new content/page is loaded without page reload, e.g. AJAX, you can re-provision the activity-tracker:
`html
`Subscribe only to certain events
By default, activity-tracker reports the following events: __mousemove__, __click__, __dblclick__, __keyup__, __scroll__. You can specify only certain events are reported:
`javascript
// only report click and scroll events
at('subscribe', 'click, scroll');
atProvision();
`Inspect local activity stack
`html
`Build from source
To change the source file and build, simply use webpack.
`
generates dist/at.js
webpack -d
generates dist/at.min.js
webpack -p
``