Linking to an external munchkin.js | Community
Skip to main content
Frank_Breen2
Level 8
August 28, 2017
Solved

Linking to an external munchkin.js

  • August 28, 2017
  • 2 replies
  • 2926 views

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.

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

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.

2 replies

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
August 28, 2017

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
August 29, 2017

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