I am using Marketo REST API to get lead information, and I apply a filter of _mkto_trk cookie value.
My request looks like: https://078-whz-188.mktorest.com/rest/v1/leads.json?filterType=cookie&filterValues={cookie_value}&access_token={api_token}
Half of the time it works great, but then many times I get an empty result array back. What can be the reason for that? I even waited for an hour after new cookie was created, but still I see empty result array. Here is a screenshot:
This means that the request was successful, but there were no results. If you're using the cookie to retrieve by, the call will not be able to retrieve the record if it is anonymous, so this is likely this issue you're experiencing. The lead needs to become known prior to becoming accessible via the API.
Sure, but when I try to access same after a few hours, I do see result in the API response for the same cookie.
Does it take any time for leads to sync and be available via cookie filter?
Also, I do not entirely understand what you mean by anonymous here? All the leads are going into marketo the same way, via a PHP curl submission. Not sure why would lead id be available for only half of them.
Here is the flow that leads follow:
Thanks for the quick response.
By anonymous leads I mean this. Are you able to access the lead via the UI at the same time that your call returns no results? Does the lead have web activity(such as Visits Web Page)available in its activity log?
It takes around 30s to a minute for a lead to show up.
Aujasvi, beyond Kenny's questions, what is the business process that requires a server-side POST? You create the possibility of a DoS attack against your instance (when form post and/or API call limits are exceeded) so you should make sure to exhaust all client-side alternatives first. What is the process of data gathering/enhancement?
Hello - was there ever a resolution provided for this question? I am encountering a similar issue. Thank you!
Is it a similar issue, or this exact issue? Because this is specifically linked to the filter type of Cookie and people often don't understand the requirements for this filter.
I am having the exact same issue - sometimes I get an empty result set back, but not every single time (even with the same cookie value). Can you expand on your note about the filter type of Cookie and it's requirements? Thank you!
Same cookie value, different results = open a Support ticket.