Add dev item logging
This commit is contained in:
parent
79421f71cf
commit
389e8ce10b
1 changed files with 45 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="download-dev-item">
|
<div class="download-dev-item">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<a :href="github" target="_blank">
|
<a :href="github" target="_blank" @click="titleClick">
|
||||||
<span class="title">{{ title }}</span>
|
<span class="title">{{ title }}</span>
|
||||||
<span class="number"> #{{ number }}</span>
|
<span class="number"> #{{ number }}</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -12,17 +12,28 @@
|
||||||
class="released"
|
class="released"
|
||||||
:title="releasedString"
|
:title="releasedString"
|
||||||
:href="`https://github.com/wulkanowy/wulkanowy/pull/${number}/commits/${commit}`"
|
:href="`https://github.com/wulkanowy/wulkanowy/pull/${number}/commits/${commit}`"
|
||||||
target="_blank">
|
target="_blank"
|
||||||
|
@click="releasedClick">
|
||||||
{{ releasedRelativeString }}
|
{{ releasedRelativeString }}
|
||||||
</a>
|
</a>
|
||||||
<img class="avatar" :src="avatar" />
|
<img class="avatar" :src="avatar" />
|
||||||
<span class="user">{{ user }}</span>
|
<span class="user">{{ user }}</span>
|
||||||
</div>
|
</div>
|
||||||
<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>
|
||||||
|
@ -65,6 +76,36 @@ export default {
|
||||||
type: String,
|
type: String,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
titleClick() {
|
||||||
|
this.$ga.event({
|
||||||
|
eventCategory: 'dev-item',
|
||||||
|
eventAction: 'title-click',
|
||||||
|
eventLabel: this.number,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
releasedClick() {
|
||||||
|
this.$ga.event({
|
||||||
|
eventCategory: 'dev-item',
|
||||||
|
eventAction: 'released-click',
|
||||||
|
eventLabel: this.number,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
githubClick() {
|
||||||
|
this.$ga.event({
|
||||||
|
eventCategory: 'dev-item',
|
||||||
|
eventAction: 'github-click',
|
||||||
|
eventLabel: this.number,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
downloadClick() {
|
||||||
|
this.$ga.event({
|
||||||
|
eventCategory: 'dev-item',
|
||||||
|
eventAction: 'download-click',
|
||||||
|
eventLabel: this.number,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
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