Nuxt Plausible is a native Nuxt module that integrates Plausible Analytics into Nuxt applications. It requires no configuration out of the box, automatically tracks page views, and exposes composables for manual event and pageview tracking.
What is Nuxt Plausible?
The @nuxtjs/plausible module brings Plausible Analytics to any Nuxt project. It injects the official Plausible tracker into the client (browser) so that page views are reported to a Plausible account, and it provides Vue composables (useTrackEvent and useTrackPageview) for custom event tracking. The module is developed by Johann Schopplich and published under the MIT license, with release activity continuing from 2022 to the present.
Key Features
- Zero configuration — The module works after adding it to the
modulesarray; it defaults the Plausible domain towindow.location.hostname. - Automatic event tracking — Outbound link clicks, file downloads (with a customizable list of file extensions), and form submissions can each be tracked automatically by enabling the corresponding option.
- Composables —
useTrackEvent()anduseTrackPageview()are auto-imported, client-only helpers for sending custom goals and manually recording page views, including support for revenue properties. - Ad-blocker bypass proxy — Set
proxy: trueto route all Plausible events through your Nitro server at the default/_plausibleendpoint, so requests never reach Plausible's domain directly. .envsupport — Runtime configuration values likeNUXT_PUBLIC_PLAUSIBLE_DOMAINlet you change settings without touching the Nuxt config.- SSR-ready — The tracker only runs on the client, and composables are safe to call on the server (they become no-ops).
- Sane defaults — Hostnames matching
localhostare ignored by default, andhashModecan be enabled for hash-based routing.
Who is it for?
- Nuxt developers who want a straightforward analytics integration without manual script setup.
- Site owners who want to avoid ad blockers suppressing their analytics, by enabling the module's proxy feature.
- Developers building custom analytics goals who need to track signups, purchases, or downloads through the
useTrackEventcomposable.
What can you do with Nuxt Plausible?
- Track custom goals — Call
useTrackEvent('signup')to report a goal, optionally passing properties or revenue data (e.g., amount and currency). - Manually record page views — Use
useTrackPageview({ url: '/virtual-page' })for single-page-app routing or virtual page paths. - Customize tracked file downloads — Pass
fileDownloads: { fileExtensions: ['pdf', 'zip', 'csv'] }to limit which file types count as downloads. - Proxy Plausible through your own domain — Enable the proxy and set a custom base endpoint if needed.
How does Nuxt Plausible work?
- Add the module via
npx nuxt module add plausibleor by listing'@nuxtjs/plausible'in themodulesarray ofnuxt.config.ts. - The module injects Plausible's script on the client, pulling settings from module options or runtime environment variables.
- The tracker sends page view events to
https://plausible.io(or your configuredapiHost), and, if the proxy is enabled, to your Nitro server first.








