vue-gtag
Github
v3
v3
  • Get started
  • gtag.js consent management
  • Page tracker
  • Multiple domain tracking
  • Plugin hooks
  • Global namespace
  • Access gtag instance directly
  • Plugin options
  • Migration v2 to v3
  • Methods
    • pageview
    • event
    • consent
    • consentGrantedAll
    • consentDeniedAll
    • query
    • screenview
    • customMap
    • ecommerce
    • linker
    • set
    • time
    • config
    • exception
Powered by GitBook
On this page

Global namespace

You can customize the name of your global gtag instance and dataLayer to avoid conflicting with already installed library instances in your application.

import { configure } from "vue-gtag";

configure({
  tagId: "GA_MEASUREMENT_ID",
  gtagName: 'myGtag',
  dataLayerName: 'myDataLayer'
})
PreviousPlugin hooksNextAccess gtag instance directly

Last updated 1 month ago