Please bare with me as I am new to the HubSpot world. I am trying to create a custom form to integrate with HubSpot. When a user submits the form, a contact record should be created and a cookie should be set so that all page views are tracked. This works perfectly with the stock HubSpot form embed; however, I have some custom features that need to be implemented which require a custom form integration.
Here’s what I’ve tried:
I have created a form in HubSpot and am generating the form on my website using the
Submissions are handled through a standard form post and data is sent to the
forms/v2/portal/id endpoint, a 204 is sent as the successful response code. From my understanding, a contact record is created or updated at this point.
Here’s where it is different from the standard embed:
If I do a
contacts/v1/contact/utk/cookie/profile lookup on contacts created on a standard embed, the
is-contact flag is shown as
true. But, when I do the same lookup on a contact created with my custom form, the
is-contact flag is empty. To me, it seems like the form submission endpoint should be returning cookies for me to set – that is obviously not the case though.
Where do I go from here? How can I ensure that the proper tracking cookie is set, and all page views are tracked?