Created
February 9, 2020 08:18
-
-
Save anorsich/a4f0027cf0ba0e0f84c82a9f71521e2c to your computer and use it in GitHub Desktop.
An example of how to connect any form to Funnelfly.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Documentation is available here https://docs.funnelfly.com/reference#section-on-form-submit | |
// The form is: https://www.babypalooza.com/contact-us/ | |
// Form field names is used to get fields and map them to funnelfly fields. | |
// Funnelfly's custom fields are used to store inquery message, website and type. | |
<script type="text/javascript"> | |
var form = document.getElementById('hsForm_c7ad58f4-b6df-4b48-bfa6-596cd823dbfd'); | |
funnelfly.onFormSubmit(form, ({ | |
email, | |
company, | |
firstname, | |
lastname, | |
phone, | |
website, | |
inquiry_type, | |
message, | |
}) => { | |
funnelfly.identify({ | |
email, | |
firstName: firstname, | |
lastName: lastname, | |
phone, | |
company: { | |
name: companyName, | |
}, | |
customFields: { | |
inquiryWebsite, | |
inquiryType: inquiry_type, | |
inquiryMessage: message | |
}, | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment