Skip to content

Document AI agent and bot actor properties ($mp_actor_type, $mp_actor_name, $mp_raw_user_agent) - #303

Merged
myronkaifung merged 6 commits into
mainfrom
claude/actor-type-user-agent-props
Oct 28, 2026
Merged

myronkaifung merged 6 commits into
mainfrom
claude/actor-type-user-agent-props

Conversation

@claude

@claude claude Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

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 / none values, 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's User-Agent as $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 Traffic section 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), and properties["$mp_raw_user_agent"] = request.headers["User-Agent"] added to the Python example.

Needs confirmation:

  • Display names for the three properties ("Raw User Agent", "Actor Type", "Actor Name") are placeholders; please confirm what the UI actually shows.
  • Which value wins if both $mp_user_agent and $mp_raw_user_agent are sent. The docs currently say only that either one works.

🤖 Generated with Claude Code

https://claude.ai/code/session_012yQeTfRB9zkzSD24XXfeaY


Generated by Claude Code

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
@mintlify

mintlify Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
mixpanel-docs 🟢 Ready View Preview Oct 28, 2026, 5:39 PM

@greptile-apps

greptile-apps Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[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
kurbycchua marked this pull request as ready for review October 23, 2026 01:39
@kurbycchua
kurbycchua requested a review from a team as a code owner October 23, 2026 01:39
@kurbycchua
kurbycchua requested a review from pouseaoe October 23, 2026 01:39
@kurbycchua
kurbycchua enabled auto-merge (squash) October 23, 2026 01:40
Comment thread docs/tracking-best-practices/bot-traffic.mdx Outdated
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012yQeTfRB9zkzSD24XXfeaY
Comment thread docs/tracking-best-practices/server-side-best-practices.mdx
@myronkaifung
myronkaifung disabled auto-merge October 28, 2026 17:38
@myronkaifung
myronkaifung merged commit 7d36166 into main Oct 28, 2026
8 checks passed
@myronkaifung
myronkaifung deleted the claude/actor-type-user-agent-props branch October 28, 2026 17:40

This branch was successfully deployed

1 active deployment
staging — 4183094b Deployed Oct 28, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants