virling Pricing Self-host Demo Changelog Agencies GitHub Start free trial
blog / 2026-11-22

npm package traffic to customers: which package registry visits turn into paying users

By Devendra Variya, co-founder of Virling. Published 2026-11-22, updated 2026-12-01.

To see which npm package traffic turns into customers, join the visits that reach your site from npmjs.com, pypi.org and crates.io, or from links you tagged in your README, to the payments those visitors make later. Put UTM tags on the README and homepage links in your package, add a tracking script that keeps the referrer, pass the visitor ID into checkout, and connect your payment provider. Download counts cannot answer this: they include CI runs, mirrors and installs as a dependency, and the registries do not see who visits your site or pays.

For a developer tool with a paid tier, the package page is often where a buyer first meets you. They find the package in a search or a dependency list, read the README, install it, and only visit your site when they need the hosted version, a higher limit or support. The payment can come weeks after that first install, so the revenue has to be measured on your side, over a long enough range.

How a package registry visit is recognized

  • The referrer. A click on a link on a package page usually arrives with the registry host as the referrer: npmjs.com, pypi.org or crates.io. None of them is a known search, AI, community or social host, so in Virling each lands in the Referral channel and shows under its own domain in the Source tab.
  • Only the origin. Browsers send only the origin to another site by default, so you see the registry but not which package or which link was clicked. If you publish several packages, every click from all of them looks the same. Docs hosted elsewhere, such as docs.rs for crates or a project site on github.io, send their own host and are their own row.
  • No referrer at all. The same README is shown on GitHub, inside editors and in the package folder on disk, and links copied from it, printed by your CLI or opened from a terminal arrive with no referrer. With no referrer, Virling reads utm_source, and when that is missing it reads ref. A tagged click lands in Referral with its campaign; an untagged one is Direct.
  • Installs are not visits. npm install, pip install and cargo add fetch the package from the registry without opening your site. Only a visit to your site can be joined to a payment, which is why the links inside the package matter more than the install count.

Why README links are the main lever

The README is the one page you control on every registry, and the homepage field is the one link the registry shows next to it. Everything a developer reads before they reach your site comes from those two places. A tagged link there keeps its source and placement whether it is clicked on npmjs.com, on GitHub, in an editor or after being copied into a chat. On npm, PyPI and crates.io the README and package metadata are read from the version you publish, so a changed link appears with your next release.

Set up package registry revenue tracking

  1. Tag the README and homepage links. Use one utm_source per registry and one utm_campaign per placement, since the Campaign tab is where placements are split:
    npm README:          https://yourdomain.com/?utm_source=npm&utm_medium=referral&utm_campaign=readme
    npm homepage field:  https://yourdomain.com/?utm_source=npm&utm_medium=referral&utm_campaign=package-homepage
    PyPI README:         https://yourdomain.com/?utm_source=pypi&utm_medium=referral&utm_campaign=readme
    crates.io README:    https://yourdomain.com/?utm_source=crates&utm_medium=referral&utm_campaign=readme
    CLI output:          https://yourdomain.com/?utm_source=cli&utm_medium=referral&utm_campaign=upgrade-hint
    The homepage field is homepage in package.json, Homepage under [project.urls] in pyproject.toml, and homepage in Cargo.toml. Keep the values lowercase and the same everywhere. Do not use utm_medium=email or cpc, which move the visit into Email or Paid. If one README is published to both a registry and GitHub, pick one source for it and let the referrer tell the hosts apart. The UTM builder makes the links, and which UTM parameters to use covers naming.
  2. Add the script. Put the Virling tag in the <head> of every page your links point to, including docs and pricing pages. It records the referrer and tags of the first pageview and sets the visitor cookie. See add the script, and framework guides for Next.js, Astro, WordPress, Framer and Webflow.
  3. Connect a payment provider. Virling reads payments from Stripe, Paddle, Lemon Squeezy, Polar, Dodo Payments, Creem, RevenueCat, Shopify and WooCommerce; all of them are on the integrations page, with setup in the payments docs.
  4. Pass the visitor ID into checkout. If you use Stripe Payment Links, Polar checkout links or Dodo Payments links, the script adds the ID on click. For a checkout you create on your server, pass the virling_vid cookie, for example as client_reference_id on a Stripe Checkout Session. See link checkout to visits. Without this step you get visits but no revenue.

Then click the README link on your package page in a private window and make a test payment, and check that the visit shows under the registry and the payment is matched. How channels are decided lists every rule, and test your setup walks through the check.

Start free trial

Why the payment comes weeks after the install

