Learn business growth with Google Analytics 4 Forums Google Analytics 4 Double Firing of Custom Event in GA4

  • Double Firing of Custom Event in GA4

    Posted by Anthony on 30 April 2023 at 7:04 pm

    Dilemma: GA4 custom event doing a double-take

    Alright, so I got creative and made this HTML page, and I went old school – added the tracking snippet right into its section without any help from Google Tag Manager.
    This page of mine has a neat little web form that says ‘thank you’ and submits to the URL
    /webform-title-thankyou.

    Just to spice things up, I set up a custom event where the page_location matches up with https://example.com//webform-title-thankyou

    Funny thing happened though, this event of mine decided to play a twin role and started triggering twice! Now, I don’t remember signing up for any double-feature, and there’s no UA property linked or anything that could get this two-timing gig started. Any ideas on how to get back to a solo performance?

    I’ve got some screenshots right here
    see it here

    and another one here

    Luna replied 1 year, 5 months ago 3 Members · 2 Replies
  • 2 Replies
  • Ngoc

    Member
    8 May 2023 at 8:26 pm

    Nice on the DIY coding! As for the double-feature: It’s not you. It’s the debug – and it’s lying to you. I know, outrageous, but let’s be detective here and ferret it out. The Network tab in your devtools will do a much better job with no twin acts and funky duets. A single performance only, I promise. Give it a whirl! You’ll spot your events exactly as they fire off, no echoes and mirages.

  • Luna

    Member
    15 June 2023 at 3:24 pm

    The GA4 event may be triggering twice due to multiple reasons. One could be a page refresh that leads to the event being fired again, or it could be due to the event listener that submits the form. You could check for a non-duplicated GA4 event using unique event IDs and examining if they are actually the same. Fixing this could require editing the form’s event handling code to ensure it is not triggering multiple submissions. Manual inspection of the website’s behavior, possibly by using browser developer tools, could provide additional insights.

Log in to reply.