Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tozd/meteor-activity-instrument
Instrument client and server to log user activity
https://github.com/tozd/meteor-activity-instrument
activtiy meteor meteor-package
Last synced: 15 days ago
JSON representation
Instrument client and server to log user activity
- Host: GitHub
- URL: https://github.com/tozd/meteor-activity-instrument
- Owner: tozd
- License: bsd-3-clause
- Created: 2018-05-08T06:33:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-21T09:59:16.000Z (about 6 years ago)
- Last Synced: 2024-11-11T12:35:29.804Z (2 months ago)
- Topics: activtiy, meteor, meteor-package
- Language: JavaScript
- Homepage: https://atmospherejs.com/tozd/activity-instrument
- Size: 10.7 KB
- Stars: 0
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Instrument client and server to log user activity
=================================================Meteor package which instrument client and server to log user activity
in *activity document* format. It logs:* Meteor connection creation and disconnect.
* Meteor account login.
* Meteor account login failure.
* Meteor account logout.
* Route changes, supporting Flow Router and Vue Router.
* Any browser error (`window.onerror`) with metadata for debugging.
* Client window visibility changes.
* Client window focus changes.Both client and server side.
Installation
------------```
meteor add tozd:activity-instrument
```On client, initialize:
```js
import {init} from 'meteor/tozd:activity-instrument';Meteor.startup(function () {
const vm = new Vue({
...
});init(ActivityCollection, vm);
});
```If you are not using Vue, just pass `null` as the second argument.
`ActivityCollection` is a Meteor collection into which to store
activity documents.On server, initialize:
```js
import {init} from 'meteor/tozd:activity-instrument';init(ActivityCollection, {
DEBUG: 'debug',
ERROR: 'error',
ADMIN: 'admin',
USER: 'user',
GENERAL: 'general',
});
```