Closed chriswhong closed 4 years ago
oh that's super weird. definitely not our intention. do you have any thoughts on a potential fix? i can investigate myself much later because i'm super swamped but always open for some PRs! :)
Sorry, ended up using gatsby-plugin-segment-analytics
for our site.
hi @chriswhong, i think this issue is now solved. im not super sure but according to @TomPridham, it may! but i don't have the details to recreate it. thanks again for opening this issue.
After experimenting a bit with this plugin with
trackPage: true
, I saw that page tracking events only happened when navigating within the app using client-side routing. The initial load of a page didn't show up in the segment debugger.I experimented by trying to add
window.analytics && window.analytics.page();
to some of the SSR API functions in gatsby, but wasn't able to get it working.Am I missing something, or is the page tracking only triggered when client-side route changes?