Mixpanel Integration with Unbounce Form - jQuery


I’m trying to figure out the correct way to pass on the form field values from Unbounce to Mixpanel. Specifically I am trying to create a new “Profile” in Mixpanel when a user submits our Unbounce trial request form.

The required Mixpanel code is as follows:

Where “first_name.last_name” are the form field values from Unbounce we are looking to pass through and assign to the new profile in Mixpanel.

I believe I need to use the jQuery.val() method to grab these form values, and then pass them to Mixpanel via the mixpanel.alias method, but I’m not sure how to do this exactly, and I’m also not sure if this would go on the form page, or on the form completion page?