How to pass user data as redirect URL parameters on form submit

Prefinery already provides you the option to redirect the user to another webpage on form submit, even including the user ID as URL parameter if for example you've embedded the referral page on its own separate page

If your use case requires more than just the user ID to be passed through the redirect URL on form submit, perhaps the user's email address or name, you'll need to use JavaScript for that like as follows:

<script>
  window.top.location.href = "https://www.google.com?email=" + prefinery_data.user.email + "&refcode=" + prefinery_data.user.referral_code;
</script>

prefinery_data.user.email (user's email address) and prefinery_data.user.referral_code (user's referral code) are two of the supported Prefinery variables (usable only in the following method) that allows you to access data for the user who submitted the form with your custom script as described here: How to run scripts when the Signup Form is submitted?

Your script should go in Signup Form > JS tab > Conversion Tracking Code as shown below: 

Then in the Settings tab, you can set the form to show a thank you message though it won't really be shown since the user will just get redirected by the script anyways:

Still need help? How can we help? How can we help?