Change when the script is loaded
By default, our script is deferred, meaning our script loads once your HTML has finished loading. That means our script doesn’t affect your site load time or speed in any way (fast sites == better search engine rankings). You can also swap outdefer
with async
or just load it without either, but we don’t advise this. Instead, this is how our code should be most commonly used:
Honouring Do Not Track (DNT)
By default, we collect data on every visitor to your website, regardless of them having DNT turned on or not. That’s because Fathom is privacy-focused analytics, so nothing personal or identifiable is ever “tracked.” Plus, DNT is deprecated and no longer recommended by any browser. That said, if you would like to honor DNT then update your code to includedata-honor-dnt="true"
:
Disable automatic tracking
By default, we collect a page view every time a visitor to your website loads a page with our script on it. If you don’t want that functionality, you can turn it off by usingdata-auto="false"
:
Ignore canonicals
If there’s a canonical URL in place, we use it instead of the current URL. This is what most customers want, and it’s why it’s the default. If you want to use the current URL, even if there’s canonical (ignoring the canonical), then usedata-canonical="false"
: