4 Replies Latest reply on Jun 30, 2015 9:57 AM by Sanford Whiteman

    Embedded JS Marketo Forms are slow to render?

    Digital Pi Nobilis

      When embedding the JavaScript for a Marketo form on our test server, there is a noticeable delay when rednering the form - at least 3-4 seconds.  Is this expected?

       

      We are following these instructions:
      Embed Form on your Website - Marketo Docs - Product Docs

        • Re: Embedded JS Marketo Forms are slow to render?
          Sanford Whiteman

          Certainly not expected.  A half-second to download the form description, maybe.  Although it does depend on how far (geographically) the user is from your Marketo instance.  What's a sample URL I can test?  Have you checked the network waterfall when loading your page to see how it's taking to load the form on the wire?

          • Re: Embedded JS Marketo Forms are slow to render?
            Courtney Grimes

            Sanford's correct that it's not expected—but given that the JavaScript that powers the form needs to load in the body, it may be an issue with other assets on your page (other pieces of JavaScript, a large image file, what have you.) Since you're on a local test server, try opening the page in Chrome, then use Chrome's Inspector (Ctrl + Shift + I / Apple + Option + I) and look under the "Network" tab to see a waterfall test of your assets. Does it look like anything in particular is causing a slow load?

            • Re: Embedded JS Marketo Forms are slow to render?
              Digital Pi Nobilis

              Thanks for the suggestion! Very helpful to use the inspector to see what is going on....

               

              I found that the two largest sources of latency were - by far - calls made by the Marketo form2.min.js library
              1) marketo getForm?munchkinId=xxx    TTFB 940ms2) marketo XDFrame   TTFB 920ms

               

              These happen serially, so altogether that is almost 2 seconds of latency!

               

              For comparison, Google Analytics plugin latency TTFB 24ms

               

              Is this expected?

               


              Also, when embedding a Marketo form on a page, should I also have the normal munchkin code on the page as well?  I do have the standard munckin script ...and It looks like the munchkin.js gets dowloaded twice?