# Integrate with HubSpot

{% hint style="success" %}
Looking to integrate with Advocate? Refer to [Integrate with HubSpot for Advocate](https://integrations.impact.com/impact-brand/docs/integrate-with-hubspot-for-advocate) for additional instructions.
{% endhint %}

The impact.com / HubSpot extension can receive event data (e.g., lead form submissions) from HubSpot and track it as an action within the impact.com platform. You'll be able to identify specific event conditions that represent a conversion event, then configure a flexible mapping of data points to be sent from HubSpot to impact.com.

The most common use case is using HubSpot to monitor changes in status for contacts and deals (such as a lead turning into a sale), then reporting that data to impact.com as a conversion. From there, you can use the contracting and payment features of impact.com to credit partners for those actions.

This integration supports the following standard HubSpot objects:

* Deals
* Companies
* Contacts

## Prerequisites

***

{% hint style="success" %}
**Note:** You must activate consent for every single HubSpot entity for which you want to report conversions. You must also map all required impact.com fields for the conversion to be successful.
{% endhint %}

This section covers the prerequisites to meet before installing the impact.com app to your HubSpot account.

## Tracking Leads via impact.com or HubSpot

#### **Track leads via impact.com**

Events can be tracked using the impact.com UTT (Universal Tracking Tag), which is a small piece of JavaScript code that can be loaded using a Tag Manager solution, or placed manually on your website. Using the UTT offers richer user-level reporting in impact.com, supports *Direct Tracking* features, and more.

If you're planning to track lead events using the UTT, the *Customer ID* value sent via the `TrackConversion` function must also be available to the HubSpot objects that are being monitored and reported on. In other words, HubSpot needs to receive a Customer ID value in order for the integration to accurately correlate events.

#### **Track leads via HubSpot**

Lead submission can also be tracked through HubSpot. Impact appends an `im_ref` parameter + dynamic value (per click) on your landing page URLs. Example link: `yourdomain.com?im_ref=ref123`. The `im_ref` value (`ref123`) must be captured and stored. When the user submits the lead form, the `im_ref` value must be sent in a hidden field to HubSpot. There must be a consistent ID available in HubSpot objects that are being monitored and reported on to send in the `CustomerId` parameter.

{% hint style="success" %}
**Note:** If you're already tracking events with HubSpot or plan to do so, you can skip to [installing impact.com in HubSpot](https://integrations.impact.com/impact-brand/docs/integrate-with-hubspot#install--connect-impactcom-in-hubspot).
{% endhint %}

### Event Trigger Availability

Before planning your integration, review the limited set of predefined event triggers available within the impact.com plugin in HubSpot. Any custom-defined triggers in your HubSpot account will not be reflected as options in the event trigger drop-down menu.

### Check before integrating

impact.com will complete several integration steps on your behalf. Check with your implementation engineer to ensure that the following configuration steps have been completed: *Event Type*, *Gateway Tracking*, *General Tracking*.

## Install & connect impact.com in HubSpot

***

Once your impact.com is configured, you can install & connect the impact.com / HubSpot extension to your HubSpot account. Then, configure field mappings so that data appears in both platforms as expected.

### Install the impact.com app

1. Navigate to the [**Connector website**](https://hubspot-integration.impact.com/login).

<div data-with-frame="true"><figure><img src="/files/cHF8NgVIahZDHMgX4hR9" alt="" width="375"><figcaption></figcaption></figure></div>

2. Select **Click here to login through HubSpot**, then log in with your HubSpot credentials.

<div data-with-frame="true"><figure><img src="/files/RajBIyZZQDxpDvTO0pRj" alt="" width="375"><figcaption></figcaption></figure></div>

3. Select the HubSpot account you want to connect, then select **Choose Account**.

<figure><img src="/files/E3GEaNe3LX8tcYKf3NpF" alt="" width="375"><figcaption></figcaption></figure>

4. Review the access that impact.com is requesting, then select **Connect app**.

<div data-with-frame="true"><figure><img src="/files/IiqjoLXjRoIzZhGrvufk" alt="" width="350"><figcaption></figcaption></figure></div>

Once completed, you'll be redirected back to the app configuration page to enable and configure it.

### Connect your impact.com account

1. Navigate to the [**Connector website**](https://hubspot-integration.impact.com/login) — in the impact.com / HubSpot plugin menu, select **Settings**.

<div data-with-frame="true"><figure><img src="/files/FTkbHpdwPMRqpt3NTRUF" alt="" width="563"><figcaption></figcaption></figure></div>

2. Add your *Account SID*, *Auth Token*, and *Program ID*:

| Value              | Where to find it                                                                                                                                                                                                            |
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Account SID \*** | In the impact.com platform, navigate to your API Credentials.                                                                                                                                                               |
| **Auth Token \***  | In the impact.com platform, navigate to your API Credentials.                                                                                                                                                               |
| **Program ID \***  | <p>In the impact.com platform, select your account name in the upper-left corner and copy the gray numeric string below your program name in the right column.</p><p><br><img src="/files/gPZ9JQKGST9iStZEa6oG" alt=""></p> |

3. Select **Submit** to connect your impact.com account.

### Configure the impact.com / HubSpot app

### Enable event triggers

Use the *Event Triggers* screen to enable and disable the types of events you want to track in impact.com.

1. Set an event trigger to **Active** if you want impact.com to track a conversion (and thus, create an action) when a record of the specified event is *created*.&#x20;

<div data-with-frame="true"><figure><img src="/files/16UOoSEFwCiDk0g02pH9" alt="" width="563"><figcaption></figcaption></figure></div>

2. Select **Add trigger** for an event if you want impact.com to track a conversion (and thus, create an action) when a record of the specified event is *modified*.

<div data-with-frame="true"><figure><img src="/files/ic4t19GPUjfV8ZRfWcZX" alt="" width="563"><figcaption></figcaption></figure></div>

3. Adding multiple triggers acts as an `OR` statement. For example, if `Deal Type (dealtype)` and `Deal Name (dealname)` are added, a conversion event will be created whenever either field is modified.

<div data-with-frame="true"><figure><img src="/files/wbJXDI8x3Qwz6DAZH68V" alt="" width="563"><figcaption></figcaption></figure></div>

### Configure field mappings

The *Field Mappings* section is where you can specify which HubSpot fields are associated with impact.com fields to ensure accurate conversion (and action) reporting in impact.com.

<div data-with-frame="true"><figure><img src="/files/ytWmvBjDtnApYb932N2u" alt="" width="563"><figcaption></figcaption></figure></div>

Below are examples of field mappings for companies.

<div data-with-frame="true"><figure><img src="/files/Tzei8sR88MlxNsAc1Tuv" alt="" width="563"><figcaption></figcaption></figure></div>

* Select **Add mapping** under an event to map a HubSpot field to an impact.com field.

<div data-with-frame="true"><figure><img src="/files/vhXYltyp7oDwQEUCMOqR" alt="" width="563"><figcaption></figcaption></figure></div>

Refer to the tables below for examples of associated mappings. For each section, select **Add mapping** to add them.

{% hint style="success" %}
**Note:** These are example mappings that show different configurations. Choose mappings that apply to your integration, since you probably won't need them all.
{% endhint %}

#### Contacts

Only use `contact_[lead_status]_id` as a Contact's unique identifier when lead status is updated consistently at every stage of your HubSpot conversion funnel.

For `OrderId`, you have two recommendations depending on how consistently lead status is updated:

* **Lead status updated at every stage:** Map `contact_[lead_status]_id` to `OrderId`.
* **Lead status not updated at every stage:** Do not use `contact_[lead_status]_id` at all. Instead, map `hs_object_id` to `OrderId` (without removing the mapping of `hs_object_id` to `CustomerId`).

| HubSpot Field (Parameter)                                                       | impact.com Field   |
| ------------------------------------------------------------------------------- | ------------------ |
| `Lifecycle Stage (lifecyclestage)`                                              | `EventTypeCode`    |
| `Contact ID (hs_object_id)`                                                     | `CustomerId`       |
| `Contact Lead Status ID (contact_[lead_status]_id)` — only use when recommended | `OrderId`          |
| `Last Modified Date (lastmodifieddate)`                                         | `EventDate`        |
| `Company Name (company)`                                                        | `Text3`            |
| `City (city)`                                                                   | `CustomerCity`     |
| `Country/Region (country)`                                                      | `CustomerCountry`  |
| `Postal Code (zip)`                                                             | `CustomerPostCode` |
| `Impact Click ID (custom_impact_click_id)`                                      | `ClickId`          |

#### Deals

If you intend to configure mappings for multiple HubSpot object types (e.g., Contacts and Deals), the `CustomerId` must remain consistent across all event types. To achieve this, ensure *Deal* events reference the associated *Contact*’s `hs_object_id` rather than the Deal’s own `hs_object_id`.

**Before configuring Deals mappings:**

1. Create a **custom** Deal property to use as an ID.
2. Use a HubSpot workflow to populate this field automatically when a Deal is created with the associated *Contact*’s `hs_object_id`.
3. Map this custom property with `CustomerId` to ensure consistent event linking across object types.

| HubSpot Field (Parameter)                                                            | impact.com Field |
| ------------------------------------------------------------------------------------ | ---------------- |
| `Deal Stage (deal_[deal stage])`                                                     | `EventTypeCode`  |
| Custom `Deal ID` property (populated with the associated *Contact*'s `hs_object_id`) | `CustomerId`     |
| `Deal Stage ID (deal_[stage]_id)`                                                    | `OrderId`        |
| `Last Modified Date (hs_lastmodifieddate)`                                           | `EventDate`      |
| `Close Date (closedate)`                                                             | `Text3`          |
| `Deal Stage Probability (hs_deal_stage_probability)`                                 | `Text2`          |
| `Amount (amount)`                                                                    | `OrderSubTotal`  |

#### Line items

You can add the following field mappings to your deals mapping to include specific line item attributes:

| HubSpot Field                            | impact.com Field |
| ---------------------------------------- | ---------------- |
| `Line item hs_sku (line_item{i}.hs_sku)` | `ItemSku{i}`     |
| `Line item name (line_item{i}.name)`     | `ItemName{i}`    |
| `Line item price (line_item{i}.price)`   | `ItemPrice{i}`   |

For more information, see a detailed example in [HubSpot Line Items](https://integrations.impact.com/impact-brand/docs/hubspot-line-items).

{% hint style="success" %}
**Note:** If you have set up any custom fields that are not available in the mapping dropdown, try refreshing the custom fields by selecting the ![](https://files.readme.io/6268af0-refresh.png) **\[Circle]** next to the section title.
{% endhint %}

### Uninstall impact.com from HubSpot

***

#### Uninstall in HubSpot

Uninstalling impact.com in HubSpot will essentially pause the integration — if objects are updated or changed in HubSpot, it won't be reported to impact.com. Your settings will remain the same in case you wish to reinstall the integration in the future.

1. Log in to your HubSpot account — in the top navigation bar, select **Settings.**

<div data-with-frame="true"><figure><img src="/files/geFt7rTU2zBGQ55FeJZ6" alt="" width="563"><figcaption></figcaption></figure></div>

2. In the left navigation menu, select **Integrations → Connected Apps**.
3. Find the *Scale partnerships: impact.com* app and select **Actions → Uninstall**.

<div data-with-frame="true"><figure><img src="/files/qs3VojYRu7HzfcRG3ptk" alt="" width="563"><figcaption></figcaption></figure></div>

4. Read the prompt, type `uninstall` into the text field and select **Uninstall**.

<div data-with-frame="true"><figure><img src="/files/eGLxVOn4PUNHha2NfhEI" alt="" width="375"><figcaption></figcaption></figure></div>

### Delete account in impact.com extension dashboard

***

Deleting your account in the impact.com / HubSpot extension dashboard will delete your entire configuration. If you wish to use the integration in the future, you will need to reconfigure everything from scratch.

1. Navigate to the [**Connector website**](https://hubspot-integration.impact.com/login).
2. In the left navigation menu, select **Delete Account**.
3. Select **Delete** to delete your account configuration.

<div data-with-frame="true"><figure><img src="/files/1fW6jKHgaUqqvpZEQDcT" alt="" width="563"><figcaption></figcaption></figure></div>


---

# 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://integrations.impact.com/integration-guides/for-brands/plugin-integrations/crm-customer-relationship-management/integrate-with-hubspot.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.
