If you have Turbolinks or Turbo in your Rails project, only the first page view would be counted and tracked by Fathom Analytics. Here is how you can make use of load
event to track the page views.
For turbolinks:
document.addEventListener("turbolinks:load", function() {
if (window.fathom) {
window.fathom.trackPageview()
}
})
For turbo:
document.addEventListener("turbo:load", function() {
if (window.fathom) {
window.fathom.trackPageview()
}
})
I had recently confirmed the same with Fathom team:
and looks like this is the way to go:
Top comments (0)