grow-analytics

1.0.8 • Public • Published

Grow Analytics

A JavaScript client to help track analytical events for Grow's advanced analytics

Getting Started

git clone git@github.com:poweredbygrow/grow-analytics.git && cd grow-analytics
yarn
yarn start

create a .env file and add an API domain

DOMAIN=mydomain

Usage

A brief introduction:

// App code

import analytics from 'grow-analytics';

analytics.page();
analytics.track('account:created', { member });

Methods

analytics.track()

analytics.track([event], [properties]);

Track custom events

Arguments
event [String] required
properties [Object] optional

properties can be either the user or application.

analytics.track('account:created', { user, application, myCustomData });

analytics.page()

analytics.page([name]);

Track page views automatically. This method should be called on initial page load and on every subsequent page navigation.

Arguments
name [String] optional
analytics.page('Analytics dashboard | Powered by Grow');

Package Sidebar

Install

npm i grow-analytics

Weekly Downloads

2

Version

1.0.8

License

ISC

Unpacked Size

269 kB

Total Files

18

Last publish

Collaborators

  • brotzky