Package Exports
- app-usage-stats
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (app-usage-stats) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
app-usage-stats
Example
const UsageStats = require('app-usage-stats')
const stats = new UsageStats('UA-987654321', 'app-name')
AppUsageStats ⏏
new AppUsageStats(tid, appName, [options])
Param | Type | Description |
---|---|---|
tid | string |
Google Analytics tracking ID |
appName | string |
App name |
[options] | object |
|
[options.dimensionMap] | object |
A custom dimension name to ID Map. |
[options.metricMap] | object |
A custom metric name to ID Map. |
[options.sendInterval] | object |
If specified, stats will be sent no more frequently than this period. |
stats.hit(dimensions, metrics)
Track a hit.
Kind: instance method of AppUsageStats
Param | Type | Description |
---|---|---|
dimensions | Array.<object> |
dimension-value maps |
metrics | Array.<object> |
metric-value maps |
stats.save()
Save stats
Kind: instance method of AppUsageStats
stats.saveSync()
Save stats sync.
Kind: instance method of AppUsageStats
stats.load()
Load stats
Kind: instance method of AppUsageStats
stats.loadSync()
Loads stats sync.
Kind: instance method of AppUsageStats
stats.send()
Send and reset stats.
Kind: instance method of AppUsageStats
© 2016 Lloyd Brookes <75pound@gmail.com>. Documented by jsdoc-to-markdown.