logsnag
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published
LogSnag

LogSnag

Get notifications and track your project events.

NPM Version Discord Documentation

Installation

npm install --save logsnag

Usage

Import Library

import { LogSnag } from 'logsnag';

Initialize Client

const logsnag = new LogSnag({ 
  token: '7f568d735724351757637b1dbf108e5',
  project: 'my-saas'
});

Track Event

logsnag.track({
    channel: "waitlist",
    event: "User Joined",
    icon: "🎉",
    user_id: "user_123",
    tags: {
      source: "google",
    },
    notify: true
})

User Properties

logsnag.identify({
    user_id: "user_123",
    properties: {
      name: "John Doe",
      email: "john@doe.com",
      plan: "premium",
    }
})

Track Insight

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

Increment Insight

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

Readme

Keywords

Package Sidebar

Install

npm i logsnag

Weekly Downloads

3,240

Version

1.0.0

License

MIT

Unpacked Size

41.3 kB

Total Files

56

Last publish

Collaborators

  • sh4yy