Fathom Analytics Fathom Analytics

How to use Fathom Analytics with Ember.js

Fathom Analytics works great with Ember.js. The Fathom dashboard is actually built using Ember.js, and setting up Fathom was super easy.

Open app/index.html and add the following code snippet just before the </head> tag. Make sure you put your own site ID / custom domain in.

<script src="https://cdn.usefathom.com/script.js" spa="auto" site="ABCDEF" defer></script>

In this snippet, we use spa="auto". This code tells Fathom to use HTML5 History API if it's available (pushstate, popstate routing etc.), and to fall-back to hash-based routing if it's not.

Being explicit

If you only use HTML5 History API or you use hash-based routing (like the Fathom Dashboard does), you can use the following values to explicitly tell Fathom not to try and guess.

Further customization

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