Linking directly to a Marketo Form in a email | Community
Skip to main content
Amir_Saint1
Level 2
May 1, 2019
Question

Linking directly to a Marketo Form in a email

  • May 1, 2019
  • 1 reply
  • 1935 views

I have a marketo form on a webpage, the form is hidden behind a button that says "GET MORE INFO" when that button is clicked, the Marketo form appears for the user to fill out.

I have an email that will be sent to a group of people and in that email there is a link where I want people to click on to direct them to the webpage, but when they click on this link I want them to go directly to the form, not the "GET MORE INFO" button.

How do I do this?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

SanfordWhiteman
Level 10
May 1, 2019

Whatever code you're running on button click (presumably MktoForms.loadForm) check to see if the query string contains mkt_tok and if so, run that same code immediately on page load.

Amir_Saint1
Level 2
May 1, 2019

Can you give me an example?

SanfordWhiteman
Level 10
May 2, 2019

Depends entirely on what you're doing to show the form right now, and you haven't provided any code nor a URL.

A ridiculously simplified example is like so:

<button class="form-visibilizer">Gimme the form</button>

<script>

function makeFormVisible(){

// whatever you're doing to make the form visible

}

if (/[?&]mkt_tok=/.test(document.location.search)) {

makeFormVisible();

} else {

document.querySelector("button.form-visibilizer").addEventListener("click", makeFormVisible);

}

</script>