Question
Apply one Marketo Form to a page with different redirects based on URL
We are running into an issue using only one Marketo Form in our website. We are trying to redirect each user to a protected content page based on the current website URL parameters. For example, the webinar page contains many links where each links leads to a different page. Each page contains a sample video and a Marketo form. If the user wants to view the full video, they are required to fill out the form. By using JavaScript, we would like to grab the current URL pathname and redirect them to a protected content page displaying the full video instead of redirecting them to the Marketo default external link within the Market form.
As of right now, the Marketo Form’s default URL is our company website and we are doing the testing on our subdomain website. In the Marketo form editing page, we are using an External URL which is our subdomain URL.
Our problem occurs when the user submits a Marketo form; I added an alert/console.log into my JavaScript to read the current URL of the page. The current URL links back to the Marketo form default URL which is our Company site URL instead of the Company Subdomain URL. We need the Marketo form to read our subdomain URL instead of the default URL so we can grab the subdomain URL pathname. Can anyone please help me how to approach this issue? Thank you.
Marketo form default URL: http://company.com/WebsiteView.html
Company site: http://company.com
Company subdomain site: http://company.subdomain.com
As of right now, the Marketo Form’s default URL is our company website and we are doing the testing on our subdomain website. In the Marketo form editing page, we are using an External URL which is our subdomain URL.
Our problem occurs when the user submits a Marketo form; I added an alert/console.log into my JavaScript to read the current URL of the page. The current URL links back to the Marketo form default URL which is our Company site URL instead of the Company Subdomain URL. We need the Marketo form to read our subdomain URL instead of the default URL so we can grab the subdomain URL pathname. Can anyone please help me how to approach this issue? Thank you.
Marketo form default URL: http://company.com/WebsiteView.html
Company site: http://company.com
Company subdomain site: http://company.subdomain.com