SOLVED

Sync Anonymous user data to lead

Go to solution
Anonymous
Not applicable
i'm having an issue our custom forms properly syncing anonymous data after someone has become a lead. I have tried both the munchkin API with associate lead (per this link: http://developers.marketo.com/blog/merge-anonymous-visitor-activity-when-visitor-fills-out-form/ ), as well as the standard implementation of the SOAP API call syncLead (which, as i understand it, will do the same job...). im not sure what im missing. 

here is a link to both of the implementations:
Any help would be great...Thanks!
Tags (1)
1 ACCEPTED SOLUTION
Kenny_Elkington
Marketo Employee
Hi Matt,

I see one issue in each of the examples you provided.  First, the associateLead call, you're setting th Email field to an empty string, so even in the call submits to your marketo instance, it can't associate the anonymous cookie into a known lead record.

EDIT: You're probably setting this dynamically in the server so this is probably a different issue.

Second, with your syncLead call, I don't see a marketoCookie parameter.  in the XML, the leadRecord needs a marketoCookie submitted after the leadAttributeList in order to perform a known-anonymous lead association.  Unless this is already a part of your LeadRecord class I don't see a way that this would work.

View solution in original post

6 REPLIES 6
Kenny_Elkington
Marketo Employee
Happy to help, Matt.  Cheers.
Anonymous
Not applicable
it looks like that worked! im having my team test now, but my preliminary tests show that anonymous lead data is now syncing!

thank you!!
Anonymous
Not applicable
Thank you!

i will try that and report back. 
Kenny_Elkington
Marketo Employee
That's right, Matt.  marketoCookie is the final attribute in the leadRecord as defined in the wsdl: http://developers.marketo.com/documentation/soap/synclead/  You'll need to pass the captured cookie value like this

$leadRec->marketoCookie = $marketoCookie;

Once you're passing this the association will be made between the cookied anonymous record and the known record indicated by your key.

I'd also add, I highly recommend logging your calls.  In case you need help from Marketo Support determining what's wrong with your calls, they'll require the XML call and respose to assist.
Anonymous
Not applicable
yea, the munchkin email field is being set via php (i guess i grabbed the interpreted source from the browser, instead of the actual file)

and what you are saying with the syncLead is that i need to add the optional parameter of marketoCookie like so? 
public function syncLead($key, $marketoCookie, $attrs) {
...
}

id prefer to use syncLead instead of the munchkin API whenever possible.
Kenny_Elkington
Marketo Employee
Hi Matt,

I see one issue in each of the examples you provided.  First, the associateLead call, you're setting th Email field to an empty string, so even in the call submits to your marketo instance, it can't associate the anonymous cookie into a known lead record.

EDIT: You're probably setting this dynamically in the server so this is probably a different issue.

Second, with your syncLead call, I don't see a marketoCookie parameter.  in the XML, the leadRecord needs a marketoCookie submitted after the leadAttributeList in order to perform a known-anonymous lead association.  Unless this is already a part of your LeadRecord class I don't see a way that this would work.