Skip to main content
Level 5
Feb 8, 2023 11:51 PM UTC
Solved

Best way to use forms for on-demand webinars

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.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Feb 9, 2023 1:43 AM UTC

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

2 replies

SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Feb 9, 2023 1:43 AM UTC

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; }); }); }
Translate
KARENBLAuthor
Level 5
Feb 9, 2023 6:08 PM UTC

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

Translate