feat: add gtm
This commit is contained in:
@@ -11,6 +11,7 @@
|
|||||||
"typecheck": "vue-tsc --noEmit"
|
"typecheck": "vue-tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@gtm-support/vue-gtm": "^1.3.0",
|
||||||
"@vueuse/core": "^8.2.6",
|
"@vueuse/core": "^8.2.6",
|
||||||
"@vueuse/head": "^0.7.6",
|
"@vueuse/head": "^0.7.6",
|
||||||
"nprogress": "^0.2.0",
|
"nprogress": "^0.2.0",
|
||||||
|
|||||||
22
pnpm-lock.yaml
generated
22
pnpm-lock.yaml
generated
@@ -2,6 +2,7 @@ lockfileVersion: 5.3
|
|||||||
|
|
||||||
specifiers:
|
specifiers:
|
||||||
'@antfu/eslint-config': ^0.20.2
|
'@antfu/eslint-config': ^0.20.2
|
||||||
|
'@gtm-support/vue-gtm': ^1.3.0
|
||||||
'@iconify-json/mdi': ^1.1.9
|
'@iconify-json/mdi': ^1.1.9
|
||||||
'@iconify-json/ri': ^1.1.1
|
'@iconify-json/ri': ^1.1.1
|
||||||
'@types/markdown-it-link-attributes': ^3.0.1
|
'@types/markdown-it-link-attributes': ^3.0.1
|
||||||
@@ -40,6 +41,7 @@ specifiers:
|
|||||||
vue-tsc: ^0.34.6
|
vue-tsc: ^0.34.6
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@gtm-support/vue-gtm': 1.3.0_vue@3.2.33
|
||||||
'@vueuse/core': 8.2.6_vue@3.2.33
|
'@vueuse/core': 8.2.6_vue@3.2.33
|
||||||
'@vueuse/head': 0.7.6_vue@3.2.33
|
'@vueuse/head': 0.7.6_vue@3.2.33
|
||||||
nprogress: 0.2.0
|
nprogress: 0.2.0
|
||||||
@@ -1353,6 +1355,24 @@ packages:
|
|||||||
- supports-color
|
- supports-color
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@gtm-support/core/1.1.0:
|
||||||
|
resolution: {integrity: sha512-GyiZEfKejkAQq2lDS0u2mv6NDVdNWqXi+uQX0zcBOsIpWHfQxWpuCeTTCSv3DZEKv2LMkC0cwv6ukVRJvPmpaA==}
|
||||||
|
dev: false
|
||||||
|
|
||||||
|
/@gtm-support/vue-gtm/1.3.0_vue@3.2.33:
|
||||||
|
resolution: {integrity: sha512-QN7BmkE6RQ9bDgfqKdC/7KBALEM1vEjgbJ83c1nO6EJ3AUuc76l44DMH2q9npueQ2Vvl1FaqscQJzYH+rxjZmg==}
|
||||||
|
peerDependencies:
|
||||||
|
vue: ^3.0.0
|
||||||
|
peerDependenciesMeta:
|
||||||
|
vue-router:
|
||||||
|
optional: true
|
||||||
|
dependencies:
|
||||||
|
'@gtm-support/core': 1.1.0
|
||||||
|
vue: 3.2.33
|
||||||
|
optionalDependencies:
|
||||||
|
vue-router: 4.0.14_vue@3.2.33
|
||||||
|
dev: false
|
||||||
|
|
||||||
/@humanwhocodes/config-array/0.9.5:
|
/@humanwhocodes/config-array/0.9.5:
|
||||||
resolution: {integrity: sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==}
|
resolution: {integrity: sha512-ObyMyWxZiCu/yTisA7uzx81s40xR2fD5Cg/2Kq7G02ajkNubJf6BopgDTmDyc3U7sXpNKM8cYOw7s7Tyr+DnCw==}
|
||||||
engines: {node: '>=10.10.0'}
|
engines: {node: '>=10.10.0'}
|
||||||
@@ -4519,7 +4539,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
universalify: 2.0.0
|
universalify: 2.0.0
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
graceful-fs: 4.2.9
|
graceful-fs: 4.2.10
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
/jsonpointer/5.0.0:
|
/jsonpointer/5.0.0:
|
||||||
|
|||||||
7
src/modules/gtm.ts
Normal file
7
src/modules/gtm.ts
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
import { createGtm } from '@gtm-support/vue-gtm'
|
||||||
|
import type { UserModule } from '~/types'
|
||||||
|
|
||||||
|
export const install: UserModule = ({ app }) => {
|
||||||
|
// add google tag manager, and add GA4 in gtag
|
||||||
|
app.use(createGtm({ id: 'GTM-5FJSV46' }))
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user