Replies: 2 comments 3 replies
-
This is how I currently do it const router = getRouter(queryClient);
const Root = (
<StrictMode>
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
</QueryClientProvider>
</StrictMode>
);
root.render(Root);
router.history.subscribe(() => {
const url = router.history.location.href
// your Favorite Analytics code here
}); |
Beta Was this translation helpful? Give feedback.
3 replies
-
Here is my solution for hash routing. Configure Google Analytics to turn off sending page views automatically, and instead send the first page view manually:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to use GA to track page viewed.
Beta Was this translation helpful? Give feedback.
All reactions