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

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

1

From your project dashboard, navigate to Signup Form, then select the JS tab. 

2

In the Conversion Tracking Code box, paste in your custom script. 

3

Hit Save when done.

Variables

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 some common values:

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

Example Usage

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

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