vue-gtag
Github
v1
v1
  • Get started
  • Bootstrap options
  • Auto tracking
  • Multiple domain tracking
  • Plugin hooks
  • API
  • Opt-in/out
  • Global namespace
  • Access gtag instance directly
  • Debug
  • Plugin options
  • Methods
    • pageview
    • event
    • screenview
    • customMap
    • purchase
    • linker
    • set
    • time
    • config
    • exception
Powered by GitBook
On this page

API

You can access several methods from inside the $gtag instance in your component scope

  • query

  • config

  • event

  • pageview

  • screenview

  • customMap

  • time

  • exception

  • linker

  • purchase

  • refund

  • set

  • optIn

  • optOut

usage example

export default {
  name: "MyComponent",

  methods: {
    track() {
      this.$gtag.pageview("/about");
    },
  },
};
PreviousPlugin hooksNextOpt-in/out

Last updated 4 years ago