[ Web Proxy ]
URL:
Viewing: https://usefathom.com/docs/integrations/ember [Back]  [Original]

Ember.js - Fathom Analytics Skip to main content
Fathom Analytics [Fathom Analytics]
Product Why Fathom Pricing Resources
Free trialLogin
Fathom Analytics [Fathom Analytics]
Support home / Integrations

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 in.

<script src="https://cdn.usefathom.com/script.js" data-spa="auto" data-site="YOUR-SITE-ID" defer></script>

In this snippet, we use data-spa="auto". This code tells Fathom to use HTML5 History API if its available (pushstate, popstate routing etc.), and to fall-back to hash-based routing if its 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

Out of the box, without any extra configuration, EmberJS uses auto mode. This means that EmberJS will attempt to use the HTML5 History API, but will fallback to hashes if its not available.

When you set data-spa="auto" on your Fathom script, we do the same thing. Well track pushstate / popstate etc. (HTML5 History API events) if theyre available on your visitors browser, and well fall back to listening to hashchange if HTML5 History API isnt 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:

If you have set locationType to 'none' in EmberJS, Fathom will not work. Weve not seen this done before, but its possible that some people will do it. This is when the URL doesnt change at all. So check your site.

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


If you still have questions or require help with anything, please reach out to us and we'll happily get things sorted out for you.

Search...:
Fathom Analytics [Fathom Analytics]

We've counted billions of pageviews for thousands of customers, all without ever compromising anyone's digital privacy. We hope you'll join us.

2018-2026 Fathom Analytics.

Get started

Learn

Our software

Legal

Details


Web Proxy Viewer  |  New URL  |  Original Page