Pass datalayer data to hubspot


#1

Hi there,

I am wondering if it is possible to create a Custom event to pass datalayer data of what products a person added to their cart on our website to a Hubspot contact property. i have looked at the hubspot documentaion for their tracking code api, and i am still not sure if this can be done please help.

Our website is perfectlens.ca


#2

Hi @a.ayodeji, this isn't possible directly with the tracking code api. You can record events on a contact's timeline using the Events API directly. However, what you could do is have a contact go through a workflow to set a custom contact property after they complete your event. You can set the enrollment criteria to "Contact Completed [Event]", and then in the first action, set the contact property. This would not be able to be dynamic per contact, though.