You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
packer/website/source/assets/javascripts/analytics.js

17 lines
437 B

document.addEventListener('turbolinks:load', function() {
analytics.page()
track('.downloads .download .details li a', function(el) {
var m = el.href.match(/packer_(\d+\.\d+\.\d+)_(.*?)_(.*?)\.zip/)
return {
event: 'Download',
category: 'Button',
label: 'Packer | v' + m[1] + ' | ' + m[2] + ' | ' + m[3],
version: m[1],
os: m[2],
architecture: m[3],
product: 'packer'
}
})
})