HubSpot Cloud
Last updated
Last updated
HubSpot is a CRM - it lets you keep track of all your customer leads. With the Freshpaint->HubSpot destination, you can create leads in HubSpot and send events to HubSpot based on your Freshpaint data
Compared to the HubSpot Web integration, this integration runs server-side. In general we recommend using this integration when possible
Connection Modes
Client-side | Server-side | |
---|---|---|
Web | ||
Mobile | ||
Server |
To set up the HubSpot integration, follow the following steps:
Go to the HubSpot Cloud configuration page in Freshpaint and click "Configure"
In HubSpot, go to your Settings > Integrations > Private Apps and click Create Private App and call it Freshpaint. Give the app read and write permissions on the crm.objects.contacts scope and request permission on the analytics.behavioral_events.send
After creating the app, you will be given an API key which you should provide to Freshpaint
If you want to send events to HubSpot, you will first need to set up Custom Behavioral Events see the section below on sending Custom Behavioral Events to HubSpot
When you call freshpaint.identify(), Freshpaint will create or update a contact in HubSpot based on the the email of the user by calling Hubspot's contacts API at: /crm/v3/objects/contacts
.
When creating a new contact, you should always include email
, because email address is the primary unique identifier used by HubSpot to avoid duplication.
In order for an identify call to succeed to HubSpot, you will need to provide the user's email either as the user ID in the identify call or as the email
user property in the identify call.
HubSpot has strict limitations on the properties you can attach to contacts. See the section on Property Limitations below.
Here is an example of an identify call:
Contacts created by Freshpaint will show up under the Contacts tab in Hubspot.
When you send events to HubSpot, Freshpaint will send the events as Custom Behavioral Events to Hubspot's Behavioral Events API at: https://api.hubspot.com/events/v3/send
Before you can send an event to HubSpot, you will need to set up a corresponding Custom Behavioral Event in HubSpot. To set up a Custom Behavioral Event:
Go to Reports > Analytics Tools and click Custom Behavioral Events
Click Create Event and Code Wizard
Provide the name and properties of the event you want in HubSpot
When asked how you want to send the event to HubSpot select Send data to HubSpot
You will be given a Tracking ID. This ID is the name of the event you need to provide to HubSpot. When you want to send an event in Freshpaint to HubSpot, you will need to set up a rename event transformation to rename the event to the given Tracking ID/Internal Name
HubSpot has strict limitations on the properties you can attach to events. See the section on Property Limitations below.
The event MUST have the same name as the HubSpot tracking ID/Internal name in order for the event to populate to HubSpot.
Only server-side connection mode is available for this destination. All events will be sent to HubSpot using Freshpaint's servers. Your website will not send data directly to HubSpot.
Set up transformations to modify your data before it's sent to your destination. Read more about transformations here.
HubSpot has strict limitations on properties. HubSpot only accepts a property if the name of the property is less than 50 characters and only consists of lowercase letters, numbers, and underscores.
Additionally, HubSpot only supports properties with either a string or numeric value. If you have a property name that does not fit this criteria, look at using a property transformation to convert the property into a format HubSpot supports.
HubSpot limits the number of event properties per event. Each event can contain data for up to 50 properties. If this limit is exceeded, the request will fail. See HubSpot documentation for other limits.
To view an event's available properties:
In HubSpot, navigate to Reports > Analytics Tools.
Click Custom Behavioral Events.
Click the name of the event.
Click the Properties tab.
In the properties table, view the property type under the name of the property.