fix(core): update

This commit is contained in:
2018-10-28 23:32:12 +01:00
parent 7d377e31c2
commit 761804c16e
6 changed files with 125 additions and 440 deletions

View File

@ -1,13 +1,16 @@
# smartanalytics
Google Analytics everywhere
## Availabililty
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartanalytics)
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/smartanalytics)
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartanalytics)
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartanalytics/)
## Status for master
[![build status](https://GitLab.com/pushrocks/smartanalytics/badges/master/build.svg)](https://GitLab.com/pushrocks/smartanalytics/commits/master)
[![coverage report](https://GitLab.com/pushrocks/smartanalytics/badges/master/coverage.svg)](https://GitLab.com/pushrocks/smartanalytics/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/smartanalytics.svg)](https://www.npmjs.com/package/smartanalytics)
@ -19,9 +22,11 @@ Google Analytics everywhere
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
## Usage
Use TypeScript for best in class instellisense.
### Why does this package exist?
Tracking users in webapps is common, often to gain insight in who is using what and where to spend dev resources for best efficiency.
Doing the same stuff in apps can be a bit of a hassle.
@ -34,24 +39,24 @@ It features a very slim dependency tree using the native node request module to
### How do I use this package?
```javascript
import { Analytics } from 'smartanalytics'
import { Analytics } from 'smartanalytics';
let myAnalytics = new plugins.smartanalytics.Analytics({
apiEndPoint: 'https://somepubapi.endpoint.com',
projectId: 'gitzone',
appName: 'npmts'
})
});
myAnalytics.recordEvent('someEvent', {
myAnalytics
.recordEvent('someEvent', {
myKey1: 'myValue1',
myKey2: 'myValue2',
myDataKey3: 3
}).catch(err => {
console.log(err)
})
.catch(err => {
console.log(err);
});
```
For further information read the linked docs at the top of this README.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)