SOLVED

Asynchronous JQuery and lost analytics

Go to solution
Anonymous
Not applicable

Asynchronous JQuery and lost analytics

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!

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Asynchronous JQuery and lost analytics

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.

pastedImage_1.png

pastedImage_0.png

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.

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Asynchronous JQuery and lost analytics

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.

pastedImage_1.png

pastedImage_0.png

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.

Anonymous
Not applicable

Re: Asynchronous JQuery and lost analytics

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

SanfordWhiteman
Level 10 - Community Moderator

Re: Asynchronous JQuery and lost analytics

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