open-nomad/website/source/assets/javascripts/analytics.js

17 lines
424 B
JavaScript
Raw Normal View History

document.addEventListener('turbolinks:load', function() {
analytics.page()
track('.downloads .download .details li a', function(el) {
2018-03-08 20:31:17 +00:00
var m = el.href.match(/nomad_(.*?)_(.*?)_(.*?)\.zip/)
return {
event: 'Download',
category: 'Button',
label: 'Nomad | v' + m[1] + ' | ' + m[2] + ' | ' + m[3],
version: m[1],
os: m[2],
architecture: m[3],
product: 'nomad'
}
})
})