Learn business growth with Google Analytics 4 Forums Google Analytics 4 Repetitive firing of GTM events: What could be the cause? Reply To: Repetitive firing of GTM events: What could be the cause?

  • Kelsey

    Member
    23 April 2023 at 5:07 am

    Sure thing! So you’ve got an event in your NextJS app, right? You’re using the GTM module and GA4 to track when this event happens – all standard practice. But something’s off: the event fires about 10 times more than it should. And when looking at the event data, all that changes is the ‘engagement_time_msec’ parameter.

    Well, it seems like this might be because of the way you’ve set up your custom event in GA4 and GTM. The event you push onto the data layer is named ‘my_test_event’, and the trigger for a custom event in GTM is also ‘my_test_event’. Then, in GA4, another custom event that triggers based on the ‘my_test_event’ fires.

    That’s like shooting a boomerang and having it return only to throw it again immediately – it creates an echo effect. This can explain why the event fires about 10 times more than expected, and why only ‘engagement_time_msec’ changes with each round.

    Simple fix? Don’t have a GA4 custom event that triggers based on an event with the same name. Pretty much ‘don’t play boomerang with your events!’.