</head>
tag. Make sure you put your own site ID in.
data-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.
data-spa="history"
will tell Fathom to use HTML5 History APIdata-spa="hash"
will tell Fathom to listen to hashchange eventsdata-spa="auto"
on your Fathom script, we do the same thing. We’ll track pushstate / popstate etc. (HTML5 History API events) if they’re available on your visitor’s browser, and we’ll fall back to listening to “hashchange” if HTML5 History API isn’t available.
If you want to explicitly opt in for the type of routing you use, you can set the following values for the spa option in the script tag:
'none'
in EmberJS, Fathom will not work. We’ve not seen this done before, but it’s possible that some people will do it. This is when the URL doesn’t change at all. So check your site.
To learn about all the options we offer, read our advanced documentation here.