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

@productpulse/sdk

v0.1.2

Published

ProductPulse analytics SDK — track product usage in minutes

Readme

@productpulse/sdk

One SDK to understand how users actually use your product.

Track events, identify users, capture errors, and view analytics in the ProductPulse dashboard.

Install

npm install @productpulse/sdk
npx @productpulse/sdk init

init creates config files — paste your API key after signup.

Quick start

1. Sign up & get your key

  1. Create an account
  2. Enter your app name (becomes your workspace)
  3. Go to Settings → copy your pk_... API key

2. Paste key in config

After running npx @productpulse/sdk init, edit productpulse.config.js:

export default {
  apiKey: "pk_your_key_here",
  endpoint: "https://product-pulse-cloud-api.vercel.app",
  debug: false,
};

3. Import setup once

// Next.js: app/layout.tsx
// React/Vite: src/main.tsx
import "./productpulse.setup";

4. Track events

import { ProductPulse } from "@productpulse/sdk";

ProductPulse.track("Signup Completed", { plan: "Pro" });
ProductPulse.identify("user_123", { email: "[email protected]", plan: "Pro" });
ProductPulse.revenue({ amount: 29, currency: "USD" });
ProductPulse.captureException(error);

Files created by init

| File | Purpose | |------|---------| | productpulse.config.js | API key + endpoint | | productpulse.setup.ts | Initializes SDK — import once | | .env.example | Env var template (optional) |


Framework examples

Next.js (App Router)

app/layout.tsx:

import "../productpulse.setup";

React (Vite)

src/main.tsx:

import "./productpulse.setup";

Node.js / Express

import { ProductPulse } from "@productpulse/sdk";

ProductPulse.init({
  apiKey: process.env.PRODUCTPULSE_API_KEY!,
  endpoint: "https://product-pulse-cloud-api.vercel.app",
});

ProductPulse.track("Server Started");

Environment variables

The SDK reads these automatically if apiKey is omitted from config:

# Node.js
PRODUCTPULSE_API_KEY=pk_your_key
PRODUCTPULSE_ENDPOINT=https://product-pulse-cloud-api.vercel.app

# Next.js (browser)
NEXT_PUBLIC_PRODUCTPULSE_API_KEY=pk_your_key
NEXT_PUBLIC_PRODUCTPULSE_ENDPOINT=https://product-pulse-cloud-api.vercel.app

# Vite (browser)
VITE_PRODUCTPULSE_API_KEY=pk_your_key
VITE_PRODUCTPULSE_ENDPOINT=https://product-pulse-cloud-api.vercel.app

API reference

| Method | Description | |--------|-------------| | ProductPulse.init(config) | Initialize SDK | | ProductPulse.track(name, props?) | Track custom event | | ProductPulse.identify(id, traits?) | Identify user | | ProductPulse.user.set(traits) | Update user properties | | ProductPulse.page() | Page view | | ProductPulse.revenue({ amount, currency }) | Track revenue | | ProductPulse.captureException(error) | Track errors | | ProductPulse.performance() | Page performance metrics |

Auto capture

ProductPulse.init({
  apiKey: "pk_xxx",
  endpoint: "https://product-pulse-cloud-api.vercel.app",
  autoCapture: {
    pageViews: true,
    clicks: false,
    formSubmissions: false,
    scroll: false,
    errors: true,
  },
});

Config options

| Option | Type | Default | Description | |--------|------|---------|-------------| | apiKey | string | — | Required. Your project API key | | endpoint | string | Production API URL | Event ingestion endpoint | | debug | boolean | false | Log SDK activity to console | | autoCapture | boolean \| object | true | Auto-track page views, errors, etc. | | batchSize | number | 10 | Events per batch | | flushInterval | number | 5000 | Flush interval (ms) |


Links

Note: Use @productpulse/sdk only. The separate @productpulse/cli package is deprecated.

License

MIT © RahimZahid