1.0.5 • Published 6 years ago
statful-browser-plugin v1.0.5
Statful Browser Plugin
Statful plugin to capture browser information and add it on your metrics.
Table of Contents
Installation
npm install --save statful-browser-pluginQuick Start
<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>Tags
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 |
Contribute
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
Installation
$ npm installTests
$ npm testAuthors
License
Statful Javascript Client is available under the MIT license. See the LICENSE file for more information.