Skip to content

Commit 994de7c

Browse files
committed
Manually send event on page load.
1 parent b428cb4 commit 994de7c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/App.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
<script setup>
2-
import DisplayMath from './components/DisplayMath.vue';
3-
import DisplayChemistry from './components/DisplayChemistry.vue';
2+
import { onMounted } from 'vue'
3+
import { event } from 'vue-gtag'
4+
5+
import DisplayMath from './components/DisplayMath.vue'
6+
import DisplayChemistry from './components/DisplayChemistry.vue'
7+
8+
onMounted(() => {
9+
console.log(`the component is now mounted.`)
10+
event('page_mounted', { name: 'main' })
11+
})
12+
413
</script>
514

615
<template>

0 commit comments

Comments
 (0)