@splitbee/node
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

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: 'myunique@user.id',
  event: 'Payment confirmed',
  data: {
    paymentId: '1234567890',
  },
});

Set data to user profile

analytics.user.set({
  userId: 'myunique@user.id',
  userData: {
    username: 'Custom Name',
    isTrial: true,
  },
});

The full reference can be found in our documentation.

/@splitbee/node/

    Package Sidebar

    Install

    npm i @splitbee/node

    Weekly Downloads

    71

    Version

    0.3.1

    License

    MIT

    Unpacked Size

    18.1 kB

    Total Files

    15

    Last publish

    Collaborators

    • timolins
    • tobiaslins