JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 7446
  • Score
    100M100P100Q127736F
  • License MIT

This is the Official tracking library for Vemetric in NodeJS

Package Exports

  • @vemetric/node
  • @vemetric/node/dist/index.js
  • @vemetric/node/dist/index.mjs

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@vemetric/node) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Vemetric Node SDK

The Vemetric SDK for Node.js, Bun and Deno

Learn more about the Vemetric Node.js SDK in the official docs.

You can also checkout the NPM Package.

NPM Version

Installation

npm install @vemetric/node

Usage

import { Vemetric } from '@vemetric/node';

const vemetric = new Vemetric({
  token: 'YOUR_PROJECT_TOKEN',
});

// Track an event
await vemetric.trackEvent('MyCustomEvent', {
  userIdentifier: 'user-id',
  userDisplayName: 'John Doe',
  eventData: { key: 'value' },
});

// Update user data
await vemetric.updateUser({
  userIdentifier: 'user-id',
  userData: {
    set: { key1: 'value1' },
    setOnce: { key2: 'value2' },
    unset: ['key3'],
  },
});

Configuration

The client can be configured with the following options:

const vemetric = new Vemetric({
  token: 'YOUR_PROJECT_TOKEN', // Required
  host: 'https://hub.vemetric.com', // Optional, defaults to https://hub.vemetric.com
});