SOLVED

munchkin.js resource error

Go to solution
Anonymous
Not applicable

munchkin.js resource error

(newbie here)

My embedded js is getting the following error:

[Error] Failed to load resource: The requested URL was not found on this server. (munchkin.js, line 0)

file://munchkin-cdn.marketo.net/150/munchkin.js

It appears the munchkin.js is referencing a file which does not exist.

I see that http://munchkin-cdn.marketo.net/150/munchkin.js  DOES exit, but munchkin.js is using the file protocol, not http.

Below is the javascript on my web page (id's changed to xxxxx's).

Help?

-jeff

<script src="https://munchkin.marketo.net/munchkin.js"

type="text/javascript">

</script>

<script>

Munchkin.init('xxxxxxxxxxxxxxxxxx');

Munchkin.munchkinFunction('associateLead',

     { Email: 'test@email.com',

          FirstName: 'test',

          LastName: 'test',

          DoNotCall: true,

          DoNotCallReason: 'just because',

            Company: 'test company.',

            LeadSource: 'test Email',

            LeadStatus: 'Open - Not Contacted',

            },

          'xxxxxxxxxxxxxxxx');

</script>

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: munchkin.js resource error

First, let's be clear: you cannot use JavaScript in email.  Browsers and webmail clients will not allow this for security reasons.

The only way to get an email to perform unattended tracking actions is if you have a tracking image (a simple <IMG> tag) and the user has images enabled, and the user's firewall does not recognize and block Marketo tracking pixels.  As mentioned above, this combination of circumstances is not common enough to make opens a reliable metric.  (For the most part, those opens that are tracked did happen, but that says nothing about all other recipients.)

You can't put Marketo-compatible tracking pixels in a non-Marketo email. If you use some other software to generate these emails, you could embed a pixel that calls back to your server and then you could, in essence, forward that call back to Marketo using the REST or SOAP API.  It doesn't sound like you're ready to take on this technical effort.

If you want to track clicks, the path is somewhat easier.  You don't need any JS in the email (which will never work), but if your website (the target of a clickable link) loads Munchkin.js, then Munchkin will always log a Visited Web Page activity back to Marketo.  By default, this activity will be anonymous.  However, if you code the links in your emails properly, you can pass information to your webserver that will in turn allow Munchkin to associate that lead activity with the known lead (identified by email address).

View solution in original post

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: munchkin.js resource error

Jeff, if you are testing pages using the file:// protocol this will cause the observed symptoms (the Munchkin bootstrapper loads the latest Munchkin module from the scheme-relative //munchkin-cdn.marketo.net/..., not from the bootstrapper's domain).

Always test from a real webserver.

Anonymous
Not applicable

Re: munchkin.js resource error

Thanks Sanford. I am indeed using an .html file on the desktop to test (not from a web server).

Will this be any different if/when I embed the js code in an html email? Since the html email is not hosted on a web server, will it not behave just like an html file from the desktop?

(I am a js-embedded-in-email newbie)

thx

SanfordWhiteman
Level 10 - Community Moderator

Re: munchkin.js resource error

Jeff, you don't use Munchkin in emails.

For email open tracking Marketo automatically inserts a tracking pixel.  (Note, though, that open tracking is highly untrustworthy, as it only functions if the lead has enabled images in their email app.  Depending on your lead demographics, this could mean a small minority of your leads are even eligible to have their opens tracked.)

Munchkin is designed to be included in web pages where you want to follow the lead's click path.  It's automatically included in Marketo-hosted Landing Pages, but you have to add it to any 3rd-party website (and you definitely should).  In a nutshell, Munchkin is like a Marketo-aware Google Analytics, able to tie browser actions (clicks and pageviews) to leads in your Marketo database.

Anonymous
Not applicable

Re: munchkin.js resource error

Hmmm...

These are emails not originating from Marketo. Is there a way to track open, and if we have a button image in the html email, track when someone clicks the button?

I was hoping the button could execute some js to do the tracking.

TIA,

Jeff

SanfordWhiteman
Level 10 - Community Moderator

Re: munchkin.js resource error

First, let's be clear: you cannot use JavaScript in email.  Browsers and webmail clients will not allow this for security reasons.

The only way to get an email to perform unattended tracking actions is if you have a tracking image (a simple <IMG> tag) and the user has images enabled, and the user's firewall does not recognize and block Marketo tracking pixels.  As mentioned above, this combination of circumstances is not common enough to make opens a reliable metric.  (For the most part, those opens that are tracked did happen, but that says nothing about all other recipients.)

You can't put Marketo-compatible tracking pixels in a non-Marketo email. If you use some other software to generate these emails, you could embed a pixel that calls back to your server and then you could, in essence, forward that call back to Marketo using the REST or SOAP API.  It doesn't sound like you're ready to take on this technical effort.

If you want to track clicks, the path is somewhat easier.  You don't need any JS in the email (which will never work), but if your website (the target of a clickable link) loads Munchkin.js, then Munchkin will always log a Visited Web Page activity back to Marketo.  By default, this activity will be anonymous.  However, if you code the links in your emails properly, you can pass information to your webserver that will in turn allow Munchkin to associate that lead activity with the known lead (identified by email address).

Anonymous
Not applicable

Re: munchkin.js resource error

GREAT info Sanford! I really appreciate the explicit clarity, especially since I could not find similar looking through the Marketo developer web site.

I can code the links in the email to pass to the webserver with some identifiable info. And then I would change the web server code to accept that data and pass it into the munchkin code.

Thanks for all the help!

-jeff