> ## 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.

# Plausible 連携

> Turnint AI のセッションイベントを Plausible Analytics に送信する方法

セッションイベントを [Plausible](https://plausible.io) のカスタムイベントとして自動送信します。

## 検出条件

`window.plausible` が関数として存在する場合に検出されます。

## 送信方法

```javascript theme={null}
plausible("turnint_started", { props: { type: "started" } });
```

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

ポータルの **ヘッドスクリプト** に以下を貼り付けてください。`yourdomain.com` はご自身のドメインに置き換えてください。

```html theme={null}
<script defer data-domain="yourdomain.com" src="https://plausible.io/js/script.js"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
```

<Note>
  カスタムイベントを使用するには、Plausible のスクリプトを `script.js` ではなく `script.tagged-events.js` に変更するか、上記のように手動で `plausible` 関数を定義する必要があります。
</Note>
