@compilorama/statorama

0.1.0 • Public • Published

Statorama

Analytics wrapper for Umami

CircleCI Coverage Status

Installation

npm install @compilorama/statorama --save

Usage

Analytics wrapper that adds a couple of functionalities on top of Umami SDK:

  • Diasables tracking when a search param analytics=disabled is set.
  • Diasables tracking when a local storage item with key/value analytics=disabled is found.
  • Disables tracking when user agent is considered a bot.
import statorama from '@compilorama/statorama';

statorama.init({
  // Source where Umami SDK is requested from (required)
  src: String,
  // Umami Website ID (required)
  id: String,
  // Enable/Diasable tracking arbitrarily (required)
  enabled: Boolean,
})

Contributing

  1. Install Node. Download the "Recommend for Most Users" version.

  2. Clone the repo:

git clone git@github.com:compilorama/statorama.git
  1. Go to the project directory:
cd statorama
  1. Install the project dependencies:
npm install
  1. Build the project:
npm run build

Tests

Ensure that all code that you have added is covered with unit tests:

npm run test -- --coverage

Readme

Keywords

Package Sidebar

Install

npm i @compilorama/statorama

Weekly Downloads

126

Version

0.1.0

License

MIT

Unpacked Size

6.69 kB

Total Files

3

Last publish

Collaborators

  • rcamargo