Amplitude内の個人ユーザーとユーザーグループを調査します。メールアドレスやIDからユーザーを特定したり、プロフィール情報を閲覧したり、複数ユーザーのイベント履歴を一括分析したり、特定グループへの所属を確認したりできます。 **次のような場合に使用:** - 「ユーザーXは何をしたのか」という個別の動作確認 - 成果の帰属(どの施策が効果をもたらしたか)の検証 - ユーザーグループの抽出と分析 - メールアドレスからユーザーIDへの変換
Investigates individual users and user populations in Amplitude — resolve users by email/ID, read profiles, batch-analyze event timelines, spot-check cohort membership. Use for "what did user X do", attribution audits, population sampling, and email-to-user-ID resolution.
個別ユーザーの詳細調査: get_amp_user_data の include: 'id' で開始(メールアドレス、ユーザーID、デバイスIDのいずれかでユーザーを特定)→ include: 'profile' で詳細情報を取得(利用段階、獲得経路、利用統計など)→ include: 'timeline' でセッション単位のイベント履歴を確認。両方の情報が必要な場合は include: 'both' で1回の呼び出しにまとめられます。生のイベントデータをそのまま並べるのではなく、ユーザーの流れを要約して示してください。
複数ユーザーの分析(一括処理): まずユーザーグループを定義してから始めます。query_amplitude_data でユーザーIDごとにグループ化して量の多さでランク付けするか、use_amplitude_cohorts の action: 'find' で条件を絞ったユーザー集団を取得 → get_amp_user_data の include: 'timeline' を並列バッチで実行。1回の呼び出しは最大10個の識別子まで、10~20個の呼び出しを同時実行するのが標準的です。合計で数百回の呼び出しになっても問題ありません。各呼び出しの範囲は狭く保つ(イベント種別や期間を限定)ので、結果のサイズが大きくなりません。
コホートの抜き打ち確認: 既存のコホート(ユーザーの集団)を優先してください。use_amplitude_cohorts の action: 'list' または action: 'get' で確認してから、その場限りの定義を作ります。action: 'membership' で特定のユーザーが属しているかを検証。コホートの定義を無条件に信頼するのではなく、メンバーのタイムラインを確認して、購入やチェックアウトなど実際のマーカーイベントを見てください。
メールアドレス → IDの解決: メールアドレスごとに get_amp_user_data の include: 'id' を実行。アップロードされたメールリストは、1回の呼び出しにつき10個以下の識別子をまとめて処理します。大量のデータをエクスポートする場合は、一括処理にして、個別の失敗時の再試行パターンに注意してください。
include: 'timeline':常に期間を限定してください(デフォルトは直近30日間)。探しているイベント種別が決まっていれば、フィルター条件を付けます。フィルターなしの全タイムラインは量が大きく、処理が遅くなります。
速度制限エラーは retryable と retryAfterMs でフラグ付けされます。繰り返し再送信するのではなく、指定された時間待ってから再試行してください。
ユーザーの識別:1人のユーザーが複数のID(デバイスID、ユーザーID、メールなど)と一致する場合があります。どのIDで特定したか明記し、判断が曖昧な場合は一つ選ぶのではなく、その旨を示してください。
Single user deep-dive: get_amp_user_data include: 'id' (resolve the
user: email, user ID, device ID, or amplitude ID) → include: 'profile'
(lifecycle, acquisition, usage stats) → include: 'timeline' (session-aware
event history). include: 'both' gets profile + timeline in one call when
you know you'll need both. Summarize journeys; don't dump raw events.
Population analysis (batched): build the user set first
(query_amplitude_data with a user-ID group_by to rank by volume, or
use_amplitude_cohorts action: 'find' for a filtered set) →
get_amp_user_data include: 'timeline' in parallel batches — up to 10
identifiers per call, 10–20 calls in flight is normal for population
analysis; hundreds of calls total is fine. Keep each call narrow (event
types, window) so responses stay small.
Cohort spot-check: prefer existing cohorts — use_amplitude_cohorts
action: 'list' or action: 'get' before building ad
hoc definitions. action: 'membership' verifies specific users. Check a
member's timeline for the exact markers (purchase, typing, checkout events)
rather than trusting the cohort definition blindly.
Email → ID resolution: get_amp_user_data include: 'id' per email;
uploaded email lists are resolved in batches of ≤10 identifiers per call.
For bulk exports, batch and note the retry pattern on individual failures.
include: 'timeline': always bound the window (last 30 days by default)
and pass event-type filters when you know what you're looking for —
unfiltered timelines are large and slow.retryable with retryAfterMs —
back off instead of churning.原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。