loggermonk
v1.1.2
Published
LoggerMonk is a flexible and scalable event tracking tool that helps you always know what's happening with your business. Fast, reliable, easy to use, quickly integrates with your existing systems. In data we trust.
Downloads
2
Readme
Installation
If you are using npm:
npm install --save loggermonk
If you are using yarn:
yarn add loggermonk
Usage
Import Library
import { LoggerMonk } from 'loggermonk';
Configuring The Client
You need to create a new instance of LoggerMonk with three mandatory parameters:
token
: Your project token from LoggerMonk dashboard.project
: Your project name from LoggerMonk dashboard.site
: Your site name from LoggerMonk dashboard.
const loggermonkClient = new LoggerMonk({
token: '7f568d735724351757637b1dbf108e5',
project: 'my-saas'
});
Track Event
loggermonkClient.track({
channel: "waitlist",
event: "User Joined",
icon: "🎉",
user_id: "user_123",
tags: {
source: "google",
},
notify: true
})
User Properties
loggermonkClient.identify({
user_id: "user_123",
properties: {
name: "John Doe",
email: "[email protected]",
plan: "premium",
}
})
Track Insight
loggermonkClient.insight.track({
title: "User Count",
value: "100",
icon: "👨",
})
Increment Insight
loggermonkClient.insight.increment({
title: "User Count",
value: 1,
icon: "👨",
})