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!
Solved! Go to Solution.
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;
});
});
}
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;
});
});
}
@SanfordWhiteman you are the best! Thank you for replying so quickly.