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. 

Installing Code


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 prefinery_data .

Here are the currently supported values: The person's email address
prefinery_data.user.profile.first_name The person's first name
prefinery_data.user.profile.last_name The person's last name
prefinery_data.user.referral_code The person's referral code
prefinery_data.user.referral_link The person's referral link
prefinery_data.user.created_at When the person was added to your campaign The created user's unique ID in the system

Example Usage

  // Show email address of user who submitted the form
  console.log('Email: ' +;

  // Show prefinery_data object, which displays all data

Here are other examples: 

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