Fathom Analytics Fathom Analytics

How to use Fathom Analytics with Single Page Applications

Out of the box, our default tracking code should work great. If you're using another frontend framework, ultimately you just need to find a way to get the HTML into it, and you'll be ready to go. We monitor pushstate, popstate etc., and we'll track the first page load automatically.

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

Further customization

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