I want to be able to associate HubSpot's anonymous browsing data with Contacts created from the server.
HubSpot collects anonymous browising data which allows you to track where new leads/contacts came from. The unique ID for that appears to be hubspotutk in the cookies.
We can't run HubSpot's identify on the clientside and therefore we create new contacts using the server side SDK (node.js) whenever someone signs up. I want to associate these two things so that we get the all the marketing/funnnel info inside HubSpot.
Ideally we would just add hubspotutk as a property the to the contact create call we're already making, but that doesn't seem to be an option. Is there another way to accomplish the same thing?
I believe you can only accomplish this with Marketing Hub Enterprise using the option to Track a Custom Behavioral Event using the POST/events/v3/sendendpoint and including the utk and email as part of the body parameters.
I have been able to successfully run that with a server-side process when I have both the hubspotutk and the contact's email address, and it will create the contact associated to that anonymous visitor profile.
My full process is this:
Search for an existing contact with the email address.
Get a contact by its user token using that legacy endpoint. I do that to check and see if that hubspotutk is associated to an existing contact with a different email address already.