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-next

v0.1.0

Published

Next.js App Router adapter for 11metrics-pixel-js. Drop <PixelProvider /> in your root layout and it initialises the pixel plus fires pageview() automatically on every client-side route change.

Readme

11metrics-pixel-next

Next.js App Router adapter for 11metrics-pixel-js. Solves the one thing the raw <script src="pixel.js"> tag can't: firing pageview() again on every client-side route change (App Router navigation doesn't trigger a full page load, so the script's automatic first-load pageview never repeats on its own).

Install

npm install 11metrics-pixel-next

(Pulls in 11metrics-pixel-js automatically. Not yet published — see "Publishing" below.)

Usage

Add your workspace's pixel ID to .env.local:

NEXT_PUBLIC_11METRICS_PIXEL_ID=your_pixel_id
NEXT_PUBLIC_11METRICS_PIXEL_URL=https://app.11metrics.ai

Then mount the provider once in your root layout:

// app/layout.tsx
import { PixelProvider } from '11metrics-pixel-next';

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        <PixelProvider />
        {children}
      </body>
    </html>
  );
}

No props needed if the env vars are set — pixelId / pixelUrl props override them per-environment when you need to.

Everything else (track, identify, setNetworkConsent) is re-exported from 11metrics-pixel-js for convenience:

import { identify } from '11metrics-pixel-next';

identify({ email: user.email, first_name: user.firstName });

Why this exists

public/pixel.js, dropped in as a raw <script> tag, fires exactly one pageview on initial script execution — there's no pushState/popstate hook. In an App Router app that means only the very first page a visitor lands on ever gets tracked; every subsequent client-side navigation is invisible. PixelProvider watches usePathname()/useSearchParams() and calls the pixel's pageview() method (added for this purpose) on every change.

Local development

Not published yet. To build/typecheck locally against ../pixel-js without polluting package.json's published dependency range:

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

Publishing

Publish 11metrics-pixel-js first (this package depends on it). Then:

npm run build
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.