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

@tracelog/capture-core

v2.4.0

Published

The TraceLog capture engine, with no DOM and no browser global: what platform artifacts bind inside sandboxes that have neither.

Readme

@tracelog/capture-core

The TraceLog capture engine, with no DOM and no browser global. It is what a platform artifact binds inside a sandbox that has neither — TraceLog's Shopify web pixel is one — and what @tracelog/capture-web is built from.

Most sites do not want this package. A site you add a script to, or one with its own build, installs @tracelog/capture-web, which carries this engine inside it and adds the browser: its storage, its network, the page's errors and lifecycle, the verification handshake and the clock. Reach for capture-core only where there is no browser to assume.

TraceLog is conversion intelligence you can verify: it checks the conversion path a project declares against the events TraceLog receives, watches every declared step every day, alerts when events for one stop arriving and names the TraceLog figures that are incomplete. https://tracelog.io

Install

Every integration names a version, exactly. Install with --save-exact, so your manifest names this version rather than a range: the version you pin is the code you get.

npm install --save-exact @tracelog/[email protected]

What it expects you to supply

The engine assumes nothing about its host, so the host supplies four things, and may supply a fifth:

  • storage — getItem, setItem, removeItem. A sandbox with no storage supplies an in-memory one; a denial is one remembered key.
  • a transport — one send, returning the status the endpoint answered.
  • a clock — now(): Date. This package never reads the machine's, because in a sandbox there may not be one to read.
  • the acquisition context — referrer, campaign, landing page, device.
  • tag sightings, optionally — a TagSightingPort that reports which tags the page requested around an instant. Without one, conversions are sent unheld and report none. From 1.2.0 it may also say which kinds it saw requested and could not read.

Consent comes first: before a consent decision the engine creates no identifier, no storage and no traffic. A denial is remembered; a grant is not, so the host grants on every load while consent stands.

What the host calls

engine is the capture surface — init, consent, step, conversion — and the runtime beside it carries the host's own calls. open() says this page is a page of the visit: once consent is granted the session opens there if none is open, and the page counts as activity either way; the host calls it once per page. pageRestored() says the page came back from the browser's cache and is a page of the visit again. A host that calls neither opens its session on its first step, conversion or error, as before 2.3.0. flush, captureError, drops and circuitState are the host's too.

The wire format

Events leave in the envelope @tracelog/event-contract defines, at the version this package was built against — one definition, shared by the runtime that sends and the endpoint that receives.

Licence

MIT. See LICENSE.