# HubSpot Web

[HubSpot](https://www.hubspot.com/) 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 Cloud integration, this integration only supports web as a source.&#x20;

{% hint style="info" %}
In general we recommend using the HubSpot Cloud integration when possible.
{% endhint %}

{% hint style="warning" %}
Client-side only integrations cannot be used in HIPAA mode.
{% endhint %}

## Destination Info

* Accepts [Page](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#page), [Track](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#track), and [Identify](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#identify) calls
* Connection Modes:

  <table><thead><tr><th width="160.33333333333334" align="right">  </th><th data-type="checkbox">Client-side</th><th data-type="checkbox">Server-side</th></tr></thead><tbody><tr><td align="right">Web</td><td>true</td><td>false</td></tr><tr><td align="right">Mobile</td><td>false</td><td>false</td></tr><tr><td align="right">Server</td><td>false</td><td>false</td></tr></tbody></table>

## Getting Started

To set up the HubSpot Web destination, follow the following steps:

1. In HubSpot, find your HubSpot Account ID under your profile dropdown and configure it in Freshpaint. &#x20;

   <figure><img src="/files/cXg3j0wAgyiArBj5UqKY" alt=""><figcaption></figcaption></figure>

   <figure><img src="/files/vHiv3L86zrlsLzfCPN9o" alt=""><figcaption></figcaption></figure>
2. [Enable](https://app.gitbook.com/o/-MA7b_ezO9UcpNU5sTg_/s/-MA7aDqsXMFbUsWVqonF/~/changes/1124/readme/setting-up-your-destinations/enabling-and-disabling-a-destination) the desttination.&#x20;

## Identify

Calls to [freshpaint.identify()](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#identify) are mapped to the [HubSpot identify API call](https://legacydocs.hubspot.com/docs/methods/tracking_code_api/identify_visitor). Calling freshpaint.identify() will either create a new contact in HubSpot or update the existing contact in HubSpot. HubSpot deduplicates users based on the user's email.

{% hint style="info" %}
HubSpot requires an email to identify users. The email can be provided either as the userID passed to freshpaint.identify() or as a user property passed to freshpaint.identify(). If no email is provided, the freshpaint.identify() call will not call the HubSpot identify API.
{% endhint %}

You'll see contacts created from Freshpaint in the Contacts section of HubSpot.

<figure><img src="/files/jKxL5IXBChsOE87aaVzU" alt=""><figcaption></figcaption></figure>

Here is an example of an identify call:

```
freshpaint.identify({
 "email": "ada.lovelace@example.com",
 "name": "Ada Lovelace"
});
```

## Events

Events are mapped to the [HubSpot trackEvent API Call](https://legacydocs.hubspot.com/docs/methods/tracking_code_api/javascript_events_api). After sending an event to HubSpot you can use the HubSpot tooling to analyze the events and create reports on the data. Note that there is a 24 hour delay for when events will show up in HubSpot reporting.

{% hint style="warning" %}
HubSpot events are only supported on the HubSpot Marketing Hub Enterprise tier.
{% endhint %}

### Page Views in Hubspot

Calls to [freshpaint.page()](https://documentation.freshpaint.io/developer/freshpaint-sdk-reference#page) are mapped to the[ HubSpot trackPageView API call](https://legacydocs.hubspot.com/docs/methods/tracking_code_api/track_page_view) . Calling freshpaint.page() will create page view events in HubSpot.

<figure><img src="/files/cQUA5SK4Bmt6kCVhWvqb" alt=""><figcaption></figcaption></figure>

## Integration Option

Within the Integration Option, the HubSpot destination is referred to as "HubSpot". If you want an API call to not go to HubSpot, you can use the following code:

```javascript
freshpaint.identify(
  userID, 
  userProps, 
  {"integrations": {"HubSpot": false}}
);
```

If you want an API call to go to HubSpot and no other destinations, you can use the following code:

```javascript
freshpaint.identify(
  userID, 
  userProps, 
  {"integrations": {"All": false, "HubSpot": true}}
);
```

## Configuration Options

### Connection Mode Settings

Only client-side connection mode is available for this destination. Events originating from the user's web browser will be sent directly to HubSpot.

### Event Transformations

Set up transformations to modify your data before it's sent to your destination. Read more about transformations [here](https://documentation.freshpaint.io/data-management/transformations).

<figure><img src="/files/aOKkpLvEjEmGXuzLhTCA" alt=""><figcaption></figcaption></figure>

## API Call Limitations

HubSpot has limits on the total amount of hourly and daily requests Freshpaint can make to their API on your behalf. See HubSpot’s [API Usage Guidelines](https://developers.hubspot.com/apps/api_guidelines) for more information.

HubSpot Plan: Free & Starter

* Maximum Number of API Calls per 10 Seconds, per Key or Token: **100**
* Maximum Number of API Calls per Day, per Key or Token: **250,000**

HubSpot Plan: Professional and Enterprise

* Maximum Number of API Calls per 10 Seconds, per Key or Token: **100**
* Maximum Number of API Calls per Day, per Key or Token: **500,000**

HubSpot Plan: API Add-On (Any Tier)

* Maximum Number of API Calls per 10 Seconds, per Key or Token: **120**
* Maximum Number of API Calls per Day, per Key or Token: **1,000,000**


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.freshpaint.io/integrations/destinations/apps/hubspot-web.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
