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
{{ message }}
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
My hope is this should be fairly easy to wire up - add the react plugin and ideally it has some automatic handling for sending pageview events on route navigations.
@frozenhelium do you folks have any experience with working with google analytics 4 in a react app?
This would be nice to look into - it seems like with Analytics 4, the default page view metric no longer works, and needs some custom code to explicitly send pageview events, which means a really important metric for the site - unique page views, no longer works.
To get pageview events in Google Analytics 4, we need to explicitly send a
pageview
Analytics event to the GA API. This blog post explains roughly what code needs to do: https://www.kevinleary.net/blog/unique-pageviews-google-analytics-4/There seem to be some
react-ga4
plugins like https://www.npmjs.com/package/react-ga4 .My hope is this should be fairly easy to wire up - add the react plugin and ideally it has some automatic handling for sending
pageview
events on route navigations.@frozenhelium do you folks have any experience with working with google analytics 4 in a react app?
This would be nice to look into - it seems like with Analytics 4, the default page view metric no longer works, and needs some custom code to explicitly send pageview events, which means a really important metric for the site - unique page views, no longer works.
cc @tovari
The text was updated successfully, but these errors were encountered: