pip3 install logsnag
from logsnag import LogSnag
logsnag = LogSnag(token='7f568d735724351757637b1dbf108e5', project="my-saas")
logsnag.track(
channel="waitlist",
event="User Joined",
user_id="user_123",
description="Email: [email protected]",
icon="🎉",
tags={
"source": "google",
},
notify=True
)
logsnag.identify(
user_id="user_123",
properties={
"name": "John Doe",
"email": "[email protected]",
"plan": "free",
}
)
logsnag.group(
user_id="user_123",
group_id="group_123",
properties={
"name": "ACME Inc.",
"plan": "enterprise",
"fund": "Series A",
}
)
logsnag.insight.track(
title='User Count',
value=100,
icon='👨',
)
logsnag.insight.increment(
title='User Count',
value=1,
icon='👨',
)