codler / react-ga4

React Google Analytics 4
https://www.npmjs.com/package/react-ga4
266 stars 34 forks source link

Extra Event Call #45

Open ShubhamSinghNW18 opened 1 year ago

ShubhamSinghNW18 commented 1 year ago

Hi I am using this package for implementing GA4 in my next js application. While clicking on any ancor tag a extra GA4 click event is getting called, so is their any way to block this extra event call

guybinya commented 6 months ago

I think you can disable it by turning off Enhanced measurement in the GA console

obada-jaras commented 6 months ago

@ShubhamSinghNW18, I'm experiencing a similar issue where page views are duplicated (noticed when monitoring the Realtime Overview, where they appear twice).

I tested the solution suggested by @guybinya, and while it does address the problem, it introduces a new issue: if you navigate through multiple pages quickly, only a single request is sent (resulting in just one page showing up in the Realtime Overview).

Anyone have an idea what is the best practice?