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

@inspectlet/browser

v1.0.1

Published

Official Inspectlet browser SDK — typed wrapper around the Inspectlet tracker for session recording, heatmaps, and analytics. Free forever for low-volume sites.

Readme

@inspectlet/browser

npm types license

Official Inspectlet browser SDK — session recording, heatmaps, form analytics, and AI session insights. A tiny, fully typed wrapper around the Inspectlet tracker; drop-in replacement for the <script> snippet, with a clean API and no copy-paste.

A modern alternative to LogRocket, FullStory, and Hotjar — with Inspectlet's deep form analytics and AI session insights, and a free tier that's free forever.

  • No tracker bundling. The tracker JS still loads from cdn.inspectlet.com, so bug fixes and new features reach your users immediately — you don't need to redeploy.
  • TypeScript-first. Every command is typed.
  • SSR-safe. All methods are silent no-ops on the server. Works in Next.js, Remix, Nuxt, etc.
  • Tiny. ~1.5 KB gzipped, zero dependencies, tree-shakeable.

Using React or Next.js? You probably want @inspectlet/react, which builds on this package.

Install

npm install @inspectlet/browser
# or: pnpm add / yarn add / bun add

Quickstart

import { init, inspectlet } from '@inspectlet/browser';

init({ wid: 'YOUR_WID' });

inspectlet.identify('[email protected]');
inspectlet.tagSession({ plan: 'pro', signupSource: 'organic' });

That's it. The tracker script loads asynchronously and starts recording.

Configuration

init({
  wid: 'YOUR_WID',                 // required
  enabled: process.env.NODE_ENV === 'production', // disable in dev
  debug: false,
  abLoader: false,                 // page-flicker prevention for A/B tests
  cookieLocation: '.example.com',  // override cookie domain
  crossDomain: ['app.com', 'docs.com'], // link sessions across domains
  disableVirtualPage: false,       // disable auto-pageview detection (SPAs)
  disableGACapture: false,         // disable auto-GA event capture
  scriptUrl: 'https://my-cdn.example.com/inspectlet.js', // self-host
});

API

| Method | Description | |---|---| | inspectlet.identify(userId) | Identify the current visitor. | | inspectlet.tagSession(tags) | Add metadata tags to the session. Accepts a string or an object. | | inspectlet.virtualPage(url?) | Manually trigger a virtual pageview. Use in SPAs. | | inspectlet.pageUrl(url) | Override the URL Inspectlet associates with the current page. | | inspectlet.resetSession() | Force a new session on next pageview. | | inspectlet.activateExperiment(id) | Activate an A/B test experiment by ID. | | inspectlet.push(cmd) | Escape hatch — push any tracker command directly. Fully typed. | | inspectlet.isLoaded() | true once the tracker JS has booted. | | inspectlet.onLoad(cb) | Run cb when the tracker is ready. |

All methods are typed. Misuse is caught at compile time:

inspectlet.tagSession({ plan: 'pro' }); // ok
inspectlet.tagSession({ plan: { nested: true } }); // type error

Recipes

Disable in development

init({ wid: 'YOUR_WID', enabled: import.meta.env.PROD });

Identify after auth

async function onLogin(user) {
  inspectlet.identify(user.email);
  inspectlet.tagSession({ userId: user.id, plan: user.plan });
}

Manual SPA pageviews

init({ wid: 'YOUR_WID', disableVirtualPage: true });

router.afterEach((to) => {
  inspectlet.virtualPage(to.fullPath);
});

Self-host the tracker

init({
  wid: 'YOUR_WID',
  scriptUrl: 'https://assets.example.com/inspectlet.js',
});

SSR / Next.js

All methods are safe to call from server-rendered code — they're no-ops on the server. For ergonomic React integration with automatic pageview tracking, see @inspectlet/react.

License

MIT


Made by Inspectlet — session recording, heatmaps, form analytics, and AI session insights for product and growth teams.

Install free · Docs · Pricing · Compare