0.3.3 • Published 1 year ago

@rangoon/analytics v0.3.3

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

RTX Web Analytics SDK

This SDK is intended for collecting anonymous usage data for campaigns developed by rangoon.tech.

Installation

First, install the library by running the command

npm install @rangoon/analytics

If you're using yarn,

yarn add @rangoon/analytics

Usage

Initialize the SDK by calling the method Analytics.initialize.

import { Analytics } from '@rangoon/analytics';

Analytics.initialize({
  projectId: "<PROJECT_ID>",
});

That's it! The SDK will automatically collect usage information of the website's users.

If you want to collect custom events, you can do so with the function logEvent.

import { logEvent } from '@rangoon/analytics';

// initialize the SDK first
Analytics.initialize({
  projectId: "<PROJECT_ID>",
});

// custom event name with custom payload
logEvent('custom_event', { foo: 'bar' });

Before you log custom events, make sure analytics SDK is initialized first.

0.3.2

1 year ago

0.3.3

1 year ago

0.2.2

1 year ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago