# HubSpot

Storylane integrates seamlessly with HubSpot, enabling you to:

* Sync demo data with existing leads.
* Automatically create new leads if they don’t exist.
* Create and update accounts with demo data.
* Log demo session activity on the HubSpot timeline.
* Capture leads directly via HubSpot forms.

{% hint style="warning" %}
You must have **admin** level permissions to connect any integrations within Storylane
{% endhint %}

{% hint style="info" %}
You can also access the Storylane App directly from the HubSpot sidebar. [Read more.](/integrations/integrations-and-data-flow/hubspot/storylane-app-for-hubspot.md)
{% endhint %}

Follow these step-by-step instructions below to set up the integration:

***

### **Step 1: Add the Storylane Code to Your Website (Optional)**

This step enables lead attribution tracking. Add the following code snippet to the `<head>` tag of your website:

```javascript
(function(){"use strict";function e(t){const r=t.head;if(!r)return;const i=t.querySelector('script[src="https://js.storylane.io/js/v2/storylane.js"]'),n=t.querySelector('script[src="https://js.storylane.io/js/v1/storylane.js"]');if(i||n)return;const s=t.createElement("script");s.type="text/javascript",s.async=!0,s.src="https://js.storylane.io/js/v2/storylane.js",r.appendChild(s)}e(window.document)})();
```

> 💡 [Learn more about lead attribution here](/analytics-and-performance/lead-attribution.md).

***

### **Step 2: Connect HubSpot with Storylane**

1. Access the **HubSpot Integration** section in your Storylane dashboard under **Settings > Integrations**.
2. Click the **Connect** button.
3. Next, setup sidebar groups, record heder cards, and create a custom view. Give it a spin below! ↓

{% @storylane/embed subdomain="app" linkValue="94ugt7nyyhes" url="<https://app.storylane.io/share/94ugt7nyyhes>" %}

***

### **Step 3: Integration Settings**

Once your integration is connected, you can configure what information is sent from Storylane to HubSpot. You have two options:

* Contact-level data
* Company-level data

When processing records, the following logic applies:

<mark style="color:$warning;">**Contacts**</mark>

* Contacts are searched and matched by email address.
* If the email already exists, the existing contact record is updated.
* If the email does not exist, a new contact record is created.
* If a contact is already marked as a non-marketing contact in your CRM, this field will not be updated.
* The system will only assign the marketing contact status to contacts that it creates.

<mark style="color:$warning;">**Companies**</mark>

* Companies are searched and matched by domain.
* If the domain already exists, the existing company record is updated.
* If the domain does not exist, a new company record is created.

To adjust these settings, locate the Edit Integration icon next to the *Connected* status.

<div align="left"><figure><img src="/files/OeSG0RIyHO4YidF1ATvj" alt="" width="563"><figcaption></figcaption></figure></div>

***

### 💡 **What Data Does Storylane Sync to HubSpot?**

#### **Custom Properties**

Storylane populates custom fields in HubSpot contacts under the "Storylane" property group. Here's a breakdown:

<table><thead><tr><th width="233.88629150390625">Property Name</th><th width="127.7117919921875">Applies To</th><th width="257.775146484375">Description</th><th width="114.95501708984375">Data Type</th></tr></thead><tbody><tr><td><strong>Storylane Sessions</strong></td><td>Demo + Hub</td><td>Total number of sessions (applies to both single demos and Hubs)</td><td>Integer</td></tr><tr><td><strong>Storylane Demo Name</strong></td><td>Demo</td><td>Name of the most recently viewed demo</td><td>String</td></tr><tr><td><strong>Storylane Demo Viewed At</strong></td><td>Demo</td><td>Timestamp of the most recent demo view</td><td>DateTime</td></tr><tr><td><strong>Storylane Demo Time (secs)</strong></td><td>Demo</td><td>Time spent viewing the demo (seconds)</td><td>Number</td></tr><tr><td><strong>Storylane Demo Complete (%)</strong></td><td>Demo</td><td>Percentage of demo steps completed</td><td>Number</td></tr><tr><td><strong>Storylane Demo Link</strong></td><td>Demo</td><td>Link to the demo</td><td>String</td></tr><tr><td><strong>Storylane CTA Clicked</strong></td><td>Demo + Hub</td><td>CTA URL clicked</td><td>String</td></tr><tr><td><strong>Storylane Demo Session Link</strong></td><td>Demo</td><td>Link to the specific demo audience session</td><td>String</td></tr><tr><td><strong>Storylane Buying Intent</strong></td><td><strong>Demo + Hub</strong></td><td>Engagement-based intent level (Low / Medium / High)</td><td>String</td></tr><tr><td><strong>Storylane Lead Source</strong></td><td><strong>Demo + Hub</strong></td><td>How the viewer was sourced (e.g. Nurtured, Inbound, Sales)</td><td>String</td></tr><tr><td><strong>Storylane Hub Name</strong></td><td>Hub</td><td>Name of the Hub that was viewed</td><td>String</td></tr><tr><td><strong>Storylane Hub Link</strong></td><td>Hub</td><td>Link to the Hub</td><td>String</td></tr><tr><td><strong>Storylane Hub Viewed At</strong></td><td>Hub</td><td>Timestamp of the most recent Hub view</td><td>DateTime</td></tr><tr><td><strong>Storylane Hub Viewed Content (%)</strong></td><td>Hub</td><td>Percentage of Hub content viewed</td><td>Number</td></tr><tr><td><strong>Storylane Hub Time (secs)</strong></td><td>Hub</td><td>Total time spent in the Hub (seconds)</td><td>Number</td></tr></tbody></table>

***

<figure><img src="/files/0Q9T1D2CPKXUrLRvzJSP" alt="" width="288"><figcaption></figcaption></figure>

#### **Custom Events**

Each demo session creates a custom timeline activity in HubSpot, and a summary of aggregate metrics from the users' session. Here's a reference below for a demo & buyer hub session:

<figure><img src="/files/dc0IMwncNa9GwL8HNGn3" alt="" width="563"><figcaption></figcaption></figure>

<figure><img src="/files/YxBNGt4eDZGLhOMAzz38" alt="" width="563"><figcaption></figcaption></figure>

***

By following these steps, you can efficiently connect Storylane and HubSpot, ensuring seamless lead management and data insights for your demos.


---

# 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://docs.storylane.io/integrations/integrations-and-data-flow/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.
