time
Options API
export default {
name: 'MyComponent',
methods: {
track () {
this.$gtag.time({
'name' : 'load',
'value' : 3549,
'event_category' : 'JS Dependencies'
})
}
}
}
Composition API
import { useGtag } from "vue-gtag-next";
export default {
name: "MyComponent",
setup() {
const { time } = useGtag()
const track = () => {
time({
'name' : 'load',
'value' : 3549,
'event_category' : 'JS Dependencies'
})
};
return {
track,
};
},
};
Last updated