You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It be great to flesh out this example so analytics.page() will capture ALL page views -- client and SSR rendered. Not sure if that means moving some of the code from _document.js (which is only rendered on the server) to the new (Next6) _app.js file.
Or, instead, is a matter having to manually call analytics.page inside of onRouteChangeComplete or possibly in the lifecycle hooks of page components and leaving the setup code where is. Thoughts?
The text was updated successfully, but these errors were encountered:
I assume someone created a PR for this, if not feel free to create a PR, you'll want to add the tracking to _app.js with a typeof window !== 'undefined' otherwise it'll track server side + client side leading to skewed results.
RE: #4587, this pull request improves the with-segment example.
Previously, only SSR page loads were tracked. This pull request adds manual page view logging via `Router.events.on('routeChangeComplete')` in `Page.js`.
There is also a minor bug fix on the textarea to remove a console error.
lockbot
locked as resolved and limited conversation to collaborators
Jan 1, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
It be great to flesh out this example so analytics.page() will capture ALL page views -- client and SSR rendered. Not sure if that means moving some of the code from _document.js (which is only rendered on the server) to the new (Next6) _app.js file.
Or, instead, is a matter having to manually call analytics.page inside of onRouteChangeComplete or possibly in the lifecycle hooks of page components and leaving the setup code where is. Thoughts?
The text was updated successfully, but these errors were encountered: