Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

integrate plugin nuxt

//For nuxt 3 - create a folder name plugins and create a file like plugins/vue-gtag.client.- nuxt will auto-import :)

import VueGtag from 'vue-gtag-next'

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.use(VueGtag, {
    property: {
      id: 'GA_MEASUREMENT_ID'
    }
  })
})
Source by v3.nuxtjs.org #
 
PREVIOUS NEXT
Tagged: #integrate #plugin #nuxt
ADD COMMENT
Topic
Name
3+9 =