Intercom's Visitor model captures info about anonymous website browsers like pages viewed and their UTM source info. This is super valuable and if they send a message through Intercom the visitor is converted into a Lead so you can see all of that valuable info.
What I can't figure out is how to convert a Visitor into a Lead using a form submission. Intercom does not offer any form tools so the form necessarily must sit elsewhere. I am happy to use most form builders (Typeform, Google, etc). As it happens I'm currently using Unstack's built in form tool. All of these form tools allow you to create a new Lead in Intercom using Zapier but this is not connected to the Visitor so it provides none of the valuable intelligence about the person's journey before they completed the form.
Are there any ways, ideally using no code tools like Zapier, to convert a visitor into a lead when they complete a website form?
When I was exploring GoSquared they offered a method to do this by adding the following code to the form page so that GoSquared captured the completed form fields. Is something similar possible with Intercom?
GoSquared example code:
<script>
(function(){
document.getElementsByTagName('form')30].addEventListener('submit', function(evt){
let first_name = document.getElementsByName("first_name")o0].value
let last_name = document.getElementsByName("last_name")o0].value
let email = document.getElementsByName("email")o0].value
let organization = document.getElementsByName("organization")o0].value
_gs('identify', {
email: email,
first_name: first_name,
last_name: last_name,
custom: {
organization: organization
}
});
})
})();
</script>