SOLVED

Linking to an external munchkin.js

Go to solution
Frank_Breen2
Level 10

Linking to an external munchkin.js

On some webpages I see a link to marketo.net for the Munchkin deployment rather than normal tracking deployment as described here: Add Munchkin Tracking Code to Your Website - Marketo Docs - Product Docs 

On some page the code links to:

https://munchkin.marketo.net/munchkin.js

https://munchkin.marketo.net/151/munchkin.js

I assume the folder deployment is for a specific Munchkin version, but can someone tell why we would deploy Munchkin in this way and how it's connected back to our instance if it doesn't have a munchkin id connected to it? At the moment we seem to have multiple codes and I want to removed unneeded if they are historical.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Linking to an external munchkin.js

Frank, Munchkin uses 2 remote scripts:

  1. The bootstrapper. This tiny file determines which version of the library to load and also creates an "event stack" or queue that allows you to start calling Munchkin functions immediately even when the library itself is still loading in the background (the functions execute when the library is ready).
  2. The library itself. This file performs the actual logic of attaching click listeners, assembling remote pixel paths, and logging hits.

You can't use Munchkin without at some point calling init() with your Munchkin ID.  Maybe this call is hidden in another remote package.

View solution in original post

2 REPLIES 2
SanfordWhiteman
Level 10 - Community Moderator

Re: Linking to an external munchkin.js

Frank, Munchkin uses 2 remote scripts:

  1. The bootstrapper. This tiny file determines which version of the library to load and also creates an "event stack" or queue that allows you to start calling Munchkin functions immediately even when the library itself is still loading in the background (the functions execute when the library is ready).
  2. The library itself. This file performs the actual logic of attaching click listeners, assembling remote pixel paths, and logging hits.

You can't use Munchkin without at some point calling init() with your Munchkin ID.  Maybe this call is hidden in another remote package.

Justin_Cooperm2
Level 10

Re: Linking to an external munchkin.js

Yes the /151/ is a specific version of munchkin. you should reference the "loader" file that Sanford mentions.

Some of our customers actually download the actual munchkin file itself so they can host it on their own domain and are in control of what JS is on their pages. Some customers have policies that require this.

Other customers may wish to only support a certain version until they've done testing of later versions.

And then other customers may wish to use our "beta" munchkin version so that they can have functionality that isn't supported in our GA munchkin file (like this "opt out cookie" discussed here http://docs.marketo.com/display/DOCS/Understanding+Privacy+Settings