A developer installs a package to try it, not to buy. They build with the free version, and come back to your site when a project needs what the paid tier adds. Often that return is through search, your docs or a typed URL, not the package page. Under the default model, last non-direct inside a 90-day lookback window, a later search visit takes the credit; under first touch, the registry visit that introduced them keeps it.

  1. Pick a range of at least a few months.
  2. In the Channels card, switch to the Source tab and find npmjs.com, pypi.org or crates.io. Each row shows visitors, revenue and revenue per visitor. Click a row to filter the whole page and see where those visitors landed.
  3. Switch to the Campaign tab to split README, homepage and CLI links, including tagged clicks that arrived with no referrer.
  4. Compare the default model with first touch over the same range. If registry revenue grows under first touch, developers found you through the package and paid after coming back another way.
  5. The Time to pay card shows the median days from first visit to first payment per channel, so you do not judge the registry before its buyers have had time to pay.

A worked example: four package links in one month

Example data, made up to show the method. An imaginary npm package has a hosted tier at $18 a month or $180 a year, and four tagged links that lead from the package to its site: the homepage field on the package page (package-homepage), the badge at the top of the README (readme), the upgrade hint its CLI prints when a free limit is hit (upgrade-hint), and the links in its changelog (changelog). The CLI link uses utm_source=cli and the other three utm_source=npm, as in the setup above, and the Campaign tab splits all four whether the click came from npmjs.com, an editor or a terminal. Signups are counted with a goal, and revenue is the first payment of each new paying customer credited to the link in the month.

LinkVisitsSignupsPaying customersRevenueVisit to paid
Package page homepage link1,480526$2700.41%
README badge860192$360.23%
CLI upgrade hint3954713$1,2063.29%
Changelog links270145$4141.85%
All four3,00513226$1,9260.87%

The homepage link brings almost half the visits but only six customers, five of them monthly: many of those visitors are still choosing a package. The README badge brings two monthly customers from 860 visits. The CLI hint brings about a quarter of the homepage link’s visits and $1,206, more than the other three together, because it appears at the moment a developer runs into the limit the paid tier lifts, and six of its thirteen customers paid for a year. The changelog is read by people who already depend on the package, and two of its five customers chose the yearly plan. If a row looks off, paste its tagged link and the referrer you expect into the traffic source checker to see which channel and campaign it is credited to.

For the rest of the developer path, see GitHub revenue tracking, docs revenue tracking and Virling for developer tools. Model and lookback window explains the credit rules. Answers that mention your package are covered in Stack Overflow traffic revenue, and if your tool is also listed in an app store or plugin directory, see tracking an app marketplace listing. If you sell through Polar, Polar for open source projects has a tagging plan for README, release and package links.

What to check when the numbers look wrong

  • The registry rows are small but Direct is large. Clicks from terminals, editors and copied links with no referrer and no tag. Tag the README, homepage and CLI links, and publish a release so the registry shows them.
  • The Campaign tab has rows the Source tab does not. Tagged clicks with no referrer count in Referral and in their campaign, but not in a registry source row. Read the campaigns for placements and the source rows for clicks from the registry itself.
  • Visits but no revenue at all. Check the Matched revenue line under the Overview numbers. If a large share of revenue is unmatched, the visitor ID is not reaching checkout. See Unattributed revenue.
  • High downloads, few visits. Installs as a dependency and from CI never open your site. Only developers who click through can become customers you can measure.

Frequently asked questions

Does my npm package bring paying users?

Only your own site can tell you. Registry download counts include CI runs, mirrors and installs as a dependency, and npm, PyPI and crates.io do not see who visits your website. Add the tracking script, pass the visitor ID into checkout and connect your payment provider, then read the npmjs.com, pypi.org and crates.io rows and your tagged registry campaigns for visitors, customers and revenue.

How do visits from npmjs.com, pypi.org and crates.io show up?

A click from a package page usually arrives with the registry host as the referrer. None of them is on a known list, so each lands in the Referral channel under its own domain. Browsers send only the origin by default, so you see the registry but not the package. A click with no referrer and no tag is Direct.

Do installs from the command line count as visits?

No. npm install, pip install and cargo add fetch the package from the registry without opening your site, so they never reach Virling. Only a visit to your site, from the package page, the README, the docs or a link printed by your tool, can be joined to a later payment.

Why tag README links if the referrer already shows the registry?

The referrer names the registry, not the package or the link. The same README is shown on the registry, on GitHub and inside editors, and links copied from it or printed in a terminal arrive with no referrer. A utm_source and one utm_campaign per placement keep the source and placement in both cases.

Does the registry get credit if a developer pays weeks after the first install?

Yes, if their visit from the package page or README is inside the lookback window, 90 days by default, and no later non-direct visit took the credit. Switch the model to first touch to credit the visit that introduced the buyer. A visit in another browser or device cannot be tied to the same person.

See which package registry visits paid

Virling is open source under AGPL. Self-host it free, or use the hosted version with a 14-day free trial. It connects to Stripe, Paddle, Shopify, WooCommerce, Polar, LemonSqueezy, Dodo, Creem and RevenueCat.

Start free trial See the demo