Identify API not Updating Other Fields

Greetings,

I’m able to use the identify function to create a new contact, but I’m unable to create a contact with the other properties. I’ve tried using simple built in properties like firstname and lastname, as well as custom properties.
Here’s an example:

_hsq.push(["identify",{
 email: 'james_test@fake.com',
 firstname: 'Identify Test Email 1',
 lastname: 'From Page 2'
}]);
_hsq.push(['trackPageView']);

The contact is created, but the first and last name are not added.


@jbgrunewald wrote:

Greetings,

I’m able to use the identify function to create a new contact, but I’m unable to create a contact with the other properties. I’ve tried using simple built in properties like firstname and lastname, as well as custom properties.
Here’s an example:

_hsq.push(["identify",{
 email: 'james_test@fake.com',
 firstname: 'Identify Test Email 1',
 lastname: 'From Page 2'
}]);
_hsq.push(['trackPageView']);

The contact is created, but the first and last name are not added.


It’s best to use the HubSpot Contacts API instead. The Identify function is designed primarily for associating a visitor’s session with an email address, which limits its ability to update additional contact properties. By using the Contacts API, you can send an authenticated request to create or update a contact and include all the necessary properties, such as firstname and lastname.