Repository navigation
Document AI agent and bot actor properties ($mp_actor_type, $mp_actor_name, $mp_raw_user_agent) - #303
Merged
Merged
Conversation
Add $mp_raw_user_agent, $mp_actor_type, and $mp_actor_name to the ingestion default event properties, explain how to use them to identify AI agent and bot traffic, and recommend forwarding the end user's user agent from server-side tracking so classification is accurate. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012yQeTfRB9zkzSD24XXfeaY
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
Contributor
[Low impact] The PR appears safe to merge, with no new actionable issues found. Reviews (6) · Last reviewed commit: "Merge branch 'main' into claude/actor-ty..." · Reviewed by Greptile |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012yQeTfRB9zkzSD24XXfeaY
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012yQeTfRB9zkzSD24XXfeaY
kurbycchua
marked this pull request as ready for review
October 23, 2026 01:39
kurbycchua
enabled auto-merge (squash)
October 23, 2026 01:40
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012yQeTfRB9zkzSD24XXfeaY
phuang-mixpanel
approved these changes
Oct 28, 2026
myronkaifung
approved these changes
Oct 28, 2026
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Kurby Chua · Slack thread
Before: The docs never mention the new ingestion properties
$mp_raw_user_agent,$mp_actor_type, and$mp_actor_name. Server-side users aren't told that, if they don't forward their end user's user agent, Mixpanel classifies agent/bot traffic using their server's HTTP library user agent, which makes the classification noisy.After: The three properties are listed in the ingestion default event properties with descriptions (
agent/bot/nonevalues, example actor names, and the user-agent source and fallback). The bot traffic guide explains how to break down or filter reports by Actor Type / Actor Name, and the server-side guide recommends forwarding the client'sUser-Agentas$mp_raw_user_agent(or$mp_user_agent), with the Python example updated to do so.How:
docs/data-structure/property-reference/default-properties.mdx: three new rows in the Ingestion APIs event properties table, plus a short note on the user-agent source/fallback linking to the server-side guide.docs/tracking-best-practices/bot-traffic.mdx: new## Identify AI Agent and Bot Trafficsection before the JavaScript SDK bot exclusion section.docs/tracking-best-practices/server-side-best-practices.mdx: a sentence in## Tracking Browser, Device, and OS(heading unchanged, since a docs.json redirect targets its anchor), andproperties["$mp_raw_user_agent"] = request.headers["User-Agent"]added to the Python example.Needs confirmation:
$mp_user_agentand$mp_raw_user_agentare sent. The docs currently say only that either one works.🤖 Generated with Claude Code
https://claude.ai/code/session_012yQeTfRB9zkzSD24XXfeaY
Generated by Claude Code