SOLVED

Re: Why doesn't a form submission re-link a lead to it's token?

Go to solution
jtesmerapqc
Level 2

Why doesn't a form submission re-link a lead to it's token?

Hi there.   I recently encountered a situation where a lead was navigating through our website but the visitWebPage and clickLink events were not being recorded as activities in the activity log.

I checked into the browser configuration and confirmed that:

  1. the JS was configured correctly and clickLink and visitWebPage events were being POSTed to Marketo
  2. Do Not Track was OFF

I expected the events to flow into the activity log.

Upon further investigation, I realized that the CURRENT token value for the user was not recorded in the cookies value on the lead record. (I tested this using postman). Lots of other token values were there, but not the current one.

I followed the advice on this post and filled out a form as this user: Solved: When does a Cookie meet and match it's lead? - Marketing Nation (marketo.com.

I can see in the cookie is sent in the form submit, but the cookie was not updated on the lead record:

jtesmerapqc_0-1634251287077.png

 

After this, I used the associate.json endpoint to manually associate the cookie to the lead record:

jtesmerapqc_1-1634251336615.png

After I did that, all of the web activity flooded in.

So my question is: why isnt the form submit sufficient to link the cookie to the lead record? Do we need to be doing anything differently? Should we be calling the associate endpoint for all of our requests once we identify the user, just in case the cookie changes?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Why doesn't a form submission re-link a lead to it's token?

Sounds like you’ve changed something on your form. It should not be sending a field named cookies. You should see the field _mkt_trk sent. This automatically contains the current _mkto_trk cookie.

 

Post a link to your page so we can see how you’ve altered the behavior.

View solution in original post

9 REPLIES 9
SanfordWhiteman
Level 10 - Community Moderator

Re: Why doesn't a form submission re-link a lead to it's token?

Sounds like you’ve changed something on your form. It should not be sending a field named cookies. You should see the field _mkt_trk sent. This automatically contains the current _mkto_trk cookie.

 

Post a link to your page so we can see how you’ve altered the behavior.

SanfordWhiteman
Level 10 - Community Moderator

Re: Why doesn't a form submission re-link a lead to it's token?

And no, you absolutely should not be calling the REST API Associate Lead for every form post. Association is automatic. If you were to consume API calls like this you’d have an instant DDoS vulnerability.

jtesmerapqc
Level 2

Re: Why doesn't a form submission re-link a lead to it's token?

Got it, thank you.

jtesmerapqc
Level 2

Re: Why doesn't a form submission re-link a lead to it's token?

Yes, form submissions for us seem to be a bit of a sore subject. We have a fairly old implementation of integrations with Marketo and things have changed over time apparently. I believe that we are posting directly to Marketo at this point (i.e., the "Your webserver uses a server-side form post to simulate the lead filling out a form (not recommended and deprecated). This is also the way integrations like Twitter Cards work." approach).

 

I need to get with our developer and understand what the current method for doing form submits is. I'll report back.

SanfordWhiteman
Level 10 - Community Moderator

Re: Why doesn't a form submission re-link a lead to it's token?

The forms endpoint never uses the field "cookies", only the field "_mkt_trk".

That endpoint is being deprecated but you still aren't calling it correctly.
jtesmerapqc
Level 2

Re: Why doesn't a form submission re-link a lead to it's token?

I wonder if something changed over time? The developer mentioned that this documentation shows the use of a cookie parameter in a submit to this specific endpoint:

 

Leads - Marketo Developers

 

jtesmerapqc_0-1634564129565.png

 

jtesmerapqc
Level 2

Re: Why doesn't a form submission re-link a lead to it's token?

And now, I can see that we are sending "cookies" but this example shows the use of "cookie". 😬

SanfordWhiteman
Level 10 - Community Moderator

Re: Why doesn't a form submission re-link a lead to it's token?

You haven’t really been divulging everything you’re attempting to do. This makes troubleshooting difficult.

 

For example, you referred to a “form submission“ — but actually you’re calling Marketo‘s form-simulating REST API endpoint. This doesn’t work the same way as an actual Marketo form (close, but not the same) and it‘s never the direct target of a form post from the browser.

 

In any case, no, the cookie parameter for the Submit Form REST API has not changed.

jtesmerapqc
Level 2

Re: Why doesn't a form submission re-link a lead to it's token?

Believe me my friend, I'm doing my best to get as much information as I can. Thanks for your help.