@splitbee/node
v0.3.1
Published
Used to track events for Splitbee using Node.JS
Downloads
354
Readme
splitbee-node
Used to track events for Splitbee using Node.JS
Basic Usage
const { SplitbeeAnalytics } = require('@splitbee/node');
// Token can be found in dashboard settings
const analytics = new SplitbeeAnalytics('PROJECT_TOKEN');
analytics.track({
userId: '[email protected]',
event: 'Payment confirmed',
data: {
paymentId: '1234567890',
},
});
Set data to user profile
analytics.user.set({
userId: '[email protected]',
userData: {
username: 'Custom Name',
isTrial: true,
},
});
The full reference can be found in our documentation.