Add dev master item logging

This commit is contained in:
Dominik Korsa 2019-03-03 13:55:38 +01:00
parent 389e8ce10b
commit 1cf8ed82d1

View file

@ -7,12 +7,18 @@
class="released"
:title="releasedString"
:href="commitUrl"
target="_blank">
target="_blank"
@click="releasedClick">
{{ releasedRelativeString }}
</a>
</div>
<div class="buttons">
<a class="download-button" :href="download" target="_blank" title="Download">
<a
class="download-button"
:href="download"
target="_blank"
title="Download"
@click="downloadClick">
<span class="mdi mdi-download"></span>
</a>
</div>
@ -40,6 +46,20 @@ export default {
type: String,
},
},
methods: {
releasedClick() {
this.$ga.event({
eventCategory: 'dev-master-item',
eventAction: 'released-click',
});
},
downloadClick() {
this.$ga.event({
eventCategory: 'dev-master-item',
eventAction: 'download-click',
});
},
},
computed: {
releasedString() {
return moment(this.released).format('dddd, D MMM YYYY HH:mm:ss');