# イベントの追跡と GTM、Facebook などへの送信方法

**URL:** <https://meta.discourse.org/t/how-to-track-events-and-send-them-to-gtm-facebook-or-others/143227>\
**Category:** Development\
**Created:** [2020 年 3 月 3 日午後 4:29 UTC](https://meta.discourse.org/t/how-to-track-events-and-send-them-to-gtm-facebook-or-others/143227 "2020-03-03T16:29:48Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![agmontpetit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/agmontpetit/32/160109_2.png) [@agmontpetit](https://meta.discourse.org/u/agmontpetit)\
**Post date:** [2020 年 3 月 3 日午後 4:29 UTC](https://meta.discourse.org/t/how-to-track-events-and-send-them-to-gtm-facebook-or-others/143227/1 "2020-03-03T16:29:48Z")

</div>

フロントエンドのサイト上で、ユーザー登録やエンゲージメント（投稿作成や投稿への「いいね」など）といったイベントをどのように追跡するのが最適か気になっています。こうしたイベントの追跡は、分析やコンバージョン測定、あるいはオーディエンス構築のために不可欠であり、Google アナリティクス、Google タグ マネージャー、Facebook ピクセルなどのツールで広く利用されています。

この質問は以前にも何度か投げかけられていますが（[こちら](https://meta.discourse.org/t/how-can-i-track-discourse-signups-for-facebook-ad-campaigns/54199) や [こちら](https://meta.discourse.org/t/track-sign-ups-on-google-analytics/96746/2) など）、納得のいく回答は見つかりませんでした。何か変更があった場合や、より経験豊富な方がこの質問に目を通す場合に備えて、改めて質問させていただきます。

いくつかの例を見ていきましょう。

### アカウント作成

`/u/account-created` といった URL の追跡だけでは不十分のようです。Google や Facebook の OAuth 経由で登録するユーザーは、そのページを表示しないためです。ここでの最適な代替手段は何でしょうか？

### 投稿作成

`AppEvent`（`topic:created`）を使用して、これらのイベントをトリガーできるようです。

### 投稿への「いいね」

これが最も難しいようです。`AppEvent` のトリガーは見つかりませんでしたし、アカウント作成の場合のような追跡用の特定の URL も存在しないようです。

---

_[View the full topic](https://meta.discourse.org/t/how-to-track-events-and-send-them-to-gtm-facebook-or-others/143227)._
