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

@superbiche/nuxt-umami-cnil

v0.1.1

Published

Nuxt module for self-hosted Umami under the CNIL audience-measurement exemption: no query strings, origin-only referrers, no ids, visitor opt-out, correct page titles.

Readme

@superbiche/nuxt-umami-cnil

Nuxt 3/4 module for a self-hosted Umami that follows the CNIL audience-measurement exemption profile:

  • page URLs are sent without query string or hash (no UTM parameters, no ad click IDs);
  • an external referrer is reduced to its origin and only the landing view carries it; internal referrers are dropped;
  • no distinct id is ever sent;
  • the visitor can object: the choice is stored in localStorage (umami.disabled, Umami's own flag) and enforced at the send boundary, including for calls queued while the script was still loading;
  • each page view carries its own title (sent once Nuxt has written the new page's head, not before).

It loads Umami's own script.js with automatic tracking off and drives it from the router, with a data-before-send hook applied to every payload.

Install

npm install @superbiche/[email protected] --save-exact
// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@superbiche/nuxt-umami-cnil'],
  umamiCnil: {
    scriptUrl: 'https://analytics.example.com/script.js',
    websiteId: '00000000-0000-0000-0000-000000000000',
    // Optional: only send from these hostnames.
    domains: ['example.com', 'www.example.com'],
  },
})

Every option is also public runtime config, so it can be set per environment: NUXT_PUBLIC_UMAMI_CNIL_SCRIPT_URL, NUXT_PUBLIC_UMAMI_CNIL_WEBSITE_ID, NUXT_PUBLIC_UMAMI_CNIL_ENABLED=false (e.g. for preview builds). Without a valid script URL and website id the module does nothing.

| Option | Default | | |---|---|---| | enabled | true | false: never measure. | | scriptUrl | '' | https://…/script.js (plain https host and path). | | websiteId | '' | Umami website id (UUID). | | domains | [] | data-domains; empty: any hostname. | | legacyOptOutKeys | [] | Older localStorage flags (value '1') that still count as an objection. | | beforeSendName | 'umamiCnil' | Global name of the before-send hook. |

Use

const umami = useUmamiCnil()

umami.trackEvent('newsletter_signup', { source: 'footer' })

// Privacy page: let the visitor object (client-side, e.g. in onMounted).
const measured = ref(!umami.isOptedOut())
function toggle(on: boolean) {
  const persisted = umami.setOptedOut(!on) // false: storage blocked, choice holds for this visit only
  measured.value = on
}

Event data must not identify a person (no emails, names, order numbers, user ids, typed search terms).

A website chosen at runtime (e.g. from a CMS payload) takes precedence over the build config; set it before the first page finishes rendering, e.g. in a client plugin:

export default defineNuxtPlugin(() => {
  useUmamiCnilSite().value = { scriptUrl, websiteId }
})

The framework-free core (before-send hook, opt-out store, controller) is exported from @superbiche/nuxt-umami-cnil/core.

Privacy notice

The exemption also requires telling visitors. State at least: the tool and who hosts it, what is collected (pages, referrer domain, device and browser type, country, events), that no cookie is set and no IP is stored, the retention period, and how to object (link to the toggle).

License

MIT