feat: add gtm

This commit is contained in:
YunYouJun
2022-04-14 21:30:19 +08:00
parent 46e603cc6a
commit fd92681b8c
3 changed files with 29 additions and 1 deletions

7
src/modules/gtm.ts Normal file
View 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' }))
}