Some javascript was written to send information to Segment. Hubspot integration was not necessary, since Hubspot already took "submit" events to track form submissions. The code was written to handle forms either with one or multiple fields (ex. name and email).