packer-cn/website/source/assets/javascripts/analytics.js

15 lines
418 B
JavaScript
Raw Normal View History

document.addEventListener('DOMContentLoaded', function() {
track('.downloads .download .details li a', function(el) {
var m = el.href.match(/packer_(\d+\.\d+\.\d+)_(.*?)_(.*?)\.zip/)
2018-03-08 15:43:41 -05:00
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'
2018-03-08 15:43:41 -05:00
}
})
})