SOLVED

Question around Pre-Fill data in forms and mkt_tok

Go to solution
Jignesh_Bhate
Level 2

Question around Pre-Fill data in forms and mkt_tok

As per recent change for security/privacy reasons, form fields would pre-fill lead data only if the token mkt_tok is appended as LP's URL query parameter. Below are the questions - 

1. How does the association of lead/person happens with mkt_tok? is this via the AssociateLead JS API?

2. Where is this mkt_tok stored in the Marketo DB against a lead record? I assume its a hashed key and a hidden field in DB for every lead/person (not supposed to be visible for security reasons). Also, do we really care to know about it?

3. Where does the mkt_tok query param get appended to LP URL?

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Question around Pre-Fill data in forms and mkt_tok

1. How does the association of lead/person happens with mkt_tok? is this via the AssociateLead JS API?

No, the Munchkin associateLead method is for manual association using a special user-generated hash key (not the mkt_tok).

In contrast, mkt_tok association happens automatically when a Visit Web Page activity is logged.

2. Where is this mkt_tok stored in the Marketo DB against a lead record? I assume its a hashed key and a hidden field in DB for every lead/person (not supposed to be visible for security reasons). Also, do we really care to know about it?

You don't really need to know anything about it except that when it's missing, neither native pre-fill nor session auto-association will work.

It'll be missing, for example, when a link is completely untracked, either deliberately or because it was tokenized incorrectly in an email. (The mkt_tok query param can also be manually added to links that are not click-tracked, though this is a very uncommon need.)

There's also not a one-to-one relationship between mkt_tok and lead. Each mkt_tok is specific to an email send + lead combo. So "it" isn't stored but rather "they." 

3. Where does the mkt_tok query param get appended to LP URL?

Where? Well, with a standard tracked link, after tracking the initial click (by rewriting the link to bounce off the tracking/branding domain) Marketo redirects the browser to the original URL w/the mkt_tok appended.

View solution in original post

6 REPLIES 6
SanfordWhiteman
Level 10 - Community Moderator

Re: Question around Pre-Fill data in forms and mkt_tok

1. How does the association of lead/person happens with mkt_tok? is this via the AssociateLead JS API?

No, the Munchkin associateLead method is for manual association using a special user-generated hash key (not the mkt_tok).

In contrast, mkt_tok association happens automatically when a Visit Web Page activity is logged.

2. Where is this mkt_tok stored in the Marketo DB against a lead record? I assume its a hashed key and a hidden field in DB for every lead/person (not supposed to be visible for security reasons). Also, do we really care to know about it?

You don't really need to know anything about it except that when it's missing, neither native pre-fill nor session auto-association will work.

It'll be missing, for example, when a link is completely untracked, either deliberately or because it was tokenized incorrectly in an email. (The mkt_tok query param can also be manually added to links that are not click-tracked, though this is a very uncommon need.)

There's also not a one-to-one relationship between mkt_tok and lead. Each mkt_tok is specific to an email send + lead combo. So "it" isn't stored but rather "they." 

3. Where does the mkt_tok query param get appended to LP URL?

Where? Well, with a standard tracked link, after tracking the initial click (by rewriting the link to bounce off the tracking/branding domain) Marketo redirects the browser to the original URL w/the mkt_tok appended.

Jignesh_Bhate
Level 2

Re: Question around Pre-Fill data in forms and mkt_tok

Thanks Sanford Whiteman

So, can I just say that it is used for tracking h-links within an email? I did see an option to choose to include mkt_tok param for links inside the email rich text editor, there's a checkbox in the UI. This token gets generated and then associated with the lead when you click on let's say 'View email in Browser' inside an email. Is this statement correct?

Also, I did observe that mkt_tok parameter remains same for all the h-links within that email for the lead whom the email is being sent to.

Just a question out of curiosity - just like how h-links include mkt_tok parameter, can't CTA buttons include it in the email? I didn't see an option to include mkt_tok as part of CTA URL though. Not that I want to include this in my CTA, but again curious to know and learn the differences.

SanfordWhiteman
Level 10 - Community Moderator

Re: Question around Pre-Fill data in forms and mkt_tok

So, can I just say that it is used for tracking h-links within an email?

Rather than coining new terms like "h-link" let's stick with the established terms like "hyperlink", "href", "clickable link", and "URL", OK?

The mkt_tok query parameter is used by the Munchkin JS library, automatically, to associate a previously anonymous Munchkin cookie with the known lead that followed a clickable web link in a Marketo-sent email.

A clickable web link is an http:// or https:// link, not a link using mailto: or another protocol.

But such links do not have to appear in the href attribute of an HTML <a> or <area> element! Remember, links in Text-only emails/Text parts are not hrefs (since there are no HTML tags) yet mail clients still allow you to follow those links. In other words: they're clickable web links, and they're hyperlinks in the broad sense of hypermedia, but they're not HTML links.

just like how h-links include mkt_tok parameter, can't CTA buttons include it in the email? I didn't see an option to include mkt_tok as part of CTA URL though.

Any clickable web link should result in a pageview with mkt_tok added to the URL.

If your clicks do not result in the mkt_tok being added to the original target URL, something is wrong. However, note on Marketo LPs the mkt_tok is stripped off as the page finishes loading, so it can be tricky to see that it was, indeed, present during the initial pageview, which is what matters.

Not that I want to include this in my CTA, but again curious to know and learn the differences.

You most certainly want the mkt_tok included on every clickable web link. You should not have to manually include it in the email editor, though.

Jignesh_Bhate
Level 2

Re: Question around Pre-Fill data in forms and mkt_tok

Rather than coining new terms like "h-link" let's stick with the established terms like "hyperlink", "href", "clickable link", and "URL", OK?

Sure Sanford. Will do.

If your clicks do not result in the mkt_tok being added to the original target URL, something is wrong. However, note on Marketo LPs the mkt_tok is stripped off as the page finishes loading, so it can be tricky to see that it was, indeed, present during the initial pageview, which is what matters.

Yes, you're right. It does include the mkt_tok param in the CTA URL. Its nearly invisible to naked eye (if one doesn't keep close attention) like first the initial tracking URL gets loaded and then the final CTA URL which does include and then probably the stripmkttok.js strips off the token param from the URL

SanfordWhiteman
Level 10 - Community Moderator

Re: Question around Pre-Fill data in forms and mkt_tok

Exactly right, I wish every Marketo user understood this sequence.

Jay_Jiang
Level 10

Re: Question around Pre-Fill data in forms and mkt_tok

not answering your question but just saying... you can deploy a workaround if that's what you're ultimately after https://nation.marketo.com/thread/50485-pre-fill-workaround