What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Inject javascript into form

    Asked by art_crate on June 27, 2015 at 02:05 AM

    Hello,

    I am trying to inject a tracking code from Klaviyo into my form. If the only way to do this is download the source code, then upload it to my site—could you please assist me, I am using squarespace.

     

    <!-- Start Klaviyo -->
    <script type="text/javascript">
      var _learnq = _learnq || [];
     
      _learnq.push(['account', 'gQkwid']);
     
      (function () {
      var b = document.createElement('script'); b.type = 'text/javascript'; b.async = true;
      b.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'a.klaviyo.com/media/js/analytics/analytics.js';
      var a = document.getElementsByTagName('script')[0]; a.parentNode.insertBefore(b, a);
      })();
    </script>
    <!-- End Klaviyo -->
     
     
    Thanks!
    Page URL:
    http://form.jotformpro.com/form/51708168374966

    style size source height
  • Profile Image

    Answered by Shadae on June 27, 2015 at 07:07 AM

    Hi art_crate,

    Yes it is only possible to add Javascript coding to your form if you grab the full source code of your form and add the code:

    http://www.jotform.com/help/104-How-to-get-the-Full-Source-Code-of-your-Form 

    You would then place the code into your code editor and add your script.

    Please inform us if you need further assistance.