How can I use google tag manager with JotForm?

  • PinhoLaw
    Asked on April 16, 2024 at 11:08 AM

    Hi,


    How can I connect google tag manager and JotForm?

  • Christopher JotForm Support
    Replied on April 16, 2024 at 12:13 PM

    Hi Izi,

    Thanks for reaching out to Jotform Support. As of this moment, we do not have an available integration with Google Tag Manager. If you want to track events on your website with Google Analytics, you can use the form Source Code. Here's how to do it:

    1. In Form Builder, in the orange navigation bar at the top of the screen, click on Publish.

    2. Click on Embed on the left side of the screen.

    3. Select Source Code.

    How can I use google tag manager with JotForm? Image 1 Screenshot 20

    Once you have embedded your form on your website, you can proceed to follow the steps provided on this guide about How to Track Online Form Submissions Using Google Analytics 4.

    Give it a try and let us know how it goes.

  • conversiontracking
    Replied on April 17, 2024 at 8:32 AM

    Hey 👋

    Video Explanation

    Video explanation on Youtube

    Short answer

    If you're willing to spend a few dollars you can just get a prebuilt Jotform Google Tag Manager setup which works automatically

    Longer answer

    The Source code version does not work with Google Tag Manager. The reason is that in the source code embed when the "Action After Submission"  is "Show a Thank You Page after submission", it doesn't show it within the form like with EMBED or iFRAME, but it will instead redirect the visitor your website mywebsite.com -> submit.jotform.com.

    How can I use google tag manager with JotForm? Image 1 Screenshot 30

    This happens so fast that Google Tag Manager tags do not have enough time to be sent. So the tags will get stuck on "Still running" like this

    How can I use google tag manager with JotForm? Image 2 Screenshot 41


    What I suggest is again to get a prebuilt Google Tag Manager setup. If you want to DIY, you can either


    A) Use JavaScript to listen for iFrame messages from Jotform. Message name is' submission-completed'. This is the easier way.

    B) Or redirect back to your website, add the submission ID into the URL parameter, use javascript to parse the URL, check if the submission ID is new (so we don't get duplicate conversions when refreshing the thank you page) and then fire custom event trigger in GTM. For this you will also need to fix PII Issues and block jotform.com as a referrer so your traffic source (google.com, instagram.com etc) won't get overwritten. Redirect method has more steps, it the benefit is that you can use the field values like email address or $ price value from Jotform and do Google Ads enhanced conversion tracking or other custom things which require information the user submitted.

    The prebuilt setup does all this automatically. You just need to import one file. For anyone who may find this later, I have an article on Jotform and Google Tag Manager. I will try to update it with this info :)

 
Your Answer