Closed holtzy closed 3 years ago
Hey Yan, the send_page_view: false
is there to avoid duplicating page views. Views are tracked here:
https://github.com/flpvsk/gatsby-plugin-gtag/blob/master/src/gatsby-browser.js#L22
Could you check your network tab? Also keep in mind that the script only works when NODE_ENV=production
Oh all good. This line just look weird in my console, and it looks like page view took a while to be accessible on my website. All ghood now, thanks for your work! 🙏
Thanks for your work on this plugin.
I've managed to make it work on my website https://www.python-graph-gallery.com. I can see real time users.
However, page views are not sent at all. I believe it is because of this line of code: https://github.com/flpvsk/gatsby-plugin-gtag/blob/master/src/gatsby-ssr.js#L34
It set the
send_page_view
option to false. I don't understand this decision? Page views are what most people want to track through google analytics. Would it be possible to set it as an option in the plugin, or correct it?Thanks a bunch,
Yan