1.1.2 • Published 1 year ago

loggermonk v1.1.2

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

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: "john@doe.com",
      plan: "premium",
    }
})

Track Insight

loggermonkClient.insight.track({
    title: "User Count",
    value: "100",
    icon: "👨",
})

Increment Insight

loggermonkClient.insight.increment({
    title: "User Count",
    value: 1,
    icon: "👨",
})
1.1.1

1 year ago

1.1.0

1 year ago

1.1.2

1 year ago

1.0.0

2 years ago