npm install --save logsnag
import { LogSnag } from 'logsnag';
const logsnag = new LogSnag({
token: '7f568d735724351757637b1dbf108e5',
project: 'my-saas'
});
logsnag.track({
channel: "waitlist",
event: "User Joined",
icon: "π",
user_id: "user_123",
tags: {
source: "google",
},
notify: true
})
logsnag.identify({
user_id: "user_123",
properties: {
name: "John Doe",
email: "john@doe.com",
plan: "premium",
}
})
logsnag.insight.track({
title: "User Count",
value: "100",
icon: "π¨",
})
logsnag.insight.increment({
title: "User Count",
value: 1,
icon: "π¨",
})