mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
Client Analytics (#9023)
* start to refactor analytics and some mixins * wip * wip * wip * more analytics * more analytics * more anlytics * fix analytics module * finish analytics * fix env * vue casing
This commit is contained in:
@@ -91,20 +91,29 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import logo from 'assets/svg/logo.svg';
|
||||
import logo from 'assets/svg/logo.svg';
|
||||
import * as Analytics from 'client/libs/analytics';
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
icons: Object.freeze({
|
||||
logo,
|
||||
}),
|
||||
};
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
icons: Object.freeze({
|
||||
logo,
|
||||
}),
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
playButtonClick () {
|
||||
// @TODO duplicate of code in home.vue
|
||||
Analytics.track({
|
||||
hitType: 'event',
|
||||
eventCategory: 'button',
|
||||
eventAction: 'click',
|
||||
eventLabel: 'Play',
|
||||
});
|
||||
|
||||
this.$router.push('/register');
|
||||
},
|
||||
methods: {
|
||||
playButtonClick () {
|
||||
this.$router.push('/register');
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user