Updating user properties via identify api


#1

I’d like to run regular updates of the user’s information using the javascript identify api but the information does not seem to be reflected in hubspot after running _hsq.push(["identify", identity]);" where identity is an object filled with {property: "value"}

Just to clarify I follow this up with _hsq.push(['trackPageView']); so it should definitely send


#2

Hi @Dylan,

Are you including the contact’s email with every identification call? Also, what’s the use case you’re trying to solve with regular updates via the tracking code API?


#3

We’re trying to solve issues with some race conditions for our activation, as well as maintaining membership state. Do we need to always have the email or just on the first identify?

Seems to be working now but not sure what changed. Could be a corrupted record.


#4

Hi @Dylan,

Technically once a hubspotutk cookie is associated with a contact record, subsequent identification calls can be made to update the contact record without including the email address. This isn’t recommended, however, since if the person clears their cookies or something similar, those identification calls (and the property updates) will be lost. In general, it’s best practice to include a contact’s email whenever you have it.

I’m glad to hear that it’s functioning correctly now; if you continue to experience issues with the tracking code API, please don’t hesitate to follow up in this topic.