SOLVED

Can a known user custom html field be used with something other than a session cookie?

Go to solution
John_Wallace
Level 4

Can a known user custom html field be used with something other than a session cookie?

Hi everyone, from what I have been able to gather that when you use a form with the known user custom html field, Marketo uses a session cookie to store whether the user is known or unknown.  Can someone confirm this is the case, it is not clear in the documentation?  I have tested it locally and it seems that this cookie only persists for a browser session, is it possible to create a cookie that would not expire or at least, last longer than a session?  We are using a form on a static site using the forms 2.0 api to embed on a landing page.  I have been tasked to essentially gate a nongated landing page depending if a user is known or not and if they come through an adwords campaign with certain utm parameters.   Not sure if the known user field could be used for something like this.  Any advice would be greatly appreciated, maybe Sanford Whiteman could weigh in?  Thanks!

-John

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Can a known user custom html field be used with something other than a session cookie?

The Known Visitor HTML feature is based on whether the current _mkto_trk cookie or the current mkt_tok query parameter is associated with a lead in your database, and does work equally well on both Marketo and non-Marketo pages.

Munchkin cookies last for 2 years of inactivity, so the session is all but permanent.

The Known Visitor HTML feature can indeed be leveraged for exactly what you describe, by checking for the presence of the the UTM params within the KV HTML block.  Please read the recent post Auto-submitting a form for Known Visitors​.

View solution in original post

5 REPLIES 5
Paul_Johnson
Level 5

Re: Can a known user custom html field be used with something other than a session cookie?

John, the cookie DOES last more than just one session but works best on Marketo landing pages. There's some work to be done if you're hoping to pre-populate information on a page that isn't a marketo landing page.

John_Wallace
Level 4

Re: Can a known user custom html field be used with something other than a session cookie?

Hey Paul, thanks for the response. I would not need to populate the known user form since it will be hidden with css, using it more as a way to determine if another form should be loaded where unknown users would need to fill out to download some content.  Too bad I selfishly convinced the team to move off of marketo hosted landing pages to embedding forms on pages hosted on our site.  So it sounds like this may not be the most reliable thing to do with a non marketo landing page. 

SanfordWhiteman
Level 10 - Community Moderator

Re: Can a known user custom html field be used with something other than a session cookie?

So it sounds like this may not be the most reliable thing to do with a non marketo landing page.

It's totally fine to do with a non-Marketo page. The logic is the same.

What you can't do on a non-Marketo page (not natively) is check for a non-empty token like {{lead.Email Address}} in lieu of the KV HTML.  (On the other hand, that's a fragile and incomplete emulation, as a lead need not have a current email address for the session to be associated.)

SanfordWhiteman
Level 10 - Community Moderator

Re: Can a known user custom html field be used with something other than a session cookie?

The Known Visitor HTML feature is based on whether the current _mkto_trk cookie or the current mkt_tok query parameter is associated with a lead in your database, and does work equally well on both Marketo and non-Marketo pages.

Munchkin cookies last for 2 years of inactivity, so the session is all but permanent.

The Known Visitor HTML feature can indeed be leveraged for exactly what you describe, by checking for the presence of the the UTM params within the KV HTML block.  Please read the recent post Auto-submitting a form for Known Visitors​.

John_Wallace
Level 4

Re: Can a known user custom html field be used with something other than a session cookie?

Great thanks so much Sanford!  I will take a look at your post, 2 years would be plenty of time.