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

tracabit

v1.0.0

Published

Tracabit — GA4-style privacy-first analytics SDK + Sentry-style crash reporting. Multi-provider geo race, passive fingerprint, standard event helpers. Zero runtime deps. Works in browsers and Node 18+.

Readme

+ tracabit

Why Tracabit exists Google Analytics 4 is 45–100KB, cookie-laden, and shows your data to Google. Plausible is privacy-first but you can't query it from code. Sentry is crash-only, and MCP-coupled agent analytics doesn't exist yet. Tracabit unifies all three: a 2.6KB tracker, GA4-event-compatible JSON API, Sentry-style crash capture, and a contract any AI agent can read — with no inference cost, no cookies, no third-party trackers.

Install

npm install tracabit
# or: pnpm add tracabit · yarn add tracabit · bun add tracabit

60-second quick start

import { createClient } from "tracabit";

const tcb = createClient({
  apiKey: "tcb_live_...",
  projectId: "tcb_proj_...",
  endpoint: "https://your-host/analytics",
});

// Fire a page view — runs in <1ms, never blocks the page
tcb.pageView();

// GA4-style product analytics
tcb.addToCart({ item_id: "SKU-1001", item_name: "Pro Plan", price: 99, quantity: 1 });
tcb.purchase("T-2026-0842", 149.97, "EUR", [
  { item_id: "SKU-1001", item_name: "Pro Plan", price: 149.97, quantity: 1 },
]);

// Capture a crash — links to the live session timeline
tcb.captureException(new Error("checkout failed"), { fatal: true });

That's the entire API surface for createClient. No SDK bloat — just events you actually fire.

Browser script tag (1 line, no build step)

<script src="https://tracabit.com/tracabit.js" data-key="tcb_live_..."></script>
<script>
  window.tracabit.track("page_view");
  window.tracabit.purchase("T-1", 49.99, "USD");
</script>

Auto-fires page_view on load. Auto-tracks elements with data-track="event_name". Includes the passive fingerprint, multi-provider geo resolution, and scroll-depth milestones.

Why developers switch to Tracabit

| | Tracabit | GA4 | Plausible | PostHog | Sentry | | :--- | :---: | :---: | :---: | :---: | :---: | | Tracker size (gzipped) | ~1 KB | ~22 KB | ~1 KB | ~12 KB | — | | Zero cookies (GDPR-native) | ✓ | ✗ | ✓ | ✓ | n/a | | GA4 standard event helpers | ✓ | ✓ | ✗ | partial | ✗ | | Crash reporting built-in | ✓ | ✗ | ✗ | ✓ | ✓ | | Inference-free core | ✓ | ✓ | ✓ | ✗ | n/a | | Self-host in your VPC | ✓ | ✗ | partial | partial | ✗ | | Queryable via AI agents (HTTP/JSON) | ✓ | partial | ✗ | via MCP | ✗ | | Runtime dependencies | 0 | vendor lock | 0 | 0 | heavy SDK |

7.6 KB compressed. Zero runtime dependencies. Works in Node 18+ and every modern browser. Tree-shakeable. Side-effect-free.

The full event surface

Every method on createClient() mirrors the GA4 reference:

tcb.pageView(url?, title?)
tcb.search(term)
tcb.viewItem(item)          tcb.viewItemList(items)
tcb.addToCart(item)         tcb.viewCart(items?)    tcb.removeFromCart(item)
tcb.beginCheckout(value, currency?, items?)
tcb.addPaymentInfo(paymentType?, value?, currency?)
tcb.purchase(transactionId, value, currency?, items?)
tcb.refund(transactionId, value?, currency?)
tcb.generateLead(value, currency?)
tcb.formStart(formId)       tcb.formSubmit(formId)
tcb.fileDownload(extension, name, linkUrl?)
tcb.share(method, contentId)
tcb.viewPromotion(id, name) tcb.selectPromotion(id, name)
tcb.viewSearchResults(term, count?)
tcb.track(eventName, params?)   // generic — fire any GA4 event
tcb.captureException(err, extra) // Sentry-style crash capture

Crash reports — Sentry-grade, with session context

Every crash is routed to the same event stream as your product analytics — so a purchase failure shows up next to the user's session_id, fingerprint, and ad source that brought them in. No second SDK, no separate bill.

import { captureException, getErrors } from "tracabit";

// Auto-capture (browser)
window.addEventListener("error", (e) =>
  captureException("tcb_live_...", e.error || e.message, { projectId: "tcb_proj_..." })
);

// Read stored reports (server-side)
const errs = await getErrors("tcb_live_...", { fatalOnly: true, limit: 50 });

Privacy-first, by architecture

┌─────────────────┐     POST /analytics      ┌──────────────────┐
│  Browser SDK    │  ── sendBeacon ──►       │  Tracabit Crude Engine │
│  (1 KB, 0 deps) │  ⇆ no cookies ⇆          │  (your VPC)      │
│                 │  no third-party JS        │                  │
└─────────────────┘                           └────────┬─────────┘
     ▲ passive djb2 fingerprint                 parity-resolved
     ▲ sessionStorage session                    Geo-IP (CDN header
     ▲ 5-provider Geo race (cached 30m)           or 5-provider race)
     ▲ auto scroll milestones + [data-track]
  • No cookies. Anonymous sessionStorage session IDs.
  • No PII leaked. Fingerprint is a passive djb2 hash over UA / language / screen / timezone / TZ — no identifiers.
  • No third-party JS. The geo race hits OneTrust / Cloudflare / ipapi.co only when an edge CDN header isn't available.
  • Self-host by default. Deploy the engine inside your VPC — your data never leaves your infrastructure.

Rich context — automatic, per event

Every beacons carries these automatically — no configuration, no schema:

| Field | Source | |---|---| | sessionId | sessionStorage (tcb_session), backed by in-memory fallback | | userId | localStorage (tcb_uid) via setUserId() | | country, region, city | Server CF-IPCountry / X-Vercel-IP-Country if available — else 5-provider client race cached 30m | | fingerprint | Passive djb2 hash, stable per-session | | language, screen, platform | navigator (browser only) | | pageTitle | document.title (browser only) | | referrer | document.referrer (validated against project allowlist) |

Runtime requirements

  • Node 18+ — for native fetch, AbortController, crypto.
  • Modern browsers — ES2020 (Chrome 80+, Firefox 75+, Safari 14+, Edge 80+).

No external runtime dependencies. The npm package contains only the compiled/minified bundles and type declarations.

Transport

  • Browsers: navigator.sendBeaconfetch({ keepalive: true }) fallback.
  • Node: native fetch.
  • Always fire-and-forget — never blocks the page or the request handler.

Backward-compatible report() API

import { report } from "tracabit";

await report("tcb_live_...", "page_view", {
  projectId: "tcb_proj_...",
  endpoint: "https://your-host/analytics",
  event: "page_view",
  eventParams: { page_title: "Landing" },
});

Community & resources


Tracabit — analytics that respects your users and improve your margins.

If your team ships product analytics, crash reports, or AI-agent data pipelines — Tracabit was written for you. Star the repo, file issues, and reach out. We build in public.