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

sentalong

v0.2.0

Published

Sentalong affiliate tracking for web apps and Node backends — capture partner clicks, attribute signups.

Readme

sentalong

Affiliate tracking for web apps and Node backends, on the Sentalong platform: capture partner clicks (?via=handle), persist the click id, and attribute signups. The npm sibling of the <script src="…/t.js"> snippet — use this when you'd rather import than paste a script tag.

npm install sentalong

Browser (SPA) quickstart

import { configure, capture, identify } from "sentalong";

// Once, at app startup:
configure("https://YOUR-SENTALONG-HOST", "prg_XXXXXXXX");

// On page load / route change — records a click when ?via= is present:
capture();

// At signup — ties the click to the new account and returns the referral id:
const referralId = await identify(user.email, { externalId: user.id });

The click id is persisted in localStorage for the program's cookie window (first-click programs keep the original; last-click overwrites, matching the server's attribution model). Visiting with ?via=test pings the server as a dry run — it logs Sentalong: test click received, records nothing, stores nothing, and lets Settings → Tracking's Run checks confirm the install.

Node backend

If your signup happens server-side, forward the click id from the browser (getClickId()) with the signup request and attribute it there:

import { identifyClick, qualifyClick } from "sentalong";

const referralId = await identifyClick({
  baseUrl: "https://YOUR-SENTALONG-HOST",
  cid,                       // sent by your frontend
  email: newUser.email,
  externalId: newUser.id,
});

// Pay-per-lead programs — mark the lead qualified when it actually is:
await qualifyClick({ baseUrl, cid, stage: "onboarded" });

Store the returned referralId on your billing customer (Stripe metadata key via_referral_id) for the strongest invoice matching.

Behavior notes

  • Every call is fail-safe: network errors return null/false, never throw (except calling before configure, which throws immediately by design).
  • No fingerprinting, no device identifiers, no third-party cookies — the SDK sends only the fields you see above.
  • Ad-click ids (gclid, fbclid, ttclid, twclid, li_fat_id, msclkid) and partner campaign tags (sub_id) are picked up from the URL automatically when present.

MIT — see LICENSE. Mobile apps: see the Sentalong SDKs for React Native, Flutter, Android, and iOS.