This works usually but sometimes it appears that it does not. When i compare form submissons in Hubspot with the events being picked up in Google Analytics for our company account there are discrepancies. Of the past 40 successful form submissions, 5 of them were not picked up by GA. There’s no filtering going on in GA to exclude some submissions so as far as i can tell, the only explanation is that sometimes the code in the onFormSubmit() is not firing. Likewise, there are no javascript errors appearing in the console that might be blocking this.
Has anyone else any experience with this or any suggestions about next steps? Any reason why it should not fire sometimes? I should say that whenever i test this myself it works just fine
@gviner you might also want to investigate if those 5 submissions might have come from users who had adblockers or tracking blockers enabled. This is becoming more prevalent especially on iOS Safari opening up content blocker technology.
Hi there. Thanks for commenting and sorry for the delayed response from me. The form is definitely connected. And in that post the poster says that the form submission does not make its way into the HubSpot contacts database. That is not the case here. Everything is perfect from the Hubspot end. It’s Google Analytics where the data is missing, and the only likely explanation is that the onFormSubmit function works sometimes and not others.
I don’t suppose you have any other thoughts? This has happened again since i posted.