Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

HubSpot Web (Actions) Destination


Destination Info
  • Accepts Page, Alias, Group, Identify and Track calls.
  • Refer to it as Hubspot Web (Actions), or HubSpot Web (Actions) in the Integrations object
  • This destination is not compatible with Destination Insert Functions.
(information)

Additional versions of this destination are available

This page is about the HubSpot Web (Actions) Destination. See below for information about other versions of the HubSpot destination:

HubSpot is an all-in-one marketing tool that helps attract new leads and converts them into paying customers, with features like landing page creation and email automation.

When you use the HubSpot Web (Actions) destination, Segment loads the HubSpot tracking code(link takes you to an external page) for you. In addition to tracking page views, the HubSpot tracking code allows you to identify visitors, track events, and manually track page views without reloading the page. The tracking code API allows you to dynamically create events and track event data in HubSpot.


Benefits of HubSpot Web (Actions) vs HubSpot Classic

benefits-of-hubspot-web-actions-vs-hubspot-classic page anchor

HubSpot Web (Actions) provides the following benefits over the classic HubSpot destination:

  • Fewer settings. Data mapping for actions-based destinations happens during configuration, which eliminates the need for most settings.
  • Clearer mapping of data. Actions-based destinations enable you to define the mapping between the data Segment receives from your source, and the data Segment sends to the destination.
  • Granular control over data sent. You can customize the conditions under which the events are sent to HubSpot.
  • Support for custom behavioral events. Send custom behavioral events(link takes you to an external page) and event properties to HubSpot.
  • Improved tracking for single-page apps. Keep track of page views in a single-page application without reloading the tracking code.

  1. From the Segment web app, navigate to Connections > Catalog.
  2. Search for HubSpot Web (Actions) in the Destinations Catalog, and select the destination.
  3. Click Configure HubSpot Web (Actions).
  4. Select the web source that will send data to HubSpot Web (Actions) and follow the steps to name your destination. The web source chosen must use Analytics.js 2.0.
  5. On the Settings tab, input your HubSpot Hub ID and configure the other destination settings.
  6. Follow the steps in the Destinations Actions documentation on Customizing mappings.
  7. Enable the destination and configured mappings.

Property nameTypeRequiredDescription
Enable the European Data Center SDK.boolean

Optional

Enable this option if you would like Segment to load the HubSpot SDK for EU data residency.


Flush Identify Calls Immediatelyboolean

Optional

Enable this option to fire a trackPageView HubSpot event immediately after each Segment identify call to flush the data to HubSpot immediately.


Format Custom Behavioral Event Namesboolean

Optional

Format the event names for custom behavioral event automatically to standard HubSpot format (pe<HubID>_event_name).


Load Forms SDKboolean

Optional

Enable this option if you would like Segment to automatically load the HubSpot Forms SDK onto your site.


Hub IDstring
required

The Hub ID of your HubSpot account.


HubSpot Web (Actions) has the following presets

Preset NameTriggerDefault Action
Upsert ContactEvent type = "identify"Upsert Contact
Track Custom Behavioral EventEvent type = "track"Track Custom Behavioral Event
Track Page ViewEvent type = "page"Track Page View

Build your own Mappings. Combine supported triggers with the following HubSpot Web-supported actions:

(information)

Mapping limits per destination

Individual destination instances have support a maximum of 50 mappings.

Upsert Contact

upsert-contact page anchor

Create or update a contact in HubSpot.

Upsert Contact is a Web action. The default Trigger is type = "identify"

Property nameTypeRequiredDescription
Email AddressSTRING
required

The contact’s email. Email is used to uniquely identify contact records in HubSpot and create or update the contact accordingly.


External IDSTRING

Optional

A custom external ID that identifies the visitor.


Custom PropertiesOBJECT

Optional

A list of key-value pairs that describe the contact. Please see HubSpot`s documentation(link takes you to an external page) for limitations in updating contact properties.


Company NameSTRING

Optional

The name of the company the contact is associated with.


CountrySTRING

Optional

The name of the country the contact is associated with.


StateSTRING

Optional

The name of the state the contact is associated with.


CitySTRING

Optional

The name of the city the contact is associated with.


Street AddressSTRING

Optional

The street address of the contact.


Postal CodeSTRING

Optional

The postal code of the contact.

Track Custom Behavioral Event

track-custom-behavioral-event page anchor

Send a custom behavioral event to HubSpot.

Track Custom Behavioral Event is a Web action. The default Trigger is type = "track"

Property nameTypeRequiredDescription
Event NameSTRING
required

The internal event name assigned by HubSpot. This can be found in your HubSpot account. If the "Format Custom Behavioral Event Names" setting is enabled, Segment will automatically convert your Segment event name into the expected HubSpot internal event name format.


Event PropertiesOBJECT

Optional

A list of key-value pairs that describe the event.

Track the page view for the current page in HubSpot.

Track Page View is a Web action. The default Trigger is type = "page"

Property nameTypeRequiredDescription
Path StringSTRING

Optional

The path of the current page. The set path will be treated as relative to the current domain being viewed.


Why aren't my custom behavioral events appearing in HubSpot?

why-arent-my-custom-behavioral-events-appearing-in-hubspot page anchor

You must have a HubSpot Enterprise Marketing Hub account to send custom behavioral events. If you have a HubSpot Enterprise Marketing Hub account and are still missing events, you might have exceeded the limit on the number of event properties per event. Each event can contain data for up to 50 properties. If this limit is exceeded, HubSpot will truncate to only update 50 properties per event completion. See HubSpot documentation(link takes you to an external page) for other limits.