Asynchronous JQuery and lost analytics | Community
Skip to main content
January 25, 2018
Solved

Asynchronous JQuery and lost analytics

  • January 25, 2018
  • 1 reply
  • 2177 views

Hi all,

We previous had Asynchronous Munchkin tracking code in the <header> of our site and just a couple days ago I switched it out for Asynchronous JQuery (our site includes JQuery 2.2). We had been seeing sluggish, 2-part loading on Marketo forms embedded on site pages and load time has improved drastically since I swapped in the Asynchronous JQuery Munchkin code. But, when I check in Web Page Activity -> Report we only have one Person for each day since I updated the Munchkin code (compared to dozens the previous days). The entry page is also identical (/render2). I wondered if there was a JQuery version conflict but this thread seems to indicate that this hasn't been an issue for awhile.

I'd appreciate any ideas or instruction!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

When you try to call $.ajax, jQuery (i.e. the global $ object) is not present in the page, since you load it later in the document.

Implemented properly, the asynchronous Munchkin (without jQuery) cannot slow down initial page rendering. jQuery only adds a level of complexity (the jQuery library must be loaded first), it doesn't improve performance.

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
January 25, 2018

When you try to call $.ajax, jQuery (i.e. the global $ object) is not present in the page, since you load it later in the document.

Implemented properly, the asynchronous Munchkin (without jQuery) cannot slow down initial page rendering. jQuery only adds a level of complexity (the jQuery library must be loaded first), it doesn't improve performance.

January 26, 2018

Thanks Sanford! I should've caught that. Do I lose any Marketo tracking by moving the Munchkin code to above </body>?

SanfordWhiteman
Level 10
January 26, 2018

If you aren't doing any custom tracking, no.