Observed since 20 Oct, 18:05 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
11metrics-pixel-next
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.
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).
npm install 11metrics-pixel-next
(Pulls in 11metrics-pixel-js automatically. Not yet published — see
"Publishing" below.)
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 });
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.
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
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.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
11metrics-pixel-jsEnvironment{
"local_name": "11metrics-pixel-js",
"alias": false,
"peer_metadata": null
} | ^0.1.0 | runtime |
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^5.6.0 | development |
@types/reactEnvironment{
"local_name": "@types/react",
"alias": false,
"peer_metadata": null
} | ^19.0.0 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^22.0.0 | development |
nextEnvironment{
"local_name": "next",
"alias": false,
"peer_metadata": null
} | >=13.4.0 | peer |
reactEnvironment{
"local_name": "react",
"alias": false,
"peer_metadata": null
} | >=18.0.0 | peer |
Source distribution
{
"integrity": "sha512-Zm7oLLMCJOTgJ13YX3h4iGW6YW1dCkzdlqy+yEZKS/ZQshavJscw70CyNqtOdbHMQ6B3oSWMJLFYOw7+vsMUDw==",
"shasum": "fd88f1d68d35e432c9d5bfbaf4acbc8961ad3da8",
"tarball": "https://registry.npmjs.org/11metrics-pixel-next/-/11metrics-pixel-next-0.1.0.tgz",
"fileCount": 11,
"unpackedSize": 10006,
"signatures": [
{
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
"sig": "MEUCIQCx2+PuPN1KR+WKAckra/Acv2mm0UaSQ+j82eCMgg7NVQIgVx0yGWmI878GTCOvFVsQ5bMNVPuG8CtEVmhmdlv9UyY="
}
]
}Observed since 20 Oct, 18:05 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:e9ccabdd307a60795706e3adc7e98e18ad585a6ad9ee8beb1e24cf72fcb82f86