vue-gtag
Github
v2
v2
  • Get started
  • Migration v1 to v2
  • 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
  1. Methods

config

PrevioustimeNextexception

Last updated 5 years ago

export default {
  name: 'MyComponent',

  methods: {
    track () {
      this.$gtag.config({
        'cookie_prefix': 'MyCookie',
        'cookie_domain': 'blog.example.com',
        'cookie_expires': 28 * 24 * 60 * 60
      })
    }
  }
}

Remember, this is just an example. check the all API parameters in the official gtag documentation

here