Hi, I’m trying to trigger GA events from an embedded hubspot form as well, but it’s not working after following the instructions. Here is my form code - what have I done incorrectly?
<!--[if lte IE 8]>
<script charset=“utf-8” type=“text/javascript” src=“//js.hsforms.net/forms/v2-legacy.js”></script>
<![endif]-->
<script charset=“utf-8” type=“text/javascript” src=“//js.hsforms.net/forms/v2.js”></script>
<script>
hbspt.forms.create({
portalId: “4326424”,
formId: “106e45cd-6e1d-43b2-af21-78798a4b3e68”,
onFormSubmit: function($form){
ga (‘send’, ‘event’, ‘form-submit’, ‘contact-submit’, ‘contact-us-page’)
},
});
</script>