Welcome to the Instapage Support Center


Marketo Munchkin


The main Marketo integration sends the lead collected by your Instapage form to your Marketo list, but it does not associate it with the specific web traffic, and all web data (pages views, dates visited, URL paths, and more) is lost.

In order to associate the lead with the respective web data, Marketo works with its own pixel called Munchkin. There are several ways in which you can implement Munchkin on your pages in order to start collecting the web data corresponding to your leads.

1. Our direct integration

Navigate to your Integrations dashboard and select the Marketo Munchkin card to expand it.


When you expand the card, you will see this screen where you can place your Munchkin tracking code from the same Marketo account that you already have connected.


After adding your code, it will look something like this:


By clicking on the Connect button, the Munchkin tracking code will be added to all of your pages on that subaccount, and the lead association feature will work on all of your forms that are integrated with Marketo.

To disconnect the integration, expand the card and click on the Disconnect button.


Then confirm the action:


2. Adding Munchkin through custom code

You can choose to add the Marketo Munchkin to your pages through custom code if you only want to track a few pages, instead of all of the pages within a subaccount.

In order to add the Munchkin script on one of your pages you will have to use custom code, navigate to Settings > Javascript > Footer and add your Munchkin code there, as well as this code:


// Paste Asynchronous Munchkin Script (without <script> tags)
// --- HERE

(function() {
   function getCookie(cname) {
       var name = cname + "=";
       var decodedCookie = decodeURIComponent(document.cookie);
       var ca = decodedCookie.split(';');
       for (var i = 0; i < ca.length; i++) {
           var c = ca[i];
           while (c.charAt(0) === ' ') {
               c = c.substring(1);
           if (c.indexOf(name) === 0) {
               return c.substring(name.length, c.length);
       return "";

   function createInput(cookieValue) {
       var fieldName = "munchkinField";
       var input = document.createElement('input');
       input.name = window.btoa(fieldName);
       input.type = 'hidden';
       input.value = cookieValue;
       return input;

  function appendInput(cookieValue) {
       var forms = document.querySelectorAll('.email-form')
           var input = createInput(cookieValue);
           var inputExists = form.querySelector('input[name="' + input.name + '"]');
           if (!inputExists) {

   var checkCookieInterval = setInterval(function() {
       var cookieName = "_mkto_trk";
       var cookieValue = getCookie(cookieName);
       if (cookieValue) {
   }, 2000);
/*** END OF SCRIPT ***/

Another option would be to add it through Google Tag Manager if you are already using GTM to manage all of your scripts.

To achieve this, you will need to select Custom HTML within GTM and add your Munchkin code as well as our code (provided above), then save. Now, for all of the pages that you have GTM implemented on, your leads will have their web data associated inside Marketo.


Marketo Munchkin and GDPR

Since Munchkin will place a tracking cookie into the visitor's browser, to make sure your pages are GDPR compliant you will have to implement the Cookie Bar according to this article: Blocking Loading Cookies from Tracking Scripts

If you have implemented Marketo Munchkin through our direct integration, it's enough to simply turn the cookie bar ON. However, if you have implemented it through custom code you will need to wrap the Muchkin code in the GDPR function as explained at the bottom of the article above, then turn the cookie bar ON.

Have more questions? Submit a request
Was this article helpful?
0 out of 0 found this helpful

Need Further Help?

Tell us what you need and we will be happy to assist you.

Our team of expert support staff and our community can answer your questions. Submit a ticket, or reach out on live chat!