mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-08-28 05:24:23 -05:00
Add some simple GA activity tracking
This commit is contained in:
@@ -1,5 +1,12 @@
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
|
||||
if (GOOGLE_ANALYTICS_ID) {
|
||||
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
ga('create', GOOGLE_ANALYTICS_ID, 'auto');
|
||||
ga('send', 'pageview');
|
||||
}
|
||||
|
||||
export default {
|
||||
event() {
|
||||
ga('send', 'event', ...arguments);
|
||||
},
|
||||
}
|
||||
|
||||
@@ -64,9 +64,13 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import analytics from '@/js/analytics';
|
||||
import Modal from './Modal.vue';
|
||||
|
||||
export default {
|
||||
components: { Modal },
|
||||
mounted() {
|
||||
analytics.event('About', 'Open');
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import analytics from '@/js/analytics';
|
||||
import Modal from '@/js/components/Modal.vue';
|
||||
import GameModeHeader from './GameModeHeader.vue';
|
||||
import ScheduleList from './ScheduleList.vue';
|
||||
@@ -19,5 +20,8 @@ import ScheduleList from './ScheduleList.vue';
|
||||
export default {
|
||||
components: { Modal, GameModeHeader, ScheduleList },
|
||||
props: ['schedules', 'gameMode', 'cssClass', 'now'],
|
||||
mounted() {
|
||||
analytics.event('Schedule', 'Open', this.gameMode.name);
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -18,11 +18,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import analytics from '@/js/analytics';
|
||||
import Modal from '@/js/components/Modal.vue';
|
||||
import MerchandiseBox from './MerchandiseBox.vue';
|
||||
|
||||
export default {
|
||||
components: { Modal, MerchandiseBox },
|
||||
props: ['merchandises', 'now'],
|
||||
mounted() {
|
||||
analytics.event('SplatNet Gear', 'Open');
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user