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

@traxel/sdk

v0.1.0

Published

Analytics SDK for Chrome MV3 extensions. Survives service worker termination. The analytics platform built specifically for Chrome extensions — not a website analytics tool ported to MV3.

Readme


Why Traxel exists

GA4, Mixpanel, Amplitude, PostHog — none of them understand Chrome extensions.

  • Uninstalls are invisible. chrome.runtime.setUninstallURL is unknown to web analytics.
  • Retention model is wrong. GA4 anchors to sessions. Extensions need install-date cohorts.
  • Remote code is banned. MV3 prohibits loading gtag.js or any remotely-hosted JS.
  • Events vanish silently. The service worker dies after 30 seconds idle. If your in-memory buffer isn't flushed before then, those events disappear. No warning. No retry.

Traxel is purpose-built for these constraints. Storage-backed queue. Alarm-driven flush cycle synced to the SW idle timer. Install-date-anchored retention. Native uninstall tracking.

Quick start

1. Install

npm install @traxel/sdk

2. Add to your service worker

In background.js (or background.ts), add this at the very top — before any await:

import Traxel from '@traxel/sdk';

// Must be synchronous, before any await in your SW
Traxel.init({ projectId: 'YOUR_PROJECT_ID' });

That's it. Traxel automatically tracks:

| Event | Trigger | |-------|---------| | install | First install (chrome.runtime.onInstalled) | | update | Extension updated (with previous version) | | uninstall | User uninstalls (chrome.runtime.setUninstallURL) | | sw_cold_start | Service worker woken from idle termination | | sw_termination | Service worker about to be killed | | error | Unhandled errors and promise rejections | | session_start / session_end | Popup/options/side panel open and close |

3. Track custom events

import Traxel from '@traxel/sdk';

Traxel.init({ projectId: 'YOUR_PROJECT_ID' }); // idempotent — safe everywhere

Traxel.track('export_clicked', { format: 'csv', row_count: 150 });
Traxel.track('shortcut_used', { shortcut: 'Ctrl+S' });
Traxel.track('feature_toggled', { feature: 'dark_mode', enabled: true });

Event names can be any string up to 100 characters. Properties must be strings, numbers, booleans, or null — no nested objects, no arrays, no PII.

4. Make sure your manifest has these permissions

{
  "permissions": ["storage", "alarms"],
  "background": {
    "service_worker": "background.js",
    "type": "module"
  }
}

The SDK needs storage for the event queue and alarms for the flush timer. The SW must be a module ("type": "module") to use import syntax.

Configuration

Traxel.init({
  projectId: 'YOUR_PROJECT_ID',     // Required

  // Optional — sensible defaults below
  apiEndpoint: 'https://...',       // Default: Traxel cloud ingest
  flushIntervalSeconds: 28,         // Default: 28s (just under SW idle timer)
  maxQueueSize: 150,                // Default: 150 events
  maxBatchSize: 25,                 // Default: 25 events per flush
  debug: false,                     // Set to true for console logs

  // Auto-tracking toggles
  trackErrors: true,                // Capture unhandled errors
  trackSWHealth: true,              // SW cold start + termination telemetry
  trackSessions: true,              // Popup open/close tracking

  // Uninstall survey
  uninstallSurveyUrl: 'https://...', // Users see this after uninstalling

  // Default properties on every event
  defaultProperties: { plan: 'pro' },

  // A/B flags — passed through to every event
  flags: { experiment_v2: 'variant_b' },
});

What you get

Go to traxel-theta.vercel.app to see:

  • Install & uninstall trends — daily net, cumulative totals
  • DAU/WAU/MAU — anchored to install date, not session
  • Retention cohorts — D1 / D7 / D14 / D30 / D60 / D90 per weekly install cohort
  • Feature usage — every Traxel.track() call ranked by volume, with 7-day trend
  • Error monitor — unhandled errors grouped by message, with affected users and versions
  • SW health — cold start count, P50/P95 latency, termination rate
  • Update funnel — what % of users are on each extension version
  • Live stream — events from your extension appear in real-time via WebSocket

Architecture

Your Extension (MV3)
  └── @traxel/sdk (< 8 KB gzipped)
        ├── EventQueue (chrome.storage.local backed)
        ├── Flusher (chrome.alarms, survives SW termination)
        ├── IdentityManager (anonymous UUID, never PII)
        └── HTTP transport → Traxel Ingest API

Traxel Ingest (Cloudflare Workers, global edge)
  └── Validates → writes to database

Traxel Dashboard (Next.js)
  └── All your charts, cohorts, and live events

Bundle size

The SDK adds ~3.8 KB gzipped to your extension. Zero runtime dependencies — pure Chrome APIs + fetch(). The flush alarm wakes the service worker at most once every 28 seconds, well within Chrome's lifetime budget.

Privacy

Traxel never collects browsing history, URLs, page content, or any personally identifiable information. A random anonymous UUID is generated per install — stable across sessions, but never linked to any identity, Google account, or browser fingerprint. Extension policy-compliant by design.

License

MIT