Closed ngocvinh208 closed 1 year ago
You wrote you using Vue 2.6 :thinking: But the Changelog explicitly mention that the min version for v2 is v2.7 https://github.com/gtm-support/vue-gtm/blob/vue2-gtm/CHANGELOG.md#breaking-change
So could you downgrade to v1.3 and test if that is the problem?
I've already used v1.3, but I wrote v2.0 in my question haha. I found it by using "watch" to fire content_view. Thank you anyway.
watch: {
$route(to, from) {
if (this.$gtm) {
this.$gtm.trackView(this.$page.wpPage.title, this.$page.wpPage.path);
window.dataLayer.push({event: 'pageview'});
}
}
},
I found it by using "watch" to fire content_view.
Does this mean, it is solved? I will close this then Feel free to reopen if I misunderstood, but please add then a reproducible example repo so I can debug, or try to open a PR on your own
Info
Input
Configure it in main.js
Configure it in my component
Output or Error
GTM tag is not firing the website
Expected Output
I am expecting GTM to fire the website.
Additional Context
I'm using Gridsome to build my website. When trying to build with Vue GTM module Google Tag Manager tag is not firing when viewing the page so we have to reload the page. I think because this is a third-party service, it only renders itself once per page load.?