How can I run a script inside a form?

  • Profile Image
    Asked on January 13, 2015 at 04:41 PM

    I am tracking my users movement using mouseflow. But it cant track the form since it is an iframe. They said I need to paste their script code inside the html above the </body> tag.  How can I do that?



    <script type="text/javascript">

       var _mfq = _mfq || [];

       (function() {

           var mf = document.createElement("script"); mf.type = "text/javascript"; mf.async = true;

           mf.src = "//";




  • Profile Image
    Answered on January 13, 2015 at 06:08 PM

    Based on you what you're mentioning, I suggest that you use the full source code of your form to embed it in your website. This way the script will also be able to capture the movements in it.

    However, please note that using this method requires you to manually update the code of your form in your site every time you make changes in it.

    Hope this helps.

    Let us know if you need further assistance.