Go to file
2018-10-28 23:32:12 +01:00
dist update to support latest pubapi 2017-08-29 15:18:10 +02:00
docs fix(core): update 2018-10-28 23:32:12 +01:00
test fix(core): update 2018-10-28 23:29:45 +01:00
ts fix(core): update 2018-10-28 23:32:12 +01:00
.gitignore added readme and first working version 2017-02-24 03:00:54 +01:00
.gitlab-ci.yml fix(core): update 2018-10-28 23:32:12 +01:00
license fix(core): update 2018-10-28 23:29:45 +01:00
npmextra.json fix(core): update 2018-10-28 23:29:45 +01:00
package-lock.json 2.0.12 2018-10-28 23:32:12 +01:00
package.json 2.0.12 2018-10-28 23:32:12 +01:00
README.md fix(core): update 2018-10-28 23:32:12 +01:00
tslint.json fix(core): update 2018-10-28 23:29:45 +01:00

smartanalytics

Google Analytics everywhere

Availabililty

npm git git docs

Status for master

build status coverage report npm downloads per month Dependency Status bitHound Dependencies bitHound Code TypeScript node JavaScript Style Guide

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. Unnecessary dependencies used by many existing analytics tools make the whole app slow just to gain a little usage info.

Say hello to smartanalytics. :) It features a very slim dependency tree using the native node request module to send posts to a tracking API of your choice.

How do I use this package?

import { Analytics } from 'smartanalytics';
let myAnalytics = new plugins.smartanalytics.Analytics({
  apiEndPoint: 'https://somepubapi.endpoint.com',
  projectId: 'gitzone',
  appName: 'npmts'
});

myAnalytics
  .recordEvent('someEvent', {
    myKey1: 'myValue1',
    myKey2: 'myValue2',
    myDataKey3: 3
  })
  .catch(err => {
    console.log(err);
  });

For further information read the linked docs at the top of this README.

MIT licensed | © Lossless GmbH

repo-footer