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

webrec-sdk

v1.0.4

Published

WebRec - Session recording SDK

Downloads

38

Readme

webrec-sdk

Session recording, frustration detection, product analytics, heatmaps, and in-app surveys — in a single, privacy-first SDK.

webrec.app · Documentation · Dashboard

Install

npm install webrec-sdk

Quick start

import { WebRec } from 'webrec-sdk';

WebRec.init({
  apiKey: 'wr_your_project_key',
});

That's it. Sessions appear in your Webrec dashboard within seconds.

Identify users

Link sessions to logged-in users:

WebRec.identify('user-123', {
  name: 'Jane Doe',
  email: '[email protected]',
  plan: 'pro',
});

Group users by organization

Associate users with a company or team for organization-level analytics:

WebRec.group('org-456', {
  name: 'Acme Corp',
  domain: 'acme.com',
  plan: 'enterprise',
  mrr: 15000,
  industry: 'SaaS',
});

Track custom events

WebRec.track('checkout_completed', {
  value: 99.00,
  currency: 'USD',
});

Script tag

If you're not using a bundler, load the SDK via a script tag:

<script src="https://api.webrec.app/v1/webrec.min.js"></script>
<script>
  WebRec.init({ apiKey: 'wr_your_project_key' });
</script>

API

| Method | Description | |---|---| | WebRec.init(config) | Initialize recording | | WebRec.identify(userId, traits?) | Link session to a user | | WebRec.group(groupId, traits?) | Associate user with an organization | | WebRec.track(event, properties?) | Send a custom event | | WebRec.stop() | Pause recording | | WebRec.start() | Resume recording | | WebRec.destroy() | Full teardown (allows re-init) | | WebRec.getSessionId() | Get the current session ID |

Configuration

WebRec.init({
  apiKey: 'wr_your_project_key',

  // Privacy (all inputs masked by default)
  maskAllInputs: true,
  respectDoNotTrack: true,

  // Network & console capture
  captureNetwork: true,
  captureConsole: true,
  captureErrors: true,

  // Sampling
  sampleRate: 100,           // 0-100, percentage of traffic to record

  // Session control
  sessionTimeout: 1800000,   // 30 min inactivity timeout (ms)
  minSessionDuration: 0,     // Discard sessions shorter than N seconds

  // URL filtering
  ignoreUrls: ['/admin.*'],  // Skip recording on matching URLs
  allowUrls: [],             // Only record matching URLs (if set)

  // Performance
  batchSize: 50,
  flushInterval: 5000,

  // Privacy selectors
  blockClass: 'wr-block',    // Elements with this class are excluded
  ignoreClass: 'wr-ignore',  // Elements with this class are not recorded
});

Privacy

  • All form inputs are masked by default
  • Add wr-block or data-wr-block to any element to exclude it from recordings
  • Respects the browser Do Not Track setting by default
  • Call WebRec.stop() to wait for consent, then WebRec.start() when granted
  • GDPR compliant — data hosted in EU (GCP europe-west2)

SDK size

147 KB gzipped. < 1% CPU overhead.

License

MIT