fix(core): update
This commit is contained in:
@ -1,13 +1,16 @@
|
||||
# smartanalytics
|
||||
|
||||
Google Analytics everywhere
|
||||
|
||||
## Availabililty
|
||||
|
||||
[](https://www.npmjs.com/package/smartanalytics)
|
||||
[](https://GitLab.com/pushrocks/smartanalytics)
|
||||
[](https://github.com/pushrocks/smartanalytics)
|
||||
[](https://pushrocks.gitlab.io/smartanalytics/)
|
||||
|
||||
## Status for master
|
||||
|
||||
[](https://GitLab.com/pushrocks/smartanalytics/commits/master)
|
||||
[](https://GitLab.com/pushrocks/smartanalytics/commits/master)
|
||||
[](https://www.npmjs.com/package/smartanalytics)
|
||||
@ -19,9 +22,11 @@ Google Analytics everywhere
|
||||
[](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)
|
||||
|
Reference in New Issue
Block a user