Re: Can my form have a dynamic submission Redirect URL based on a query var?

Marketo_User
Level 1

Can my form have a dynamic submission Redirect URL based on a query var?

I have multiple landing pages with forms that redirect to a specific page, but I'd like to set up a lead form for general use. Is it possible to pass a URL in a querystring to my Marketo landing page and have that used as the Redirect URL on submit? For example:

1. User arrives on mysite.com/page-1

2. Website checks if they are being referred from Marketo and redirects them to it if not:

marketo.mysite.com/general-form?redirect_url=http://mysite.com/page-1

3. That query var (redirect_url) is used as the form submission redirect URL. 

4. They submit the form and are redirected back to the page they were originally trying to access.

5. The server checks if they are being referred from marketo.mysite.com and grants them access to the page if so

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Can my form have a dynamic submission Redirect URL based on a query var?

Yes, use an onSuccess event listener to change the Thank You URL. There are many, many examples if you search.