Munchkin Code Installation Help | Community
Skip to main content
January 5, 2015
Solved

Munchkin Code Installation Help

  • January 5, 2015
  • 4 replies
  • 2102 views
Hi,

I'm new to Marketo and trying to setup the Munchkin Code on our site. The article provided by Marketo (https://community.marketo.com/MarketoArticle?id=kA050000000KyqXCAS) instructs us to place it right before the </body> tag. Usually these types of codes go before the opening <body> tag, so I'm a bit confused. Also, our website is hosted/coded by Digital Insight, so we only have access to editing small content blocks. Could I place the code at the end of the </div> content block that I can edit, or do I need to have someone at Digital Insight place it before the </body> tag (is there a difference?)
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 Dory_Viscoglio
Hi Caroline, I believe the recommendations for placement are just the ideal placement, but I've put it elsewhere with success. You might add the munchkin where you're able, wait a bit, and then see if you have any anonymous visitors to your website (via a web page activity report in the analytics section). It's likely that they'll still be tracked and this will save you some headaches with having someone else add a code somewhere that you're unable to update/edit. (You won't need to update it often/ever, but it's nice to exclude a third party from the process.)

4 replies

Dory_Viscoglio
Dory_ViscoglioAccepted solution
Level 10
January 5, 2015
Hi Caroline, I believe the recommendations for placement are just the ideal placement, but I've put it elsewhere with success. You might add the munchkin where you're able, wait a bit, and then see if you have any anonymous visitors to your website (via a web page activity report in the analytics section). It's likely that they'll still be tracked and this will save you some headaches with having someone else add a code somewhere that you're unable to update/edit. (You won't need to update it often/ever, but it's nice to exclude a third party from the process.)
Josh_Hill13
Level 10
January 5, 2015
It's ideal to place the code in the head area to ensure it is executed while the page loads, in case the person leaves before the page finishes execution.

Dory is right, it can be anywhere.
January 5, 2015
Wouldn't placing it just before the </body>, as it is suggested in the article, be putting it at the bottom of the code? Is this a typo where they meant to have it above the <body> (which would be te opening tag at the top of the page?) I agree that most of these codes are usually placed up at the head before opening <body> tag, that's why I was so confused about their recommendation to place it before the </body> tag.
January 5, 2015
I think it depends on what you are optimizing for. If you are optimizing for a faster page load, placing JavaScript such as Munchkin before closing </body> tag will make page load faster.