Marketo Token as URL param to override cookie

Highlighted

Marketo Token as URL param to override cookie

So I am passing the Marketo Token as a url parameter (?mkt_tok=XXXX) to an external site (SurveyMonkey in this instance) from a link in an email.  This then redirects on completion to a Marketo LP with the same url parameter in place since this is the only way I can track completion of the survey in Marketo without additional products or the effort and expense involved with a custom API build.

This all appears to work well with the url parameter correctly being populated and passed to the Marketo LP and the web page visit being logged in Marketo.

The issue is that if I already have a Marketo cookie on the device belonging to a different Lead, the web page visit is logged against the Lead that the cookie belongs to rather than against the lead that the Marketo Token belongs to.

Am I missing something in the documentation or is this a bug?

If the latter, does anyone have a work around?

Thanks in advance.

5 REPLIES 5
Highlighted
Level 10 - Community Moderator

Re: Marketo Token as URL param to override cookie

It's not a bug at all. The different association methods have different strengths (they have to, or there would be no way of declaring a "winning" lead association). An existing associated cookie is the strongest associator.

You can invalidate (i.e. remove) an existing associated cookie if you want to alter this behavior.

Highlighted

Re: Marketo Token as URL param to override cookie

Thanks for coming back so quickly Sanford.

I am surprised that the cookie 'wins' over the url parameter, but since it does, how do I go about invalidating the associated cookie?

Highlighted
Level 10 - Community Moderator

Re: Marketo Token as URL param to override cookie

Check to see if the cookie is associated, then delete it and refresh the page if so.

There are multiple ways to check the current association, but the easiest is to embed a hidden form with Known Visitor HTML enabled, and have the KV HTML contain the corresponding JS (ergo, the JS will only be executed if there's an association).

Highlighted

Re: Marketo Token as URL param to override cookie

I will give it a go, but I am wary of the order of actions since some Marketo script already strips the url parameter shortly after arrival at the page and, I assume, refreshes it.  I also need to test if Marketo classes them as a Known Visitor if there is a token in the url param since the entire purpose of it is to inform Marketo of who they are.  Will report back.

Highlighted
Level 10 - Community Moderator

Re: Marketo Token as URL param to override cookie

The token stripper runs last. It doesn't refresh the page but just changes the URL in-place (using replaceState).