npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@entrolytics/node-sdk

v2.1.0

Published

Node.js SDK for Entrolytics - First-party growth analytics for the edge

Readme

npm License: MIT TypeScript Node.js


Overview

@entrolytics/node-sdk is the official Node.js SDK for Entrolytics - first-party growth analytics for the edge. Track events server-side from any Node.js application.

Why use this SDK?

  • Server-side event tracking from any Node.js environment
  • Web Vitals and Core Web Vitals tracking
  • Form analytics and deployment tracking
  • TypeScript-first with complete type definitions

Key Features

Analytics

  • Page view tracking
  • Custom event tracking
  • User identification
  • Property management

Advanced Features

  • Web Vitals (LCP, INP, CLS)
  • Form analytics
  • Deployment tracking
  • Edge and standard endpoints

Quick Start

Installation

# pnpm (recommended)
pnpm add @entrolytics/node-sdk

# npm
npm install @entrolytics/node-sdk

# yarn
yarn add @entrolytics/node-sdk

# bun
bun add @entrolytics/node-sdk
import { Entrolytics } from '@entrolytics/node-sdk';

// Create client instance
const client = new Entrolytics({
  websiteId: 'your-website-id',
  hostUrl: 'https://entrolytics.click', // or your self-hosted URL
});

// Track a page view
await client.trackPageView({
  url: '/dashboard',
  title: 'Dashboard',
  referrer: 'https://google.com',
});

// Track a custom event
await client.trackEvent({
  url: '/products',
  name: 'add_to_cart',
  data: {
    productId: 'prod_123',
    price: 29.99,
    currency: 'USD',
  },
});

Configuration

const client = new Entrolytics({
  // Required
  websiteId: 'your-website-id',
  hostUrl: 'https://entrolytics.click',

  // Optional
  sessionId: 'custom-session-id',
  userAgent: 'MyApp/1.0',
  timeout: 10000,
  endpoint: 'standard', // 'standard' | 'edge' | 'native'
});

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | websiteId | string | - | Your Entrolytics website ID (required) | | hostUrl | string | - | Entrolytics host URL (required) | | sessionId | string | - | Custom session identifier | | userAgent | string | Auto-generated | Custom user agent for requests | | timeout | number | 10000 | Request timeout in milliseconds | | endpoint | string | 'standard' | API endpoint variant |

API Reference

trackPageView(options)

Track a page view event.

await client.trackPageView({
  url: '/page-path',
  title: 'Page Title',
  referrer: 'https://...',
  hostname: 'example.com',
  language: 'en-US',
  screen: '1920x1080',
});

trackEvent(options)

Track a custom event with optional data.

await client.trackEvent({
  url: '/page-path',
  name: 'event_name',
  data: {
    key: 'value',
    count: 42,
  },
});

track(event, eventData?)

Flexible tracking method.

// Track with event name
await client.track('button_click');

// Track with event name and data
await client.track('purchase', { amount: 99.99 });

// Track with full options
await client.track({
  url: '/checkout',
  name: 'purchase_complete',
  data: { orderId: 'order_123' },
});

identify(properties)

Identify a user/session with custom properties.

await client.identify({
  sessionId: 'session_abc123',
  userId: 'user_456',
  plan: 'premium',
});

Property Management

client.setProperty('userId', 'user_123');
client.setProperties({ plan: 'enterprise', region: 'us-west' });
const props = client.getProperties();
client.clearProperty('region');
client.reset();

Phase 2 Features

Web Vitals Tracking

import { onLCP, onINP, onCLS } from 'web-vitals';

// Track Core Web Vitals
onLCP((metric) => client.trackVital({
  metric: 'LCP',
  value: metric.value,
  rating: metric.rating,
  delta: metric.delta,
  id: metric.id,
  navigationType: metric.navigationType,
  attribution: metric.attribution,
}));

Form Analytics

// Track form interactions
await client.trackForm({
  eventType: 'start',
  formId: 'signup-form',
  formName: 'Newsletter Signup',
  urlPath: '/signup',
});

// Track field focus
await client.trackForm({
  eventType: 'field_focus',
  formId: 'signup-form',
  urlPath: '/signup',
  fieldName: 'email',
  fieldType: 'email',
  fieldIndex: 0,
});

Deployment Tracking

// Set deployment info (auto-detected from Vercel, Netlify, etc.)
client.setDeployment({
  deployId: 'dpl_abc123',
  gitSha: 'abc123def456',
  gitBranch: 'main',
});

// Get current deployment info
const deployment = client.getDeployment();

TypeScript Types

import {
  Entrolytics,
  EntrolyticsOptions,
  EntrolyticsPayload,
  EventData,
  TrackPageOptions,
  TrackEventOptions,
  IdentifyOptions,
  SendType,
  // Phase 2 types
  WebVitalMetric,
  WebVitalRating,
  NavigationType,
  TrackVitalOptions,
  FormEventType,
  TrackFormOptions,
  DeploymentInfo,
} from '@entrolytics/node';

Self-Hosted Usage

const client = new Entrolytics({
  websiteId: 'your-website-id',
  hostUrl: 'https://analytics.yourdomain.com',
});

Edge Runtime

const client = new Entrolytics({
  websiteId: 'your-website-id',
  hostUrl: 'https://entrolytics.click',
  endpoint: 'edge',
});

Requirements

  • Node.js >= 24.x

License

MIT