@compilorama/statorama
v0.1.0
Published
Analytics wrapper for Umami
Downloads
512
Readme
Statorama
Analytics wrapper for Umami
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
Install Node. Download the "Recommend for Most Users" version.
Clone the repo:
git clone [email protected]:compilorama/statorama.git
- Go to the project directory:
cd statorama
- Install the project dependencies:
npm install
- Build the project:
npm run build
Tests
Ensure that all code that you have added is covered with unit tests:
npm run test -- --coverage