Including Munchkin.js does not creating an anonymous lead | Community
Skip to main content
July 31, 2015
Question

Including Munchkin.js does not creating an anonymous lead

  • July 31, 2015
  • 2 replies
  • 2262 views

Hi Marketo,

On my website, I have included Munchkin.js inclusion code and it creates a new cookie correctly. However, it does NOT create an anonymous lead in Marketo.

While I'm hitting the page with no cookie, I'm checking the lead database.

Just to make it sure, I have created one smart list that only shows an anonymous lead and it's not creating a lead.

I'm also checking all leads in case it's created as a known lead and it's not there either.

In every case, _mkto_trk cookie is set correctly.

Can you give me any advice on this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

SanfordWhiteman
Level 10
July 31, 2015

Well, you have to call Munchkin.init('AAA-BBB-CCC'); as well as loading the core JS file. (Where AAA-BBB-CCC is your Munchkin ID.)

The most targeted place to see web activity is a Web Page Activity report. On the Setup tab, make sure Anonymous Leads is set to "Shown."

And post your actual URL so we can check it.

July 31, 2015

Munchkin.init() is called.

FYI after Munchkin.init() is called and it sets cookie to the browser, I also make AJAX request to my own serverside script that makes REST API call to createOrUpdate call.

Server side API request to Marketo DOES create a new lead with custom field values I set.

However, Munchkin.init() is NOT creating an anonymous lead I'm expecting.

Another question is I'm checking the full list of leads and smart filtered list from Lead Database section. Are you saying I had better not check from that place?

SanfordWhiteman
Level 10
July 31, 2015

The setting of the cookie doesn't mean that Munchkin is set up correctly, as the cookie is randomly generated on the client side.  Unless the server receives a Visit Web Page request keyed to your instance, there will be no lead created or updated.  In other words, with Munchkin.init('WHA-TEV-ER') you will still get a cookie.

Can you please post your actual URL?

I also make AJAX request to my own serverside script that makes REST API call to createOrUpdate call.

(a) Why? 

(b) Is this something you're leaving in production?

(c) If it's staying in prod, are you aware you can only fire this 10,000 times a day? The APIs should not be used this way; they're meant for offline batch use, not proxying end-user activities.

SanfordWhiteman
Level 10
July 31, 2015

I see your follow-up post now.  You can follow me and DM me the URL.  Attempting to troubleshoot network activity without seeing the real-life page is a dead end.