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");
    },
  },
};

Last updated