Tracking iFrame form with Google tag manager (cross domain tracking)

  • Profile Image
    alexander strbac 
    Asked on September 20, 2015 at 12:06 PM

    Hello all,


    I am trying to help out a friend whose website is here and his JotForm is here . I a not familiar with the JotForms but as I see it works with iFrames. Probably:


    > one sets up their form at your admin dashboard
    > this creates a form / webpage (hosted at your servers?)
    > this form gets included in the users website via an iFrame
    > data gets submitted wither to an email or to a database (which might or might not be hosted with your company)

    If all of this is correct than I believe we might have some issues. Google have made it possible to track pages that are in an iFrame but their code needs to be modiffied. I con't suppose there is a way I could insert THIS code into the form page source HTML?

    It is extremely important for them to be able to see which traffic source brought the most form submissions (and which ones of course). 

    Many thanks for the replies!


  • Profile Image
    Answered on September 21, 2015 at 02:52 AM

    Hello Alex,

    Yes, that's all correct.

    You can actually get the full source code of your form and inject that script on the source before embedding it on your website

    Let us know if you need further help. Thanks!

  • Profile Image
    alexander strbac 
    Answered on September 22, 2015 at 08:36 AM

    Hello Chris!

    Many thanks for your reply! If I understood you correctly, you are saying that I inject the FORM code (not the site code) with the tracking code, and after that the form gets loaded in the iFrame?

    I am planing to use Google tag manager to do this. This means that I need access to the forms source code, insert Google tag manager container into it and publish the form at the server where it currently resides.

    This would be the easiest and simplest solution. Many thanks!



  • Profile Image
    Answered on September 22, 2015 at 10:35 AM


    Yes that's correct.

    1. Take your form source code.

    2. Paste it on notepad or any text editing tools you have. Then below the form source code, add your tracking code.


    3. After that, embed all the source codes on your page or you can save it as html file and upload it on your server.

    If  you need further assistance, do let us know.

  • Profile Image
    Answered on September 22, 2015 at 10:42 AM

    Just a quick one - I don't think this one is on our (their) webserver but rather hosted with you, no? I will check with the site owner and get back to you. 

    I will manage editing the code ;) we own a web dev company it's just that I'm not familiar with your platform and it's implementation in this site's (Photoworkshopadventures) case. Meaning, if it's hosted with you or is it a "self" hosted version

  • Profile Image
    Answered on September 22, 2015 at 12:18 PM

    When you are using the form source code (not downloading the entire form files including css and js), all scripts and other resources are hosted at Jotform but when you download all the form files and uploaded it on your server, you are hosting the form files.

    However, whichever embed codes you are using, all the form submissions data will be stored on Jotform servers.

    Hope this information helps!