Fathom Analytics

How to use Fathom Analytics with Nuxt.js

It's easy to get Fathom Analytics working with Nuxt.js.

  1. Create app.html in your project directory if it doesn't already exist
  2. Add the following code to it (make sure to add your Site ID and custom domain, if you have one)
<!DOCTYPE html>
<html {{ HTML_ATTRS }}>
    <head {{ HEAD_ATTRS }}>
        {{ HEAD }}
        <script src="https://cdn.usefathom.com/script.js" data-site="ABCDEFG" data-spa="auto" defer></script>
    <body {{ BODY_ATTRS }}>
        {{ APP }}

Then you can recompile, and you're ready to roll. Super simple, right?

Further customization

To learn about all the options we offer, read our advanced documentation here.