1.0.0 • Published 3 years ago

@growthspace/analytics v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Review

analytics package for internal usage. This package integrates with mixpanel and wraps few basic methods of their SDK.

How to Use

Install

npm install --save @growthspace/analytics

usage

const { AnalyticsService, MIXPANEL_EVENTS } = require('@growthspace/analytics');

const analytics = new AnalyticsService(<MIXPANEL_PROJECT_TOKEN>);

trackEvent('event name', {
    distinct_id: 'something unique',
    name: 'foo'
    }):
peopleSet('something unique', {
    property: 'something'
    }):
peopleSetOnce('something unique', {
        property: 'something'
    }):
peopleIncrement('something unique', 'logins');

Logo Credit