Observed since 20 Oct, 18:05 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
11metrics-pixel-js
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
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.
npm install 11metrics-pixel-js
(Not yet published — see "Publishing" below.)
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: 'user@example.com', first_name: 'Marco' });
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.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)._pulse_consent gating on
identify()/form submits) lives entirely in pixel.js itself — this
wrapper does not duplicate or override it.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.
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.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
typescriptEnvironment{
"local_name": "typescript",
"alias": false,
"peer_metadata": null
} | ^5.6.0 | development |
@types/nodeEnvironment{
"local_name": "@types/node",
"alias": false,
"peer_metadata": null
} | ^22.0.0 | development |
Source distribution
{
"integrity": "sha512-8SB5NqiKdDjaqhuqcvJKFKZ8OkFxaDcLLhnKI6DBhXOt63u8FcscdXVqxL1zTv9Qg5hNxW18zwQD3kWwkjX4iw==",
"shasum": "d3d40a00bc5e00aafcc9b7a640bf7ae9189cab58",
"tarball": "https://registry.npmjs.org/11metrics-pixel-js/-/11metrics-pixel-js-0.1.0.tgz",
"fileCount": 7,
"unpackedSize": 15160,
"signatures": [
{
"keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U",
"sig": "MEYCIQC9873AgfQoSzEYKQy6cttw79gFuO/8JKjvXSG1ut6CGgIhAPzswlQ+VpdhgaGZ1P+K3vVOnsRgFu57683VIgXPecDX"
}
]
}Observed since 20 Oct, 18:05 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:babc48b2705a7af52ffda1285c2dc10f19074fb10d2fae261a00e60ee3e27ba1