Re: Looking to change the amount of time before a Marketo form pops up for gated content on our website

mattcockayne
Level 2

Looking to change the amount of time before a Marketo form pops up for gated content on our website

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?

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Looking to change the amount of time before a Marketo form pops up for gated content on our website


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.

 

mattcockayne
Level 2

Re: Looking to change the amount of time before a Marketo form pops up for gated content on our website

I don't have access to the edits unfortunately, they were taken off the website. Would the code shown in this discussion post work?

 

https://nation.marketo.com/t5/product-discussions/delay-appearance-of-pop-up-lightbox-form-on-page/t...

 

I'm going to test the above code either tomorrow or early next week.

SanfordWhiteman
Level 10 - Community Moderator

Re: Looking to change the amount of time before a Marketo form pops up for gated content on our website

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;
}