Best way to use forms for on-demand webinars | Community
Skip to main content
New Participant
February 8, 2023
Solved

Best way to use forms for on-demand webinars

  • February 8, 2023
  • 1 reply
  • 1644 views

Need your "Marketo" expertise on the following scenario.  We are looking at posting our on-demand webinars behind a Marketo form.  We would like to be able to use one form which we would embed on our website.  We need to be able to track which webinar they were interested in so that we can send an email with the link to it.  Once the form is submitted, we need take them to the video page.  Any suggestions on how to do this, if it is even possible?  Thank you so much for your help!

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

It’s totally possible, pretty easy really.

 

Have a Marketo field Next Webinar URL. Add that to the form as the hidden field. Populate it using page variables (stored in your CMS). So the output would be like:

{ let thisWebinarURL = "https://www.example.com/view/webinar/page.html"; MktoForms2.whenReady(function(mktoForm){ mktoForm.setValues({ nextWebinarURL : thisWebinarURL }); mktoForm.onSuccess(function(submittedValues,originalThankYouHref){ const originalThankYouURL = new URL(originalThankYouHref), overrideThankYouURL = new URL(submittedValues.nextWebinarURL); overrideThankYouURL.searchParams.set( "aliId", originalThankYouURL.searchParams.get("aliId") ); document.location.href = overrideThankYouURL.href; return false; }); }); }

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
February 9, 2023

It’s totally possible, pretty easy really.

 

Have a Marketo field Next Webinar URL. Add that to the form as the hidden field. Populate it using page variables (stored in your CMS). So the output would be like:

{ let thisWebinarURL = "https://www.example.com/view/webinar/page.html"; MktoForms2.whenReady(function(mktoForm){ mktoForm.setValues({ nextWebinarURL : thisWebinarURL }); mktoForm.onSuccess(function(submittedValues,originalThankYouHref){ const originalThankYouURL = new URL(originalThankYouHref), overrideThankYouURL = new URL(submittedValues.nextWebinarURL); overrideThankYouURL.searchParams.set( "aliId", originalThankYouURL.searchParams.get("aliId") ); document.location.href = overrideThankYouURL.href; return false; }); }); }
KARENBLAuthor
New Participant
February 9, 2023

@sanfordwhiteman you are the best!  Thank you for replying so quickly.