How to run scripts when the Signup Form is submitted?
Prefinery provides you the ability to easily execute custom code or scripts when the signup form is submitted. This is particularly useful for integrating 3rd-party analytics tools with your campaigns like Segment, or to add each new user in your project into your own mailing list on platforms like Mailchimp.
While Prefinery already easily integrates with popular analytics tools like Google Analytics and Facebook Pixel, we're providing you a way to use your own custom scripts so you can do more after the user submits your form.
From your project dashboard, navigate to Signup Form, then select the JS tab.
In the Conversion Tracking Code box, paste in your custom script.
Hit Save when done.
Prefinery let's you access data for the user who submitted the form with your custom script in the variable named
Here are some common values:
||The person's email address|
||The person's first name|
||The person's last name|
||The person's referral code|
||The person's referral link|
||When the person was added to your campaign|
<script> // Show email address of user who submitted the form console.log('Email: ' + prefinery_data.user.email); // Show prefinery_data object, which displays all data console.dir(prefinery_data); </script>
Here are other examples: