Track iFrame Form Submissions as Events in Google Analytics

  • NGHS
    Asked on November 30, 2015 at 9:13 AM

    What is the best way to track iframe form submissions as events in Google Analytics? The one plugin I tried did not work at all. I'd love to know if there is a better way for iframes. Thank you!

  • KadeJM
    Replied on November 30, 2015 at 12:12 PM

    To my understanding you want to use Google Analytics to track your Embedded iFrame Form Submissions as Events.

    What sort of Events did you want to track?

    Have you tried our Google Analytics Widget? Or is that the one you tried already that didn't work?

    That is currently the only GA Tool we offer though depending on what Events you want to track you could try adding it to the forms full source code as a workaround.

    Alternatively, we have these http://widgets.jotform.com/search/tracking.

  • NGHS
    Replied on November 30, 2015 at 12:16 PM

    That is the widget I tried and it did not work for me. The beauty of the iframe is I can update the form as needed in the online form editor without having to update the implementation itself in the site code. Who wants to mess with ugly source code every time a change is made to the form?

    This is what I want to push to GA when the form is completed without errors:
     ga('send', 'event', 'Category Here', 'OnMouseDown', 'Form Submit - Identifier here');

  • KadeJM
    Replied on November 30, 2015 at 1:48 PM

    As far as I know it should work for some information you wish to track.

    However, since it appears you are attempting to use this for tracking onClick, onMouse, onSubmit those are all javascript related functions which are not allowed to be used within the form as they interfere with the form's functionality causing it to break.

    It is also why there are no additional controls for this within the widget and that is probably why you are getting those errors if otherwise.

    The only way around it is in by adding it to the source code as I mentioned.

  • NGHS
    Replied on November 30, 2015 at 4:22 PM

    Good news! I was able to accomplish event tracking with GA through the JotForm iframe. In order to do this, I used the script embed option, which then creates the iframe on page load. Take a look at a demonstration of my custom script in action: http://goo.gl/B9Ua5m

    This is how the event looks in GA:

    Track iFrame Form Submissions as Events in Google Analytics Image 1 Screenshot 20

  • Ben
    Replied on November 30, 2015 at 5:36 PM

    Nice solution :)

    Thank you for updating us in regards to the same and do let us know if you have any further questions that we can assist you with and we would be happy to do so :)

  • NGHS
    Replied on December 1, 2015 at 7:41 AM

    Thank you sir!

  • mert JotForm UI Developer
    Replied on December 1, 2015 at 10:03 AM

    You are most welcome. Apart from the Google Analytics, we have a built in solution called Form Analytics. It also keeps the stats of your forms.

    Below, you can find a guide about how to use it:

    http://www.jotform.com/blog/150-Introducing-Form-Analytics

     

    Thanks.