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

# Meta Pixel 連携

> Turnint AI のセッションイベントを Meta Pixel (Facebook Pixel) に送信する方法

セッションイベントを [Meta Pixel](https://www.facebook.com/business/tools/meta-pixel) のカスタムイベントとして自動送信します。Facebook / Instagram 広告のコンバージョン計測やオーディエンス作成に活用できます。

## 検出条件

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

## 送信方法

```javascript theme={null}
fbq("trackCustom", "turnint_action_executed", {
  type: "action-executed",
  actionId: "...",
  actionLabel: "...",
  actionExecType: "..."
});
```

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

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

```html theme={null}
<script>
  !function(f,b,e,v,n,t,s)
  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?
  n.callMethod.apply(n,arguments):n.queue.push(arguments)};
  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
  n.queue=[];t=b.createElement(e);t.async=!0;
  t.src=v;s=b.getElementsByTagName(e)[0];
  s.parentNode.insertBefore(t,s)}(window, document,'script',
  'https://connect.facebook.net/en_US/fbevents.js');
  fbq('init', 'YOUR_PIXEL_ID');
  fbq('track', 'PageView');
</script>
```

## 活用例

* `turnint_action_executed` をカスタムコンバージョンとして設定し、CTA クリックを計測
* `turnint_started` でリターゲティングオーディエンスを作成
