I'm trying to get Anonymous Lead through the SOAP API. This would be the source code within XML's body:
'<mkt:paramsGetLeadActivity>',
'<leadKey>',
'<keyType>COOKIE</keyType>',
'<keyValue>id:XXX-XXX-XXX&token:_mch-domain.com-1533412128399-11111</keyValue>',
'</leadKey>',
'<startPosition>',
'<latestCreatedAt />',
'<offset />',
'</startPosition>',
'<batchSize>10</batchSize>',
'</mkt:paramsGetLeadActivity>',
The resulting error is Lead does not exist, which is not true, because it is possible to obtain the Anonymous Lead using Marketo ID ('IDNUM' keyType, as documented at http://developers.marketo.com/soap-api/leads/getlead/).
Is this bug or feature? If it's intentional, is there any other way how to obtain Marketo ID from a Cookie? (Using SOAP, JS, REST, Munchkin etc.)
Thank you for your help, Joe
Hi Josef,
I could be wrong but getting/viewing anonymous leads in Marketo is no longer possible. We used to be able to see this information years back but I do not think you can see these leads in your Marketo database any more.
Also the document that you pointed to, refers to an existing lead in Marketo.
Hope this helps.
Thanks
Floyd
Hi Floyd,
Sorry - this is a SOAP API request, not a view in Marketo's administration.
As stated above, it is possible to retrieve the Anonymous Lead using Marketo ID (IDNUM) instead of the COOKIE, so the API does seem to return all leads, not just the known ones.
You can still view anonymous leads, when you double click into a record in lead database, just change the query string to a number that doesn't appear in your database view
i.e. /leadDatabase/loadLeadDetail?leadId=2580196
I know And I can get the Anonymous Lead using the LeadId (or Marketo ID, or IDNUM) from SOAP API.
The problem is that in some use cases, the only known information is COOKIE. The documentation says both identifiers can be used, but I cannot make it work with COOKIE.
Try with just "_mch-domain.com-1533412128399-11111"
Tried, does not work. Good idea, thanks.
You can use REST to get leadid by cookie
/rest/v1/leads.json?access_token=xxx&filterType=cookies&filterValues=_mch-domain.com-1533412128399-11111&fields=id
As per Sanfords post below, API calls on anonymous leads return no information.
If you want anonymous leads to appear in your database like old marketo days (be aware of the consequences) you could use the munchkin associate call to set a temporary unique email address (e.g. take the munchkin number string 1533412128399-11111@domain.com) and then you'd be able to utilise API calls to get leadId by cookie.
It is not possible to query still-anonymous leads using the cookie as the lookup key (neither with SOAP nor REST). The session must be associated with a lead first.
In general, Marketo is not the place to be working with web activity while it's still anonymous; the old methods for doing so have all been deprecated or removed, and there's no reporting advantage over GA/Clicky/et al. before the underlying lead is known.