Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Feature request: Support for passing traits to analytics.track()

オープン
#505 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
javascript
領域
api

調査の方向性

Start at the analytics.track() entry point and review how integrations receive event properties and identify traits. Check the linked Amplitude API documentation and determine which destinations can accept traits with events; done means supported destinations forward them atomically without changing existing track behavior.

索引モデルが issue の本文から書いたものです。

説明

My current understanding of Segment's API:

  1. analytics.track() supports passing properties associated with the event.
  2. analytics.identify() supports passing traits that are associated with the user.
  3. #1 and #2 above are two separate API calls and there is no ordering guarantee; that is, they'll won't be delivered to the destination in the same order they were called.

This is a problem because some destinations, such as Amplitude, will associate traits with events under-the-hood. So if the event was sent to the destination, Amplitude, before the traits, the traits won't be associated with that event and thus will be useless.

For this reason, Amplitude supports passing user traits along with API calls to create events here,. This essentially combines analytics.track() and analytics.identify() into a single, atomic API call to:

  1. Create a new event
  2. Associate properties with that event
  3. Update traits on the user that are queryable in Amplitude at the time of that event

Would it be possible to add the ability to pass traits to analytics.track() that will be forwarded to destinations that support it?

主要言語
JavaScript
スター
125
フォーク
134
平均マージ
2日 2時間
マージ済み PR(30日)
2

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

segmentio/analytics.js-integrations のほかの issue

segmentio/analytics.js-integrations の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。