Send events to HubSpot via device mode using the legacy API.
3 minute read
RudderStack supports the following API calls while sending data to Hubspot via web device mode using the legacy API.
Find the open source code for HubSpot’s web device mode in the GitHub repository.
Identify
RudderStack sends the identify call to create or update a contact in HubSpot. The contact’s email ID must be present in the traits object of the identify call.
You must call either page or track after the identify call to create a contact. RudderStack automatically associates the previously made page and track calls with that contact once they are identified.
HubSpot supports the following traits as special fields:
address
city
companyName
email
firstName
lastName
position
phone
zip
Custom properties
RudderStack supports sending custom properties to HubSpot via the identify call. These properties will update the contact property you have already created in HubSpot:
When you provide any custom property in the event, RudderStack automatically converts the field name into the lower case and replaces any space with an underscore. This is because HubSpot does not accept properties in the upper case and spaces.
RudderStack then maps the field values present in the traits to the corresponding HubSpot custom property.
HubSpot discards any property that does not exist and returns a 400 Bad Request error.
Dates
For sending properties of date type, you can send them as the epoch time or as a date object. RudderStack converts them to the required HubSpot format (midnight UTC).
Track
A track call lets you record various user actions and any properties associated with them.
To associate a track call with a user, you need to specify the user’s email under context.traits . Additionally, RudderStack associates the track events with the same user after an identify request is successfully made.
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.