Add beta item logging
This commit is contained in:
parent
fa5e4eb419
commit
79421f71cf
1 changed files with 45 additions and 4 deletions
|
@ -1,18 +1,29 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="download-beta-item">
|
<div class="download-beta-item">
|
||||||
<div class="code"><a :href="github" target="_blank">{{ code }}</a></div>
|
<div class="code"><a :href="github" target="_blank" @click="codeClick">{{ code }}</a></div>
|
||||||
<a
|
<a
|
||||||
class="released"
|
class="released"
|
||||||
:title="releasedString"
|
:title="releasedString"
|
||||||
:href="`https://github.com/wulkanowy/wulkanowy/tree/${code}`"
|
:href="`https://github.com/wulkanowy/wulkanowy/tree/${code}`"
|
||||||
target="_blank">
|
target="_blank"
|
||||||
|
@click="releasedClick">
|
||||||
{{ releasedRelativeString }}
|
{{ releasedRelativeString }}
|
||||||
</a>
|
</a>
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<a class="github-button" :href="github" target="_blank" title="GitHub">
|
<a
|
||||||
|
class="github-button"
|
||||||
|
:href="github"
|
||||||
|
target="_blank"
|
||||||
|
title="GitHub"
|
||||||
|
@click="githubClick">
|
||||||
<span class="mdi mdi-github-circle"></span>
|
<span class="mdi mdi-github-circle"></span>
|
||||||
</a>
|
</a>
|
||||||
<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 +51,36 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
codeClick() {
|
||||||
|
this.$ga.event({
|
||||||
|
eventCategory: 'beta-item',
|
||||||
|
eventAction: 'code-click',
|
||||||
|
eventLabel: this.code,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
releasedClick() {
|
||||||
|
this.$ga.event({
|
||||||
|
eventCategory: 'beta-item',
|
||||||
|
eventAction: 'released-click',
|
||||||
|
eventLabel: this.code,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
githubClick() {
|
||||||
|
this.$ga.event({
|
||||||
|
eventCategory: 'beta-item',
|
||||||
|
eventAction: 'github-click',
|
||||||
|
eventLabel: this.code,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
downloadClick() {
|
||||||
|
this.$ga.event({
|
||||||
|
eventCategory: 'beta-item',
|
||||||
|
eventAction: 'download-click',
|
||||||
|
eventLabel: this.code,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
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');
|
||||||
|
|
Loading…
Reference in a new issue