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

@carter-rmn/umm-pixel-sdk

v0.1.0

Published

UMM browser Pixel SDK - sends events to umm-eis via the API gateway.

Readme

UMM-Pixel-SDK

Browser Pixel SDK for the Unified Measurement Model. Captures events in the browser and sends them to umm-eis through the API gateway (single endpoint).

See IMPLEMENTATION_PLAN.md for the full design.

Install on a site

<script>
  window.carter = window.carter || function(){(carter.q=carter.q||[]).push(arguments)};
  carter('init', 'CRT-XXXX', { endpoint: 'https://m.brand.com' }); // CRT-XXXX = tenant_id (= pixel_id)
</script>
<script async src="https://cdn.example.com/carter.iife.js"></script>

API - carter(command, …)

| Command | Usage | |---|---| | init | carter('init', tenant_id, options) - boot. options.endpoint is the single API gateway URL. | | track | carter('track', 'purchase', { value: 89, currency: 'USD' }) | | identify | carter('identify', { email, phone, customer_id }) - email/phone are SHA-256 hashed in-browser. | | consent | carter('consent', 'granted' \| 'pending' \| 'denied') - explicit override. |

Init options: endpoint (required), debug, session_expiry_days, common_properties, user_properties, auto_detect (default true), url_rules, consent_required (default false).

What it does

  • Identity: tenant_id (= pixel id, sent on every event) · durable anonymous_customer_id (1P cookie, for stitching) · per-session session_id.
  • Auth: none (Phase 1) - the tenant_id identifies the account. No token/KMS.
  • Transport: sendBeacon with fetch keepalive fallback → POST {endpoint}/events.
  • Auto-detection: page_view (history) + JSON-LD (Product/Order), GA4 dataLayer, per-tenant URL rules, and data-page-type.
  • Consent: TCF v2.2 (__tcfapi) + GPC gate (granted → send, pending → hold, denied → drop).
  • Privacy: raw email/phone never leave the page (SHA-256 only).
  • Bot filtering: automated browsers are skipped.

Develop

pnpm install
pnpm dev          # vite dev
pnpm typecheck
pnpm test         # vitest
pnpm build        # → dist/ (es, cjs, umd, iife). carter.iife.js is the CDN artifact.
pnpm size         # gzip budget gate (<50 KB)

Example stores: pnpm build, then npx serve example and open the landing page. Two integrations of the same demo shop - example/manual/ (explicit carter('track') calls) and example/auto/ (head snippet + auto-detect). Each page mirrors captured events in an on-page inspector, so they work without a running umm-eis. See example/README.md.

Schema sync

The event shape in src/schema/event.ts is the canonical definition and must stay in sync with the PixelEvent struct in umm-eis (Go). There is no shared schema package - keep both in step (PR checklist + CI contract test).