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

11metrics-pixel-js

v0.1.0

Published

Framework-agnostic loader for the 11metrics tracking pixel. Injects pixel.js, exposes typed init/pageview/track/identify helpers, and queues calls made before the script finishes loading. Use this directly in any bundler-based app, or via a framework adap

Readme

11metrics-pixel-js

Framework-agnostic loader for the 11metrics tracking pixel. Use this directly in any bundler-based app (Vite, CRA, plain webpack, etc.), or via a framework adapter such as 11metrics-pixel-next for Next.js.

This package does not reimplement pixel tracking — it injects the real pixel.js script served by your 11metrics app and gives you a typed API on top of window._pulse, queueing calls made before the script finishes loading.

Install

npm install 11metrics-pixel-js

(Not yet published — see "Publishing" below.)

Usage

import { init, pageview, track, identify } from '11metrics-pixel-js';

init({
  pixelId: 'YOUR_PIXEL_ID', // Settings → Pixel Setup in the 11metrics app
  pixelUrl: 'https://app.11metrics.ai', // optional, this is the default
});

// SPA route change (no full page load) — the initial script load already
// covers the first pageview.
pageview();

// Custom event.
track('video_play', { video_id: 'abc123' });

// After login / a gated form. email/phone are hashed client-side.
identify({ email: '[email protected]', first_name: 'Marco' });

API

  • init(config: { pixelId: string; pixelUrl?: string }) — injects the pixel script. Safe to call multiple times; only injects once. No-ops on the server.
  • pageview() — manually fire a pageview. Call on every client-side route change.
  • track(name, meta?) — custom event.
  • identify(data){ email?, phone?, first_name?, last_name? }.
  • setNetworkConsent(value) — cross-workspace identity opt-in/out.

Notes

  • Requires PIXEL_URL's target app to be running a build with window._pulse.pageview() exposed (added alongside this package — see public/pixel.js / pixel/pixel.js in the main app repo).
  • Consent handling (the cookie banner, _pulse_consent gating on identify()/form submits) lives entirely in pixel.js itself — this wrapper does not duplicate or override it.

Local development

This package isn't published yet. To build/test it locally:

npm install
npm run build
npm test

To develop 11metrics-pixel-next against your local changes here (before publishing), from ../pixel-next run:

npm install file:../pixel-js --no-save --legacy-peer-deps

--no-save keeps package.json pointed at the real ^0.1.0 registry range (what actually ships to consumers) rather than a filesystem path.

Publishing

npm run build
npm test
npm login          # once, with your npm account
npm publish         # from this directory

Bump version in package.json first if this isn't the first release.