Re: Cookies not being picked up by webhooks

Anonymous
Not applicable

Cookies not being picked up by webhooks

Hi guys,

We have created a webhook to sync data from a Marketo web form into Salesforce.

What we are currently experiencing is that the webhook is failing in about 50% of cases because the cookie parameter in our webhook is empty. We have cookie code on our landing page, and the web form is delivered via a Marketo email.

We've tried testing whether or not blocking cookies on your browser is causing the issue, but the webhook only fails when this is done in Forefox. IE passed the cookie and the webhook was successful.

Does anyone have any other ideas as to why a cookie would not be dropped from a web form link in a Marketo email? There seems to be no consistency in the fails and passes that we're seeing.


Thanks

Natali
Tags (1)
9 REPLIES 9
Jep_Castelein2
Level 10

Re: Cookies not being picked up by webhooks

Can you please clarify: 
  • What the webhook does
  • What cookie you are talking about
  • What you are expecting to see
  • What is happening instead? 
Thanks, 
Jep
Anonymous
Not applicable

Re: Cookies not being picked up by webhooks

Hi Jep,

The webhook is taking the data entered into the web form and passing it through to Salesforce via a web service. The cookie is the one that is dropped by Marketo when you click a link in an email. We expect this data to be captured in the webhook and passed through to Salesforce, thereby syncing and updating the record. Instead, the webhook is returning a failed submission error with a reason of cookie parameter empty.

We've done some more testing on blocked cookies in IE and it's now failing (which half answers our question), but when we enable cookies again the values that are passed are "cookie failure" which is successfully submitting the webhook by default (as that parameter is now not empty).

I guess I'm just after reasons as to why a Marketo email may not drop a cookie onto someone's browser when they click on a link.
Jep_Castelein2
Level 10

Re: Cookies not being picked up by webhooks

How do you capture the cookie? Marketo does not save the cookie information in a Lead field by default, so I assume you wrote some custom JavaScript? 

Jep
Anonymous
Not applicable

Re: Cookies not being picked up by webhooks

Yes, we did write some cookie script to add to our landing page. At first we though it might be this script, but it looks to be correct.
Anonymous
Not applicable

Re: Cookies not being picked up by webhooks

Interesting - The cookie info is not exposed to the marketer from the UI anywhere (and that includes Webhooks).  I'd guess that you have some custom script in the LP which submits the marketo cookie in a custom field as part of form submit.  You'll probably have to debug that script.


Anonymous
Not applicable

Re: Cookies not being picked up by webhooks

Hi Raj,

Yes, that's correct. We placed custom cookie script on our landing page to drop and capture the cookies. The thing that's causing confusion is why this is working for some form submissions and not for others. We've tried reviewing the script, but can't seem to find anything in there that may be causing problems. It's currently running at a 50% success rate.
Jep_Castelein2
Level 10

Re: Cookies not being picked up by webhooks

For those leads where submitting the Cookie is unsuccessful, check whether you see any "visit web page" activities in the activity log. If yes, there is something wrong with your script. If no, there is something wrong with how the cookie is set (which could have many causes). In the latter case, I would recommend opening a support case, including links to the example leads where the cookie problem appears. 
Anonymous
Not applicable

Re: Cookies not being picked up by webhooks

Hi Jep,

I've had a look and I've found instances of both (which suggests script and cookie problems?)

We're still running tests on different scearios, so any ideas on what else we can test would be greatly appreciated.

Thanks

Natali
Jep_Castelein2
Level 10

Re: Cookies not being picked up by webhooks

Also try a wait step before you call the webhook.