Auth0 (Universal Login) and HubSpot Tracking Code (with Collected Forms)

Hi Jaycee,

I am a colleague of @fs_mb.

So we have a react SPA with a (non-hubspot) form (react-hook-form) that hooks onto onSubmit for validation. Once validation passes we call the Auth0-js login which triggers a browser redirect.

This redirect is what (sometimes) cancels the in-flight HubSpot form submission.

Your idea has merit but I don’t know how to wait for the HubSpot (non-hubspot) form submission to finish. The docs mention listening on the window.onmessage but that seems to me to be only for Hubspot forms in an iframe (i.e. not non-hubspot forms).

Could you clarify this for me please?

Thank you!