Log in to your Fathom account
Go to Settings → Sites, then choose your site or create one if you haven’t already
Click on the Install tab, then copy the script
It’ll look something like this:
Note: If you’re copying the below example script (or any of the other example scripts on this page), make sure to replace the dummy Site ID with your own Site ID. It can be found in your site settings.
Because Discourse comes with a canonical link to your homepage, baked into the default/core setup, you’ve got to tell your Fathom script to ignore canonicals by adding data-canonical="false" to your script.Here’s an example script with that added:
Discourse is a single-page app (SPA), which means it dynamically loads new content without reloading the page. To handle that, you have to enable SPA mode via your Fathom script by adding data-spa="auto", like so:
Note: If you’re not seeing any data appear in your dashboard, ensure that you have any ad-blockers or VPN’s you’re using temporarily disabled, as they may be blocking the Fathom script.