Pulling data from a user's Marketo cookie | Community
Skip to main content
August 14, 2013
Solved

Pulling data from a user's Marketo cookie

  • August 14, 2013
  • 3 replies
  • 1577 views
Is it possible for me to pull the user's email address (as it stands in the DB) from the Marketo cookie on their system?

I would like to write some code that basically says:

IF (an email address is found in the Marketo cookie) {
     echo $email;
}
else {
    echo "not found";
}

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by
I second Erik. SOAP API would be an effective option.  
 
You can call getLead, passing Cookie as LeadKey. The generic format is id:561-HYG-937&token:_mch-marketo.com- 1258067434006-50277 where the first 9 characters are the Munchkin ID.
 
You can then relay the extra data through syncLead.

3 replies

August 15, 2013
Sort of. You can query the SOAP API with a cookie's ID to get that information, but that generally isn't fast enough to use inline in a website.

What are you trying to do?
August 15, 2013
We have a new feature we're adding to our website. To access it, they need to go through a Marketo form (iframe). Once they get into the feature, we are collecting some data from their use of it that we'd also like to add into SalesForce (via Marketo if possible). The issue is, once they're past that initial form, we have no way to connect that extra data with the proper lead unless we can grab the email address or lead ID out of "thin air".
Accepted solution
August 15, 2013
I second Erik. SOAP API would be an effective option.  
 
You can call getLead, passing Cookie as LeadKey. The generic format is id:561-HYG-937&token:_mch-marketo.com- 1258067434006-50277 where the first 9 characters are the Munchkin ID.
 
You can then relay the extra data through syncLead.