> ## Documentation Index
> Fetch the complete documentation index at: https://docs.timothe.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# HubSpot トラッキング連携

> Turnint AI のセッションイベントを HubSpot のカスタム行動イベントとして送信する方法

セッションイベントを [HubSpot](https://www.hubspot.jp) のカスタム行動イベント（Custom Behavioral Events）として自動送信します。

<Note>
  これは HubSpot のクライアントサイドトラッキング連携です。サーバーサイドの CRM 連携については [HubSpot CRM 連携](/ja/integrations/crm.hubspot) を参照してください。
</Note>

## 検出条件

`window._hsq` が配列として存在する場合に検出されます。

## 送信方法

```javascript theme={null}
_hsq.push(["trackCustomBehavioralEvent", {
  name: "turnint_started",
  properties: { type: "started" }
}]);
```

## ヘッドスクリプト設定

ポータルの **ヘッドスクリプト** に以下を貼り付けてください。`YOUR_HUB_ID` はご自身の HubSpot アカウント ID に置き換えてください。

```html theme={null}
<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/YOUR_HUB_ID.js"></script>
```

## 前提条件

HubSpot でカスタム行動イベントを受信するには、**Marketing Hub Enterprise** プランが必要です。
