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" class="released"
:title="releasedString" :title="releasedString"
:href="commitUrl" :href="commitUrl"
target="_blank"> target="_blank"
@click="releasedClick">
{{ releasedRelativeString }} {{ releasedRelativeString }}
</a> </a>
</div> </div>
<div class="buttons"> <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> <span class="mdi mdi-download"></span>
</a> </a>
</div> </div>
@ -40,6 +46,20 @@ export default {
type: String, 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: { computed: {
releasedString() { releasedString() {
return moment(this.released).format('dddd, D MMM YYYY HH:mm:ss'); return moment(this.released).format('dddd, D MMM YYYY HH:mm:ss');