Google Tag Manager: Track form submissions for embedded form using iFrame or Embed method

  • Anthony Taylor
    Asked on May 1, 2024 at 3:25 PM

    I’m having issues tracking form submissions on an iframe/embedded hot form. Can you provide instructions for how to track these form submissions with google tag manager?

  • Victorino_S JotForm Support
    Replied on May 1, 2024 at 4:19 PM

    Hi Anthony,

    Thanks for reaching out to Jotform Support. Unfortunately, tracking online form submissions with Google Analytics 4 (GA4) and Google Tag Manager (GTM) only works on forms added to a website using the form's source code and does not work with the iFrame or embed method. This guide will show you how to get your form's full source code. 

    For more information, please check out this guide about How to Track Online Form Submissions Using Google Analytics 4.

    Let us know if you need any more help.

  • conversiontracking
    Replied on May 3, 2024 at 10:36 AM

    Source code method problem...

    The source code method doesn't work, because many tags don't have enough time to be fully sent before the redirect kicks in. For example, Google Ads tag will be stuck at "Still running" if you use the source code embed and Google Tag Manager form trigger

    Google Tag Manager: Track form submissions for embedded form using iFrame or Embed method Image 1 Screenshot 40


    Solution - Short answer

    is to consider investing a few dollars and getting a Jotform Google Tag Manager setup which works without you needing to figure it out

    Solution - Long answer

    To track Jotform iFrames with Google Tag Manager properly you have two choices:

    A) If you want to get the field values, for example, to do Google Ads enhanced conversion tracking, you will need to redirect to an external page, add Jotform submission id {id} as a parameter, then use a custom HTML listener to track conversions on a thank you page in your website. This is the "best" method, but it's harder because you need

    Google Tag Manager: Track form submissions for embedded form using iFrame or Embed method Image 2 Screenshot 51

    • Check for duplicate events. People accidentally refresh the thank you page when they re-open their mobile browser which refreshes the last page. So 1 real conversions -> 2 conversions in Google Analytics, Google Ads, Facebook Pixel
    • You need to sort out jotform.com as a referrer, because it messes up data in Google Analytics when it thinks the form is a traffic source, although it was really just a detour
    • You need to PII (Personally Identifiable Information) from the URL before sending Google Analytics events.

    B) listen for a message using JavaScript in a Custom HTML Google Tag Manager tag, and push a custom event to the data layer, then fire a custom event to trigger your tags.

    Google Tag Manager: Track form submissions for embedded form using iFrame or Embed method Image 3 Screenshot 62


    More about the methods in this blog post Jotform & Google Tag Manager Explained.


  • bigdecker
    Replied on May 15, 2024 at 9:16 AM

    ConversionTracking, does your solution satisfy the Google Ads Enhanced Conversions requirements that are going into effect very soon?

    Got an email from google that says I need to implement this. Have no idea how to do it using JotForm.

    from Google:

    "Set up enhanced conversions to avoid losing campaign measurementTechnology updates, such as Google Chrome's plans to  in 2024, are changing the ways you reach audiences and measure results. Build a strong foundation for measuring your ads with enhanced conversions. Delaying could impact the performance of your ads, including your conversion measurement."

    "Enhanced conversions shares hashed first-party conversion data from your website to Google in a privacy-centric way to maintain your reporting."

    Jotform needs to address this issue or they are going to lose alot of customers who use Google Ads.

  • Christopher JotForm Support
    Replied on May 15, 2024 at 9:31 AM

    Hi bigdecker,

    To avoid confusion, I have moved your question to this thread.

    Let us know if there’s anything else we can help you with.

 
Your Answer