event

export default {
  name: 'MyComponent',

  methods: {
    track () {
      this.$gtag.event(<action>, {
        'event_category': <category>,
        'event_label': <label>,
        'value': <value>
      })
    }
  }
}

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

Last updated