Skip to main content
Support home / Script Settings

Add the embed script

To start using Fathom Analytics, you simply have to add a single line of code to the header section of your website (where “ABCDEFG” is your actual Site ID):

<script src="https://cdn.usefathom.com/script.js" data-site="ABCDEFG" defer></script>

Creating or retrieving your embed code

  • Log into Fathom.
  • Click Settings, then Sites.
  • If you create a new site, add your site name in Add site, give it a name, and click Create Site. Copy your embed code and paste it into the head section of your site.
  • If you need the embed code for an existing site, click on the site name, then copy your embed code (on the Install tab) and paste it into the head section of your site.

You then need to verify that your script is installed correctly.

Site firewall settings

See site firewall settings to learn more about blocking pages, blocking IPs, blocking countries, and blocking domains.

Advanced script setting and frameworks

See advanced script settings to learn more about ignoring canonicals, honouring DNT, SPAs and more.

If you’re using WordPress, another CMS, or a framework, see the instructions for integrations. If your CMS or framework isn’t listed, simply add the code to the head section of your site or header template.


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?