Support home / Integrations

Nuxt.js

It's easy to get Fathom Analytics working with Nuxt.js, and we've been fortunate to have customers help us write this documentation.

Note: If you are using Nuxt 2, a member of the Fathom community built a Fathom Analytics plugin for Nuxt 2:

Step 1: Install the Nuxt module

One of our customers, Valgeir, has created a Nuxt module that makes it super easy to set up Fathom in your Nuxt app. The unofficial plugin can be found here. To install, run one the following commands (select the command that uses your chosen package manager):

# pnpm
pnpm add -D nuxt-fathom
 
# npm
npm i -D nuxt-fathom
 
# yarn
yarn add -D nuxt-fathom

Step 2: Adding the module

Add nuxt-fathom to the modules section of your Nuxt configuration and provide your Fathom site ID:

// `nuxt.config.ts`
export default defineNuxtConfig({
modules: ["nuxt-fathom"],
 
fathom: {
siteId: "FATHOM_SITE_ID",
},
});

Step 3: Additional configuration

Under the hood, this module uses fathom-client, which provides some configuration options. You can see those options here.

And now you're ready to roll!

A huge thanks to Charlie Joseph for writing this guide on his personal website.


If you still have questions or require help with anything, please reach out to us and we'll happily get things sorted out for you.


Can't find what you're looking for?