Fathom Analytics Fathom Analytics

The canonical link is king

Before we dive into this, we want to explain that this isn't a common issue but we've seen it happen in Single Page Applications (SPA) and in other rare situations. For 99% of our users, you don't have to worry about this article.

When Fathom tracks page views, it looks at window.location to determine the full URL of the page.

window.location.hostname // e.g. usefathom.com
window.location.pathname // e.g. /support/cannonical-links

But if you have a canonical link tag in your code, the value there will override everything.

For example, if you had the following code on all of your pages:

<link rel="canonical" href="https://www.yourwebsite.com/">

We would always track https://www.yourwebsite.com/ regardless of whether you were on /about, /contact or any other page. This is because canonical is considered to override everything. You can read more about Canonical Links here.

So if you're navigating round your site and only seeing a single path in your dashboard, chances are you have a canonical link issues.

If you ever need any help, you know where to find us!

← Return to support