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):
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?
Solved! Go to Solution.
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.
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.
Sure thing. When I hash "abcdef.chester@tester.com" I get "732298140FBB1378B6087AD752560F8D63CE853C"
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.
That isn't the right result, I suspect because you're using the wrong inputs.
It should be SHA1("abcdefchester@tester.com").
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!!