SOLVED

Re: Munchkin API associateLead not updating in Marketo

Go to solution
Anonymous
Not applicable

Munchkin API associateLead not updating in Marketo

Hello all,

I have been trying and trying, and I don't see what is going wrong here. This is my script that I am using:

<script>

  $(document).ready(function(){

  mktoMunchkinFunction('associateLead',

  {

  Email: "chester@tester.com",

  FirstName: "Chester",

  LastName: "Tester"

  },

  'MY-HASH');

  });

</script>

When I load the page (in incognito mode, as an anonymous lead), I see the correct hash in the script, and my console shows the ?associateLead call being sent and returned with a 200 Status (OK):

2015-07-14_16-52-49.png

I do not see any console errors or any network errors in my web inspector. However when I search my leads in Marketo, chester@tester.com does not show up. Is there anything I am missing?

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Kenny_Elkington
Marketo Employee

Re: Munchkin API associateLead not updating in Marketo

You should be getting 9c04443e77efff688d6ad09ffee2cb37f3989138.  What's your hash code look like?  It should just be:

hash( (key + email) )

EDIT: looks like you're adding a literal period character in between the key and email, I get the same result from hash("abcdef.chester@tester.com")

In the sample code(Lead Tracking (Munchkin) » Marketo Developers​), that period is the concat operator in PHP.

View solution in original post

5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: Munchkin API associateLead not updating in Marketo

Can be hard to troubleshoot because the most important part, the hashing function, is something I we can't verify for you.

How about this: use the secret key "abcdef" and email address chester@tester.com and post the results of your hashing function.

Anonymous
Not applicable

Re: Munchkin API associateLead not updating in Marketo

Sure thing. When I hash "abcdef.chester@tester.com" I get "732298140FBB1378B6087AD752560F8D63CE853C"

Kenny_Elkington
Marketo Employee

Re: Munchkin API associateLead not updating in Marketo

You should be getting 9c04443e77efff688d6ad09ffee2cb37f3989138.  What's your hash code look like?  It should just be:

hash( (key + email) )

EDIT: looks like you're adding a literal period character in between the key and email, I get the same result from hash("abcdef.chester@tester.com")

In the sample code(Lead Tracking (Munchkin) » Marketo Developers​), that period is the concat operator in PHP.

SanfordWhiteman
Level 10 - Community Moderator

Re: Munchkin API associateLead not updating in Marketo

That isn't the right result, I suspect because you're using the wrong inputs.

It should be SHA1("abcdefchester@tester.com").

Anonymous
Not applicable

Re: Munchkin API associateLead not updating in Marketo

Ah ha! I was indeed putting a literal period between the secret key and email. Once I removed that, the function works as expected.

Thanks!!