Inject javascript into form

  • art_crate
    Asked on June 27, 2015 at 2: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!