Currently, the Marketo forms we have on our gated content (white papers, webinars, etc.) pop up right away so people are unable to preview the content before filling out a form. I know to add a delay before the form pops I need to edit the code.
My team has run into issues with this in the past: "I've adjusted the code but it screws up people who are already cookied into the site. So right now (no edit to the code), if you return to read it later it says "welcome back (name)" and you click "read" and it takes you directly to the page. When you adjust the time in the script it works for first time users, but returning users get that pop up and then they cannot click through."
Has anyone dealt with a similar issue?
My team has run into issues with this in the past: "I've adjusted the code but it screws up people who are already cookied into the site. So right now (no edit to the code), if you return to read it later it says "welcome back (name)" and you click "read" and it takes you directly to the page. When you adjust the time in the script it works for first time users, but returning users get that pop up and then they cannot click through."
What edits exactly? Need to see precisely what changes they made, not just prose references to code. 🙂
The “Welcome back {name}“ means you’re using Known Visitor HTML (KV HTML). This is feature is off by default and changes the fundamental behavior of the form. However, delay or no delay doesn’t change if KV HTML works.
I don't have access to the edits unfortunately, they were taken off the website. Would the code shown in this discussion post work?
I'm going to test the above code either tomorrow or early next week.
Broadly speaking yes, but I would not use the display:none; container (in fact that can create problems with the autosizing of the form).
Just hide the form by default using CSS, then show it if it’s a child of the modal.
.mktoForm {
/* not display: none; */
visibility: hidden;
position: absolute;
}
.mktoModal .mktoForm {
/* not display: block; */
visibility: visible;
position: static;
}