How to have different "Confirmation Text" based on URL

Scenario:

  • I’ve got a form called “Contact”
  • The form is used on multiple pages: “/content” and “/hello”
  • I’d like to fire a different Google tracking (ex: Have a different “Confirmation Text” ) based on the page the form was filled out on

Any advice on how to accomplish this?
My initial thought is to use JavaScript in the “Confirmation Text” to check the URL, and conditionally fire the correct code.

Thank you!

Hello Aakash. Add a single line text field to your form. Then, you can use the {embed_post:post_title} merge tag as “Default Value” for a single line text field in your form. The Default Value setting can be found on the Advanced tab for your single line text field. It will look like this: https://d.pr/i/OiJpq9

That field will be populated with the page title from the page where the form was embedded. For example “Hello” or “Content”. You can then use conditional logic on multiple confirmations to run one confirmation if the page was Hello and another confirmation if the page was Content.

The Default confirmation will not have a conditional logic option. Only confirmations created after the default can use conditional logic (the default will be shown when no conditions match.) If you have any other questions, please let us know.

1 Like
© 2008 - 2021. Gravity Forms is a project by Rocketgenius Inc.