-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to disable the automatic pageview measurement ( send_page_view: false) in multi-page apps. #27
Comments
Had the same issue, and I was also setting Fixed it by disabling enhanced measurements in the GA admin dashboard, like suggested in https://developers.google.com/analytics/devguides/collection/ga4/views?client_type=gtag#disable_pageview_measurement |
My understanding of the problem is that in GA4 page view events happen automatically so defining a Is there a reason yall are opting to disable enhanced measurements/send I also see it mentioned in the README here: https://github.com/codler/react-ga4#migrate-from-old-react-ga I am trying to learn if there is something I have not accounted for in my migration. TYIA🚀 |
The example in the migration guide does mention "Send pageview with a custom path" Maybe that should be interpreted as: "page view events are sent automatically without the need for an explicit call in the code. Use the |
I wrote a new issue here. |
Hello,
On multi page apps we want to have only the custom/manually page_view events and to switch off the automatic page_view measurement.
The ReactGA is initialized when the root component of the app is rendered and the custom/manually page_view events are sent on each route change.
According to the following sample we must reset and reinitialize the config on each route change which is time consuming.
#12 (comment)
We've added the following source code(not ideal) on each route change but the automatic page_view measurement is still triggered.
Is there a way to set the 'send_page_view` flag to false, from source code, without reinitializing the RectGA ?
fyi:
Browser-history events is disabled in GA4.
The text was updated successfully, but these errors were encountered: