Last updated 4 years ago
export default { name: 'MyComponent', methods: { track () { this.$gtag.set({ 'currency': 'USD', 'country': 'US' }) } } }
import { useGtag } from "vue-gtag-next"; export default { name: "MyComponent", setup() { const { set } = useGtag() const track = () => { set({ 'currency': 'USD', 'country': 'US' }) }; return { track, }; }, };