diff --git a/website/source/assets/javascripts/analytics.js b/website/source/assets/javascripts/analytics.js index 4cfbb8e92..9482db4aa 100644 --- a/website/source/assets/javascripts/analytics.js +++ b/website/source/assets/javascripts/analytics.js @@ -1,5 +1,6 @@ -document.addEventListener('DOMContentLoaded', function() { - track('.downloads .download .details li a', function(el) { +document.addEventListener('turbolinks:load', function() { + analytics.page() + var m = el.href.match(/nomad_(.*?)_(.*?)_(.*?)\.zip/) return { event: 'Download', diff --git a/website/source/layouts/layout.erb b/website/source/layouts/layout.erb index cc4b9a7c6..456202699 100644 --- a/website/source/layouts/layout.erb +++ b/website/source/layouts/layout.erb @@ -35,25 +35,18 @@