# HubSpot and GoHighLevel

> Connect HubSpot or GoHighLevel with one login (when shipped). Won deals count as sales, and each profile goes back with where the person came from.

Source: https://datacenter.so/docs/crm-connectors
Section: Measure

The HubSpot and GoHighLevel connectors work in two directions:

- **In:** contacts join your [customer profiles](https://datacenter.so/docs/customer-profiles). Deal stages, wins and losses show on each person's timeline. A won deal counts as a sale in revenue and in the [Attribution report](https://datacenter.so/docs/attribution-report).
- **Out:** Datacenter sends each person who gave you an email to your CRM as a contact, with their first and last source, campaign, ad platform, landing page, short link, visits, revenue and orders.

It is on paid plans: Solo, Studio, Agency and Custom. Free does not include it.

Each connector needs Datacenter's own HubSpot or GoHighLevel app. Until it is set up for this server, the row says **(when shipped)**. A [webhook](https://datacenter.so/docs/webhooks-out) to Zapier or Make can do the same job until then.

## Connect

1. In Datacenter, open your site, then **Settings**, then **Integrations**. Under **CRMs and sending**, click **Connect** next to **HubSpot** or **GoHighLevel**. The login opens in a new tab.
2. Log in and approve what Datacenter asks for.
   - **HubSpot:** pick the HubSpot account if you have more than one.
   - **GoHighLevel:** pick one sub-account (location). Agency logins are not supported. Connect each client's sub-account on that client's site.
3. You land on the connector's page. The import of the last 90 days starts right away.

What Datacenter asks for:

| Tool | Permissions | Why |
|---|---|---|
| HubSpot | `crm.objects.contacts.read`, `crm.objects.deals.read` | Read contacts and deals |
| HubSpot | `crm.objects.contacts.write`, `crm.schemas.contacts.read`, `crm.schemas.contacts.write` | Send profiles back, and add the Datacenter properties |
| GoHighLevel | `contacts.readonly`, `opportunities.readonly`, `locations.readonly` | Read contacts, opportunities and the sub-account name |
| GoHighLevel | `contacts.write`, `locations/customFields.readonly`, `locations/customFields.write` | Send profiles back, and add the Datacenter custom fields |

Datacenter never deletes anything in your CRM, and never changes a deal or an opportunity.

If you already connected the same CRM account on another site, the page offers **Use** that login, so you do not log in again.

## What comes in

- **Contacts** made in the last 90 days become customer profiles, with an **Added to CRM** item. The item keeps the CRM's own source, like "Paid social, Facebook" in HubSpot or "Facebook form" in GoHighLevel.
- **Older contacts** only join people Datacenter already knows (by email or phone). A big CRM does not fill your profiles with people who never visited.
- **UTM tags and click ids** the CRM kept become the person's first touch, when they are older than what Datacenter saw. HubSpot keeps them in the first page address. GoHighLevel keeps them in the contact's attribution.
- **Deals** (HubSpot) and **opportunities** (GoHighLevel): each stage the deal entered is a **Deal stage changed** item, then **Deal won** or **Deal lost**. HubSpot keeps every stage with its time. GoHighLevel only says the current stage, so Datacenter stores the stages it sees.

After the first import, Datacenter checks every 15 minutes, and reads one day back each time so late changes are not missed. Each item is stored once.

### Won deals as sales

A won deal with a value counts as a sale:

- It adds to the person's orders and revenue.
- It counts as a conversion of your goals on the `Purchase` event in the Attribution report, at the time it was won. When the person never visited your site, the deal is credited to the UTM tags on their CRM contact.
- It counts once, however often Datacenter reads it. Its id is `hubspot-deal-` or `ghl-opp-` and the CRM's id.
- It is never sent to Meta, since it is not a website purchase.

A deal won in the last 3 days also starts any [automation](https://datacenter.so/docs/automations) that begins with **A deal is won in your CRM**. A flow can send someone to your CRM too, with a **Push to CRM** step.

If the same sales already come from [Stripe](https://datacenter.so/docs/stripe-connector) or [Shopify](https://datacenter.so/docs/shopify-connector), turn off **Count won deals as sales**. The wins stay on the timeline, with their amount, but are not counted twice. The switch applies to deals won from then on.

**GoHighLevel:** its API does not say which currency your opportunity values are in. Pick it under **Contacts and opportunities in**. It is USD until you do.

## What goes out

Under **Send profiles to HubSpot** (or GoHighLevel), tick the fields to send and click **Start sending**.

| Field | HubSpot property | GoHighLevel custom field |
|---|---|---|
| Name | First name and last name | First name and last name |
| Phone | Phone number | Phone |
| First source, campaign and ad platform | `datacenter_first_source`, `datacenter_first_campaign`, `datacenter_first_platform` | Datacenter first source, and so on |
| First seen | `datacenter_first_seen` (a date) | Datacenter first seen |
| Last source, campaign and ad platform | `datacenter_last_source`, `datacenter_last_campaign`, `datacenter_last_platform` | Datacenter last source, and so on |
| Landing page | `datacenter_landing_page` | Datacenter landing page |
| Short link | `datacenter_short_link` | Datacenter short link |
| Visits, revenue, orders | `datacenter_visits`, `datacenter_revenue`, `datacenter_orders` | Datacenter visits, and so on |
| Profile | `datacenter_profile_url` (a link to the profile in Datacenter) | Datacenter profile |

- Datacenter makes the properties (in a HubSpot group named **Datacenter**) and the custom fields the first time it sends.
- People are matched on email. Someone new is added as a contact. Someone the CRM has is updated.
- Name and phone replace what the CRM has. Untick them to leave the CRM's own.
- A field with no value is left out, never sent empty.
- Pick a [segment](https://datacenter.so/docs/segments-and-best-send-time) under **Who** to send only some people.

### When people go out

- **Right away** when your site identifies someone with an email: a form, a checkout on your site, or `datacenter('identify')`.
- **Within 15 minutes** for everyone else whose profile changed: a Stripe or Shopify sale, an import, a new touch.
- **Send everyone now** sends every profile once more.

A profile goes out again only when one of its values changed.

### Who is not sent

- People with no email.
- Everyone, while **Show contact details** is off. Datacenter then keeps only hashed emails, so it has no email to send. Turn it on in the Customers tab.
- People Datacenter only knows from this same CRM. There is nothing new to add.

## When something fails

A failed send waits 1, 5, 15, 30, then 60 minutes before the next try, without a warning. From the sixth failure in a row, the row says **Needs attention** with the reason, and Datacenter keeps trying every 15 minutes.

If the login ends, the row says **Reconnect**. One click opens the login again. Nothing already imported is lost.

## Disconnect

**Disconnect** on the connector's page deletes the saved login and stops sending. Contacts and deals already imported stay on your customers. Properties and contacts already in your CRM stay there.
