Like Jitsu? Give us a star on ⭐ GitHub!

πŸ“œ Server Configuration

πŸ‘©β€πŸ”¬ Extending Jitsu

Overview
Destination Extensions
API Specs

Jitsu Internals

HubSpot

Jitsu supports HubSpot as a destination.

HubSpot destination supports only stream

All incoming events are divided into 2 groups and sent to different HubSpot APIs:

  • Identification events (event_type field equal user_identify)
  • Other events

Identification events

Jitsu uses HubSpot Contacts API and sends createOrUpdate contact request to HubSpot with data (user properties) from /user or /eventn_ctx/user event JSON node depend on version of JS SDK. HubSpot supports default user properties like firstname, lastname, email, address, etc as well as custom user properties that are configured in HubSpot User Interface (About [contact] > View > View All Properties). You can manually set user properties in JS SDK id() call:

var user = loadUser() //load user from your application
jitsu.id({
  'firstname': user.firstname,
  'lastname': user.lastname,
  'email': user.email,
  'address': user.address,
  'company': user.company,
  'phone': user.phone,
  ...
})

or if you are using Jitsu Events API you should send event_type field with user_identify value and user JSON node that contains user properties:

{
  ...
  "event_type": "user_identify",
  "user": {
    "email": "customer@company.com",
    "firstname": "John",
    ...
  },
  ...
}

or you, also, could use Mappings for deliver all user properties into user JSON node.

All fields that aren't in default HubSpot properties or that aren't configured in HubSpot User Interface will be deleted from request. You can find all user properties in Contacts > Contact Settings. HubSpot does not accept properties that contain spaces or uppercases. All properties will be converted to lowercase and all not alphanumeric symbols are replaced with underscores.

Other events

If you have a HubSpot Enterprise account you can track all other events like page views, conversions, etc. Jitsu sends them via HubSpot Events HTTP API. You can configure your own custom behavioral events in HubSpot User Interface or HubSpot will auto-create them for you based on event_type.

For using a certain custom behavioral event - specify its name in event_type field:

jitsu.track("custom_event_type", {
  conversion: {
    revenue: 2000.0,
    currency: "USD",
  },
});

Jitsu sends custom events to HubSpot with the following fields:

  • event_type from input event JSON / path
  • revenue from input event JSON / or /conversion/revenue path
  • all configured user properties from /user or /eventn_ctx/user path depend on version of JS SDK.

Other events are supported only on HubSpot Enterprise plan. /user/email is required.

Filtering events

For filtering events stream to prevent sending all events to HubSpot table_name_template is used. For more information see Table Names and Filters.

Configuration

HubSpot destination config consists of the following schema:

destinations:
  my_hubspot:
    type: hubspot
    mode: stream
    hubspot:
      api_key: "b7bc95dc-4d52-48c1-8dcd-406aaa56c3cc" #Your HubSpot API Key - see below
      hub_id: "20546336" #Your Hub ID - see below
    data_layout:
      table_name_template: "{{text template}}" #Optional. It is used for filtering events.

HubSpot credentials

Field Type Description
api_key
(required)
string

Your HubSpot API Key (in UUID format, like: e91eb0d4-a72e-4688-9fe4-60cecf8376eb).

Read How to obtain API Key

.

hub_id
(required)
string

Your HubSpot Hub ID (in number format, like 453283).

Read How to obtain HubSpot Hub ID

.