guide to marketo munchkin javascript

The ultimate guide to Munchkin in Marketo Engage

If you are aiming to drive business growth by personalizing your customers’ complex buying journeys, then you must be already uniquely aligning your marketing and sales by using the beneficial features of Marketo marketing automation. But are you yet able to convert the anonymous visitors of your website into successful buyers? If not, then let me introduce you to Marketo’s Munchkin JavaScript that will allow you to track the end-user page visits to your landing pages and monitor the clicks to external web pages. This enables marketers to send triggered messages to those anonymous visitors based on their clicks, IP addresses, and other information.

Munchkin, Marketo’s custom JavaScript tracking code, automatically provides pre-configured tracking code snippets, governed by the license agreement, which is embedded on your external pages, will help you track activity back to your Marketo instance. Marketo Munchkin can automatically check if the user’s browser has a Munchkin cookie and if not, it can create one by itself. Moreover, its behavior can also be modified through the usage of Munchkin Configuration settings. By sending a “Visit Web Page” event to the designated Marketo instance using the information from the current page and browser, Munchkin records the corresponding user activity.

As a qualified lead visits your domain for the first time, a new anonymous lead record gets created in Marketo, using the Munchkin cookie in the user’s browser. It then keeps track of all other web activity by the user and updates the customer database with the information collected by analyzing user behavior.

Types of Munchkin Tracking Codes

There are three types of Munchkin tracking codes you can choose from, based on the impact you want to create around web-page loading:

Simple: Simple code loads the jQuery library each time a web page is loaded. It has the least lines of code and does not optimize for web page loading time.

Asynchronous: Once the rest of the webpage has loaded, Asynchronous code checks for the jQuery library and uses it for tracking code besides reducing webpage loading time.

Asynchronous jQuery: When it comes to reducing webpage loading time and improving system performance Asynchronous jQuery is the best. But the code will work only if you already have jQuery installed as it assumes the presence of jQuery and works accordingly.

But for Munchkin to work properly, the lead must visit a Munchkin-tracked page with an mkt_tok parameter in the query sytring from a tracked Marketo email link or fill out a Marketo Form, or a Munchkin associateLead call must be sent to the user’s Marketo instance. Alternatively, SOAP syncLead or REST Associate Lead call can also be sent to the user.

A lead association event must occur for each domain for known-lead tracking to occur across several domains because Munchkin creates and tracks individual cookies on a per-domain basis. Also, Munchkin cookies are specific to each second-level domain. By integrating Munchkin in your Marketo, you will enable faster deployment that can be easily browsed and configured without adding code directly to pages.

Its user-friendly configuration allows easy opt-out as well. For easy opt-out of Munchkin tracking entirely, one can add the query string parameter “marketo_opt_out=true” to the URL in their browser. As the Munchkin JavaScript detects this setting, it will attempt to set a new cookie “mkto_opt_out” with a value of true. At the same time, all other Marketo tracking cookies will be deleted, no new cookies can be set, and no HTTP requests can be made by Munchkin when this setting is detected.

It provides several functions which can be called manually through Javascript for customized tracking of browser events, such as video plays, or clicks on non-links. When called for createTrackingCookie(), Munchkin will check to see if there already exists an “_mkto_trk” cookie in the browser, and will create one if it does not. Also, when called for munchkinFunction(), it generates custom tracking behaviors, and when added with visitWebPage it will send a visit activity for the current user to Marketo. Moreover, calling munchkinFunction() with clickLink will send a click activity for the current user to Marketo and calling munchkinFunction() with associateLead will allow you to send field data to the lead record which corresponds to the browser’s current Marketo cookie value.

As the existing leads receive updates on each of the fields included in the data object, if there is no existing lead, then one will be created automatically. Also, Adobe Launch integration enables customers to seamlessly deploy standard Marketo Munchkin JavaScript to their website.

Marketo Munchkin has given marketing automation an added advantage when it comes to identifying and converting qualified leads. This enables marketers to aim high and strategize marketing campaigns that will target a higher number of customers.

Subscribe to our newsletter for the latest insights, trends, and strategies in the dynamic world of marketing technology. Don’t forget to check out our whitepaper for more valuable resources!