Statful plugin to capture browser information and add it on your metrics.
npm install --save statful-browser-plugin
<script type="text/javascript" src="node_modules/statful-client-javascript/dist/statful.umd.min.js"></script>
<script type="text/javascript" src="node_modules/statful-browser-plugin/dist/statful-browser-plugin.umd.min.js"></script>
<script>
// Init statful
statful.initialize({
dryrun: false,
debug: false,
app: 'exampleApp',
flushInterval: 5000
});
// Use Statful Browser Plugin
statful.use(new StatfulBrowserPlugin());
// Send a metric
statful.counter('page_load');
</script>
These tags are only populated if available.
Tag | Description |
---|---|
browser | browser name |
browser_version | browser version |
device_type | device type (desktop, tablet or mobile) |
os | os name |
os_version | os version |
Follow the standard Fork and Pull Request workflow and:
- Add tests for new feats
- Make sure the test suite passes
- Update or add documentation accordingly
$ npm install
$ npm test
Statful Javascript Client is available under the MIT license. See the LICENSE file for more information.