Sync hutk data with Contacts API

We are using the Contacts API to create HubSpot contacts when users register on our website. After registering, we pass their e-mail address to the JS push identify method, which syncs page activity to the contact.

_hsq.push(["identify",{
 email: 'test@test.com'
 }]);

This works well.

But we also want to sync the tracked page data from before the contact was created. Because now, the contact activity shows the contact has been created from offline sources by integration.
I understand this data is identified by the hutk cookie. But how can we attach/sync this to the contact ?

Hi, @InsightMedia :waving_hand: Thanks for reaching out. Hey, @miljkovicmisa @klloyd__1, do you have any tips for @InsightMedia?

Thank you! — Jaycee

Thanks for the tag @Jaycee_Lewis

@InsightMedia my recommendation would be to use the Submit Form Data API when a user registers on your site. You’ll of course be able to pass over Contact properties, but you’ll also be able to link the hutk of the cookie previously placed on their browser with the Form Submit API.

It’s possible there’s an API that is contact-based and attach’s the hutk, but this is certainly my preferred method and would work well with your registration case!