[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-openai-mixpanelyst":3,"mdc--k3zl7p-key":36,"related-org-openai-mixpanelyst":10102,"related-repo-openai-mixpanelyst":10309},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":34,"mdContent":35},"mixpanelyst","analyze product data with Mixpanel","This skill should be used when the user asks about Mixpanel product analytics, event data, funnel analysis, retention curves, cohort analysis, segmentation queries, user behavior, conversion rates, churn, DAU\u002FMAU, ARPU, revenue metrics, feature adoption, A\u002FB test results, user paths, flow analysis, or any request to query, explore, visualize, or analyze Mixpanel data using Python. Also use when the user asks to read, write, or manage Mixpanel \"business context\" — the markdown documentation that grounds AI assistants in an organization's structure and goals.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"openai","OpenAI","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fopenai.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"Customer Analytics","customer-analytics","tag",{"name":17,"slug":18,"type":15},"Data Analysis","data-analysis",{"name":20,"slug":21,"type":15},"Product Management","product-management",{"name":23,"slug":24,"type":15},"Analytics","analytics",3992,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins","2026-06-30T19:00:57.102",null,465,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":33},[],"OpenAI Plugins","https:\u002F\u002Fgithub.com\u002Fopenai\u002Fplugins\u002Ftree\u002FHEAD\u002Fplugins\u002Fmixpanel-headless\u002Fskills\u002Fmixpanelyst","---\nname: mixpanelyst\ndescription: This skill should be used when the user asks about Mixpanel product analytics, event data, funnel analysis, retention curves, cohort analysis, segmentation queries, user behavior, conversion rates, churn, DAU\u002FMAU, ARPU, revenue metrics, feature adoption, A\u002FB test results, user paths, flow analysis, or any request to query, explore, visualize, or analyze Mixpanel data using Python. Also use when the user asks to read, write, or manage Mixpanel \"business context\" — the markdown documentation that grounds AI assistants in an organization's structure and goals.\nallowed-tools: Bash Read Write WebFetch\n---\n\n# mixpanel_headless API Reference\n\nAnalyze Mixpanel data by writing and executing Python code using the `mixpanel_headless` library and `pandas`.\nBefore running bundled helper scripts, set `SKILL_DIR` to the absolute path of this\n`skills\u002Fmixpanelyst` directory.\n\n```python\nimport mixpanel_headless as mp\nws = mp.Workspace()\nresult = ws.query(\"Login\", last=30)\nprint(result.df.head())\n```\n\n## Query Engines\n\n| Question | Method | Returns |\n|----------|--------|---------|\n| How much? How many? Trends? | `ws.query()` | `QueryResult` |\n| Do users convert through a sequence? | `ws.query_funnel()` | `FunnelQueryResult` |\n| Do users come back? | `ws.query_retention()` | `RetentionQueryResult` |\n| What paths do users take? | `ws.query_flow()` | `FlowQueryResult` |\n| Who are they? What do they look like? | `ws.query_user()` | `UserQueryResult` |\n\nAll result types have a `.df` property returning a pandas DataFrame and a `.params` dict containing the bookmark JSON.\n`FlowQueryResult` also has `.graph` (NetworkX DiGraph) and `.anytree` (list of tree roots).\n\n**Quick lookups** use `python3 -c \"...\"` one-liners. **Multi-step analysis** writes `.py` files.\n\n## Discovery — ALWAYS Do Both Steps Before Querying\n\nGuessing event names causes silent empty results. Guessing API parameters causes TypeErrors and invalid queries. **Discover both the data schema AND the API surface before writing any query.**\n\n### Step 1: Discover the data schema\n\n```python\nimport mixpanel_headless as mp\nfrom mixpanel_headless import Filter, GroupBy, Metric\nws = mp.Workspace()\n\n# 1. Find real event names\nevents = ws.events()\ntop = ws.top_events(limit=10)\nprint(\"Events:\", events[:20])\nprint(\"Top:\", [(e.event, e.count) for e in top])\n\n# 2. Find real property names for the event you'll query\nprops = ws.properties(\"Login\")  # use an actual event name from step 1\nprint(\"Properties:\", props)\n\n# 3. (Optional) Check property values to validate filter inputs\nvals = ws.property_values(\"platform\", event=\"Login\")\nprint(\"Platforms:\", vals)\n```\n\n### Step 2: Discover the API surface with `help.py`\n\n**`help.py` is the source of truth for method signatures, parameter names, type constructors, and enum values.** The method signatures later in this document are summaries — always verify with `help.py` before using a method or type you haven't looked up.\n\n**Never guess parameter names.** If you're unsure whether a parameter is called `property` or `math_property`, or what arguments `GroupBy()` accepts, run `help.py` first. Wrong parameter names cause TypeErrors that waste tool calls.\n\n```bash\n# Look up a query method BEFORE writing the query\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query_funnel\n\n# Look up types BEFORE constructing them\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Filter          # → classmethods: .equals(), .less_than(), etc.\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Metric          # → property=, NOT math_property=\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py GroupBy          # → property, property_type only\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py MathType         # → enum values\n\n# Look up result types to know what columns .df returns\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py QueryResult\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py FlowQueryResult\n\n# Search when you're not sure of the exact name\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py search cohort   # → CohortBreakdown, CohortMetric, CohortDefinition, ...\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py search retention # → query_retention, RetentionEvent, RetentionMathType, ...\n\n# List everything\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py types            # all public types\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py exceptions        # all exceptions\n```\n\nFor tutorials and guides: `WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fllms.txt\")`\n\n### Discovery method signatures\n\n```python\ndef events(self) -> list[str]: ...\n    # List all event names (cached).\n\ndef properties(self, event: str) -> list[str]: ...\n    # List all property names for an event (cached).\n\ndef property_values(self, property_name: str, *, event: str | None = None, limit: int = 100) -> list[str]: ...\n    # Get sample values for a property.\n\ndef top_events(self, *, type: Literal['general', 'average', 'unique'] = 'general', limit: int | None = None) -> list[TopEvent]: ...\n    # Get today's most active events. TopEvent has .event (str), .count (int), .percent_change (float).\n\ndef funnels(self) -> list[FunnelInfo]: ...\n    # List saved funnels.\n\ndef cohorts(self) -> list[SavedCohort]: ...\n    # List saved cohorts.\n\ndef list_bookmarks(self, bookmark_type: BookmarkType | None = None) -> list[BookmarkInfo]: ...\n    # List all saved reports (bookmarks).\n\ndef lexicon_schemas(self, *, entity_type: EntityType | None = None) -> list[LexiconSchema]: ...\n    # List Lexicon schemas (event\u002Fproperty definitions).\n\ndef clear_discovery_cache(self) -> None: ...\n    # Clear cached discovery results.\n# User Guide: WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fguide\u002Fdiscovery\u002Findex.md\")\n```\n\n## Exploratory Analysis Workflow\n\nWhen exploring an unfamiliar dataset or asked to \"find insights,\" follow this systematic approach. Do NOT skip to querying — explore first.\n\n### Step 1: Orient — Map the Event Schema\n\n```python\nimport mixpanel_headless as mp\nws = mp.Workspace()\n\nevents = ws.events()\ntop = ws.top_events(limit=15)\nprint(\"Events:\", events)\nprint(\"Top events:\", [(e.event, e.count) for e in top])\n\n# Profile the top 3-5 events by volume\nfor event in [e.event for e in top[:5]]:\n    props = ws.properties(event)\n    print(f\"\\n{event} ({len(props)} properties):\")\n    for p in props[:15]:\n        vals = ws.property_values(p, event=event, limit=10)\n        print(f\"  {p}: {vals}\")\n```\n\n### Step 2: Classify Properties\n\nInfer property types from sampled values to decide how to use each:\n\n- **Boolean**: values are `['true', 'false']` — segment with `group_by`, often pre-computed behavioral flags\n- **Low-cardinality categorical** (\u003C10 values): `platform`, `tier`, `category` — use for `group_by`\n- **Numeric**: values parse as int\u002Ffloat: `price`, `total`, `count` — use for `math='average'` or `math='sum'` with `math_property=`\n- **High-cardinality** (>100 values): IDs, names — skip for `group_by`, may need custom property cleanup\n- **Temporal**: ISO dates or epoch values — use for time-based analysis\n\nProperty naming patterns that signal analytical value:\n- `is_*`, `has_*`, `was_*`, `post_*` → boolean flags, often pre-computed behavioral segments worth investigating\n- `*_total`, `*_count`, `*_value`, `*_amount` → numeric, aggregate with avg\u002Fsum\u002Fmedian\n- `*_name`, `*_type`, `*_category`, `*_tier` → categorical, use for breakdowns\n- `*_id`, `*_uuid` → identifiers, skip for breakdowns\n\n### Step 3: Scan for Significant Segments\n\nFor each boolean and low-cardinality categorical property on key events, run a quick breakdown against a numeric metric:\n\n```python\n# Example: scan all interesting properties on a purchase event\nnumeric_prop = 'order_total'  # or whatever the key metric is\ninteresting_props = [p for p in props if not p.endswith('_id')]\n\nfor prop in interesting_props:\n    vals = ws.property_values(prop, event=event, limit=10)\n    if len(set(vals)) \u003C= 10:  # low cardinality — worth a breakdown\n        result = ws.query(event, math='average', math_property=numeric_prop,\n                           group_by=prop, last=90, mode='total')\n        print(f\"\\n{numeric_prop} by {prop}:\")\n        print(result.df.to_string(index=False))\n        # Flag segments where metric differs >15% from overall\n```\n\n### Step 4: Deep Dive on Significant Findings\n\nWhen a breakdown reveals a notable difference (>15% between segments):\n1. **Quantify**: calculate the exact ratio between segments\n2. **Cross-reference**: does this segment differ on other metrics too?\n3. **Investigate causally**: run funnels or retention filtered by the segment\n4. **Control for confounds**: add a second `group_by` dimension to check if the effect holds\n\n### Step 5: Analyze Messy String Properties\n\nWhen string properties have complex\u002Funreadable values (e.g., campaign names from tools like Braze):\n1. Sample 15-20 values to identify the naming convention\n2. Look for structural patterns: date codes, targeting prefixes, channel suffixes, audience tags\n3. Design regex cleanup rules, one layer per structural element\n4. Create a custom property with `ws.create_custom_property(CreateCustomPropertyParams(...))`\n5. Verify by querying with the custom property as `group_by`\n\n### Custom Property Formula Reference\n\nFormulas use a SQL-like expression language. Variables (A, B, _A, etc.) map to properties via `composedProperties`.\n\n**Variable binding:** `LET(name, expression, body)` — define intermediate results:\n```\nLET(raw, A, REGEX_REPLACE(raw, \"pattern\", \"replacement\"))\nLET(x, A * B, IFS(x \u003C 50, \"low\", x \u003C 200, \"mid\", TRUE, \"high\"))\n```\n\n**Conditionals:** `IF(cond, then, else)`, `IFS(cond1, val1, cond2, val2, ..., TRUE, default)`\n\n**String functions:** `UPPER(s)`, `LOWER(s)`, `LEN(s)`, `LEFT(s, n)`, `RIGHT(s, n)`, `MID(s, start, count)`, `SPLIT(s, delim, n)`, `HAS_PREFIX(s, p)`, `HAS_SUFFIX(s, p)`, `PARSE_URL(s, \"domain\")`\n\n**Regex functions (PCRE2 engine):**\n- `REGEX_MATCH(haystack, pattern)` — returns true\u002Ffalse\n- `REGEX_EXTRACT(haystack, pattern, capture_group)` — returns match or capture group\n- `REGEX_REPLACE(haystack, pattern, replacement)` — replaces all matches\n\n**Regex engine quirks (Mixpanel-specific):**\n- **Case-insensitive by default** — use `(?-i)` to switch to case-sensitive matching within a pattern\n- **Backreferences work** — `$1`, `$2` capture groups and `$0` whole-match all work in `REGEX_REPLACE` replacements\n- **`{n,m}` quantifiers conflict with formula syntax** — curly braces are parsed as formula constructs. Use repeated character classes instead (e.g., `[0-9][0-9][0-9][0-9]` instead of `[0-9]{4}`)\n- **`\\d`, `\\w` shorthand classes don't work** — use `[0-9]`, `[A-Za-z0-9_]` explicitly\n- **Escape backslashes carefully** — in formula strings, `\\\\\\\\` may be needed for a literal `\\` depending on how the formula is constructed (Python string → JSON → regex engine)\n\n**CamelCase splitting** — insert space between lowercase→uppercase boundaries:\n```\nREGEX_REPLACE(text, \"(?-i)([a-z])([A-Z])\", \"$1 $2\")\n\u002F\u002F ChickenSundaysApril → Chicken Sundays April\n```\n\n**Practical multi-step cleanup example** (campaign names from Braze):\n```\nLET(s1, REGEX_REPLACE(A, \"^[0-9][0-9][0-9][0-9][0-9]*_\", \"\"),\nLET(s2, REGEX_REPLACE(s1, \"^(NW|TARGETED|REGIONAL|NTL)_\", \"\"),\nLET(s3, REGEX_REPLACE(s2, \"_(Push|Email|NotificationCenter|ModalInAppMessage)_.*$\", \"\"),\nLET(s4, REGEX_REPLACE(s3, \"_\", \" \"),\n  REGEX_REPLACE(s4, \" +\", \" \")\n))))\n```\n\n**Type functions:** `STRING(x)`, `NUMBER(x)`, `BOOLEAN(x)`, `DEFINED(x)`\n\n**Math:** `+`, `-`, `*`, `\u002F`, `%`, `MIN(a,b)`, `MAX(a,b)`, `FLOOR(n)`, `CEIL(n)`, `ROUND(n)`\n\n**Date:** `DATEDIF(start, end, unit)` — units: D, M, Y, MD, YM, YD. `TODAY()` for current date.\n\n**List:** `SUM(list)`, `ANY(x, list, expr)`, `ALL(x, list, expr)`, `FILTER(x, list, expr)`, `MAP(x, list, expr)`\n\n**Comparison:** `==`, `!=`, `\u003C`, `>`, `\u003C=`, `>=` (case-insensitive for strings), `IN` for list membership\n\n**Logical:** `AND`, `OR`, `NOT(x)`\n\n**Constants:** `TRUE`, `FALSE`, `UNDEFINED`\n\n**Creating a custom property via the API:**\n```python\nfrom mixpanel_headless import CreateCustomPropertyParams, ComposedPropertyValue\n\nparams = CreateCustomPropertyParams(\n    name=\"Clean Campaign Name\",\n    resource_type=\"events\",\n    display_formula='LET(raw, A, REGEX_REPLACE(REGEX_REPLACE(raw, \"^[0-9]+_\", \"\"), \"_\", \" \"))',\n    composed_properties={\n        \"A\": ComposedPropertyValue(\n            resource_type=\"event\", type=\"string\", value=\"campaign_name\",\n            label=\"Campaign Name\", property_default_type=\"string\",\n        )\n    }\n)\nprop = ws.create_custom_property(params)\nref = CustomPropertyRef(prop.custom_property_id)\nresult = ws.query(event, group_by=GroupBy(ref), last=30, mode='total')\n```\n\n## Workspace\n\n```python\nclass Workspace:\n    \"\"\"Unified entry point for Mixpanel data operations (042 redesign).\"\"\"\n\n    def __init__(\n        self,\n        *,\n        account: str | None = None,\n        project: str | None = None,\n        workspace: int | None = None,\n        target: str | None = None,\n        session: Session | None = None,\n    ) -> None:\n        \"\"\"Create a new Workspace. Resolution per axis is independent\n        (env > param > target > bridge > config); see\n        ``mixpanel_headless.auth_types`` and the resolver.\n\n        With ``session=`` supplied, all other axis kwargs are ignored\n        (full bypass).\n        \"\"\"\n        ...\n\n    # --- Properties (read-only) ---\n    account: Account            # Resolved Account (discriminated union)\n    project: Project            # Resolved Project\n    workspace: WorkspaceRef | None  # Resolved workspace, or None for lazy-resolve\n    session: Session            # The (account, project, workspace) tuple\n    api: MixpanelAPIClient      # Direct API client access (escape hatch)\n\n    def use(\n        self,\n        *,\n        account: str | None = None,\n        project: str | None = None,\n        workspace: int | None = None,\n        target: str | None = None,\n        persist: bool = False,\n    ) -> Self:\n        \"\"\"Switch any axis in-session. Returns self for chaining.\n        Preserves the underlying httpx.Client. With persist=True, also\n        writes to ~\u002F.mp\u002Fconfig.toml [active]. ``target=`` is mutex\n        with the per-axis kwargs.\n        \"\"\"\n        ...\n```\n\nSupports context manager: `with mp.Workspace() as ws: ...`\n\n### Project & Workspace Management\n\n```python\ndef me(self, *, force_refresh: bool = False) -> Any: ...\n    # Get \u002Fme response for current credentials (cached 24h).\n\ndef projects(self) -> list[Project]: ...\n    # List accessible projects (v3; returns Project records — id, name,\n    # organization_id, timezone). Replaces deprecated discover_projects().\n\ndef workspaces(self, *, project_id: str | None = None) -> list[WorkspaceRef]: ...\n    # List workspaces in a project (v3; returns WorkspaceRef records —\n    # id, name, is_default). Replaces deprecated discover_workspaces().\n\ndef list_workspaces(self) -> list[PublicWorkspace]: ...\n    # List all public workspaces for the current project (App API).\n\ndef resolve_workspace_id(self) -> int: ...\n    # Auto-discover and resolve workspace ID (lazy-resolve helper).\n\ndef close(self) -> None: ...\n    # Close all resources (HTTP client). Idempotent.\n```\n\n> **Removed (042 redesign — FR-038):** `Workspace.workspace_id` property,\n> `set_workspace_id()`, `switch_project()`, `switch_workspace()`,\n> `discover_projects()`, `discover_workspaces()`, `current_project`,\n> `current_credential`, `test_credentials()`. Use `ws.session.workspace_id`,\n> `ws.use(workspace=N)`, `ws.use(project=P)`, `ws.projects()`,\n> `ws.workspaces()`, `ws.project`, `ws.account`, and `mp.accounts.test(NAME)`\n> respectively.\n\n### Insights Query\n\nRun `python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query` for the full signature.\n\n```python\ndef query(\n    self,\n    events: str | Metric | CohortMetric | Formula | Sequence[...],\n    *,\n    from_date: str | None = None,        # YYYY-MM-DD, overrides last\n    to_date: str | None = None,          # YYYY-MM-DD, requires from_date\n    last: int = 30,                      # relative days (ignored if from_date set)\n    unit: QueryTimeUnit = 'day',\n    math: MathType = 'total',            # aggregation: total, unique, dau, average, sum, ...\n    math_property: str | None = None,    # top-level shorthand; Metric() uses property= instead\n    per_user: PerUserAggregation | None = None,\n    percentile_value: int | float | None = None,\n    group_by: str | GroupBy | CohortBreakdown | FrequencyBreakdown | list[...] | None = None,\n    where: Filter | FrequencyFilter | list[...] | None = None,\n    formula: str | None = None,          # e.g. \"(B \u002F A) * 100\", requires 2+ events\n    formula_label: str | None = None,\n    rolling: int | None = None,\n    cumulative: bool = False,\n    mode: Literal['timeseries', 'total', 'table'] = 'timeseries',\n    time_comparison: TimeComparison | None = None,\n    data_group_id: int | None = None,\n) -> QueryResult:\n    # .df columns: timeseries → [date, event, count]\n    #              total → [event, count]\n    #              with group_by → adds segment column\n    ...\n```\n\n### Funnel Query\n\nRun `python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query_funnel` for the full signature.\n\n```python\ndef query_funnel(\n    self,\n    steps: list[str | FunnelStep],      # at least 2 steps required\n    *,\n    conversion_window: int = 14,\n    conversion_window_unit: Literal['second', 'minute', 'hour', 'day', 'week', 'month', 'session'] = 'day',\n    order: Literal['loose', 'any'] = 'loose',\n    from_date: str | None = None, to_date: str | None = None, last: int = 30,\n    unit: QueryTimeUnit = 'day',\n    math: FunnelMathType = 'conversion_rate_unique',\n    math_property: str | None = None,\n    group_by: str | GroupBy | CohortBreakdown | list[...] | None = None,\n    where: Filter | list[Filter] | None = None,\n    exclusions: list[str | Exclusion] | None = None,\n    holding_constant: str | HoldingConstant | list[...] | None = None,\n    mode: Literal['steps', 'trends', 'table'] = 'steps',\n    reentry_mode: FunnelReentryMode | None = None,\n    time_comparison: TimeComparison | None = None,\n    data_group_id: int | None = None,\n) -> FunnelQueryResult:\n    # .df columns: [step, event, count, step_conv_ratio, avg_time]\n    # .overall_conversion_rate: float\n    ...\n```\n\n### Retention Query\n\nRun `python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query_retention` for the full signature.\n\n```python\ndef query_retention(\n    self,\n    born_event: str | RetentionEvent,\n    return_event: str | RetentionEvent,\n    *,\n    retention_unit: TimeUnit = 'week',\n    alignment: RetentionAlignment = 'birth',\n    bucket_sizes: list[int] | None = None,\n    from_date: str | None = None, to_date: str | None = None, last: int = 30,\n    unit: QueryTimeUnit = 'day',\n    math: RetentionMathType = 'retention_rate',\n    group_by: str | GroupBy | CohortBreakdown | list[...] | None = None,\n    where: Filter | list[Filter] | None = None,\n    mode: RetentionMode = 'curve',\n    unbounded_mode: RetentionUnboundedMode | None = None,\n    retention_cumulative: bool = False,\n    time_comparison: TimeComparison | None = None,\n    data_group_id: int | None = None,\n) -> RetentionQueryResult:\n    # .df columns: [cohort_date, bucket, count, rate]  (+ segment with group_by)\n    # .average: synthetic average across cohorts\n    ...\n```\n\n### Flow Query\n\nRun `python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query_flow` for the full signature.\n\n```python\ndef query_flow(\n    self,\n    event: str | FlowStep | Sequence[str | FlowStep],\n    *,\n    forward: int = 3, reverse: int = 0,\n    from_date: str | None = None, to_date: str | None = None, last: int = 30,\n    conversion_window: int = 7,\n    conversion_window_unit: Literal['day', 'week', 'month', 'session'] = 'day',\n    count_type: Literal['unique', 'total', 'session'] = 'unique',\n    cardinality: int = 3,\n    collapse_repeated: bool = False,\n    hidden_events: list[str] | None = None,\n    mode: Literal['sankey', 'paths', 'tree'] = 'sankey',\n    where: Filter | list[Filter] | None = None,\n    segments: str | GroupBy | CohortBreakdown | FrequencyBreakdown | list[...] | None = None,\n    exclusions: list[str] | None = None,\n    data_group_id: int | None = None,\n) -> FlowQueryResult:\n    # .df, .graph (NetworkX DiGraph), .anytree (tree mode)\n    # .top_transitions(n), .drop_off_summary()\n    ...\n```\n\n### User Profile Query\n\nRun `python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query_user` for the full signature.\n\n```python\ndef query_user(\n    self,\n    *,\n    where: Filter | list[Filter] | str | None = None,\n    cohort: int | CohortDefinition | None = None,\n    properties: list[str] | None = None,\n    sort_by: str | None = None,\n    sort_order: Literal['ascending', 'descending'] = 'descending',\n    limit: int | None = 1,              # None = fetch all matching\n    search: str | None = None,\n    distinct_id: str | None = None,     # single user lookup\n    distinct_ids: list[str] | None = None,  # batch lookup\n    group_id: str | None = None,        # query group profiles\n    as_of: str | int | None = None,     # point-in-time\n    mode: Literal['profiles', 'aggregate'] = 'aggregate',\n    aggregate: Literal['count', 'extremes', 'percentile', 'numeric_summary'] = 'count',\n    aggregate_property: str | None = None,\n    percentile: float | None = None,\n    segment_by: list[int] | None = None,\n    parallel: bool = False, workers: int = 5,\n    include_all_users: bool = False,\n) -> UserQueryResult:\n    # .df, .total, .profiles\n    ...\n```\n\n### Build Params (without executing)\n\nSame parameters as the corresponding query methods, but return `dict[str, Any]` bookmark params without making an API call. Useful for creating saved reports (bookmarks).\n\n```python\ndef build_params(self, events, **kwargs) -> dict[str, Any]: ...\ndef build_funnel_params(self, steps, **kwargs) -> dict[str, Any]: ...\ndef build_retention_params(self, born_event, return_event, **kwargs) -> dict[str, Any]: ...\ndef build_flow_params(self, event, **kwargs) -> dict[str, Any]: ...\ndef build_user_params(self, **kwargs) -> dict[str, Any]: ...\n```\n\n### Multi-Step Analysis Patterns\n\nEvery query engine has parameters that look like simple settings but are actually analytical choices with outsized influence on results. Before running any query, apply these principles:\n\n- [ ] **Find the master dial.** Each engine has one parameter (or small set) that reshapes all downstream metrics. Changing it changes the story. Know which parameter it is and choose deliberately — don't accept defaults blindly.\n- [ ] **Match parameters to the domain.** There are no universal \"correct\" values. A social app needs daily retention; a B2B SaaS needs monthly. A food-ordering funnel needs a 1-hour window; an onboarding funnel needs 14 days. The product's natural usage cadence dictates the setting.\n- [ ] **Distrust averages.** Averages include outliers — one extreme value distorts the whole metric. Use medians (`math='median'`, `percentile=50`) to see what's typical. If the mean and median diverge, the distribution is skewed and the mean is misleading.\n- [ ] **Counting methodology is a modeling choice.** \"Unique users,\" \"total events,\" and \"sessions\" aren't just modes — they answer fundamentally different questions. \"How many people?\" vs \"How much activity?\" vs \"How many engagement moments?\" Choose the counting method that matches the business question.\n- [ ] **Know the silent defaults.** Parameters are sometimes silently ignored (e.g., `math_property` with `math='unique'`), silently constraining (e.g., no funnel re-entry by default), or silently inflating (e.g., `unbounded_mode='carry_forward'` in retention). If results look surprising, check whether a default is shaping them.\n- [ ] **Sweep, don't guess.** When unsure which parameter value to use, try several and observe how metrics shift. Where the metric stabilizes or diverges reveals the true signal. The code examples below demonstrate this for each engine.\n\n#### Comparing Segments Across Multiple Dimensions\n\nWhen a single breakdown shows a difference, verify it holds across dimensions:\n\n```python\n# Step 1: Find the interesting segment\nresult = ws.query(event, math='average', math_property='order_total',\n                   group_by='deal_sweet_spot', last=90, mode='total')\n# Found: deal_sweet_spot=true has 37% higher AOV\n\n# Step 2: Check if it holds across another dimension\nresult = ws.query(event, math='average', math_property='order_total',\n                   group_by=['deal_sweet_spot', 'platform'], last=90, mode='total')\n# Does the sweet spot hold for both iOS and Android?\n\n# Step 3: Check segment rates across a third dimension\nresult = ws.query(event, math='unique',\n                   group_by=['loyalty_tier', 'deal_sweet_spot'], last=90, mode='total')\n# Which tier is most likely to achieve the sweet spot?\n```\n\n#### Insights Analysis: MathType, Per-User, and the Unit of Analysis\n\n**MathType is the most critical Insights parameter.** It defines what you're counting — `total` (event volume), `unique` (user reach), `dau\u002Fwau\u002Fmau` (time-bounded engagement), `average\u002Fmedian\u002Fpercentile` (property distributions), `sum` (revenue totals). Choosing the wrong MathType answers the wrong question silently. Match MathType to the business question: engagement → `dau` or `wau`; revenue → `sum` or `average` with `math_property`; adoption → `unique`; intensity → `total`.\n\n**Per-user aggregation is a two-stage process** that fundamentally changes the unit of analysis. `per_user='average'` with `math='average'` first computes each user's average, then averages across users. This is NOT the same as a global average — a power user with 1000 events and a casual user with 2 events contribute equally. This is often the right choice (prevents power users from dominating) but it changes the story dramatically:\n\n```python\n# Sweep MathTypes to understand an event from multiple angles\nevent = 'Purchase'  # use a real event name\nprop = 'order_total'  # use a real numeric property\n\nfor mt in ['total', 'unique', 'dau', 'average', 'median', 'sum']:\n    kwargs = {'math': mt, 'last': 30, 'mode': 'total'}\n    if mt in ('average', 'median', 'sum'):\n        kwargs['math_property'] = prop\n    result = ws.query(event, **kwargs)\n    print(f\"{mt:>10}: {result.df['count'].iloc[0]:>12,.2f}\")\n# total = event volume, unique = user reach, dau = daily engagement,\n# average\u002Fmedian = typical transaction, sum = total revenue\n\n# Per-user aggregation: compare global average vs per-user average\nglobal_avg = ws.query(event, math='average', math_property=prop, last=30, mode='total')\nper_user_avg = ws.query(event, math='average', math_property=prop,\n                         per_user='average', last=30, mode='total')\nprint(f\"Global avg: {global_avg.df['count'].iloc[0]:.2f}\")\nprint(f\"Per-user avg: {per_user_avg.df['count'].iloc[0]:.2f}\")\n# If these differ significantly, power users are skewing the global average\n```\n\n**Prefer medians over averages for property distributions** — same principle as funnel time-to-convert. Use `math='median'` instead of `math='average'`, or `math='percentile'` with `percentile_value=50`. Averages include outliers; medians reveal what's typical.\n\n**Silent traps:** `math_property` is silently ignored with non-property MathType (e.g., `math='unique'` discards `math_property`). `rolling` reduces data point count without warning (a 30-day rolling window over 59 days produces ~29 points, not 59). `unit` is silently ignored in `mode='total'`.\n\n#### Funnel Analysis: Windows, Modes, and Time\n\nFunnel queries return time data in step metadata columns (`avg_time`, `avg_time_from_start`) alongside conversion rates.\n\n**Conversion window is the most critical funnel parameter.** It defines the maximum time a user has to complete the funnel from their first step. It affects every other metric — conversion rate, time-to-convert, and segment comparisons all shift dramatically with window size.\n\n**Choosing a window:** Match it to the user journey being measured. Short funnels (ordering food, adding to cart) need tight windows — hours, not days. Long funnels (onboarding, subscription purchase) need wider windows — days or weeks. When unsure, experiment:\n\n```python\n# Try progressively tighter windows to find where signal emerges\nfor window, unit in [(14, 'day'), (7, 'day'), (1, 'day'), (12, 'hour'), (6, 'hour')]:\n    result = ws.query_funnel(steps, last=90,\n        conversion_window=window, conversion_window_unit=unit)\n    final = result.df[result.df['step'] == result.df['step'].max()].iloc[0]\n    print(f\"{window}{unit}: conv={final['overall_conv_ratio']:.3f} \"\n          f\"time={final['avg_time_from_start']\u002F3600:.1f}h\")\n# Look for: conversion stabilizing, time differences appearing at tighter windows\n```\n\n**Conversion counting modes** change what \"conversion\" means:\n- `conversion_rate_unique` (default): unique users who completed. No re-entry — first attempt in the window or out.\n- `conversion_rate_total`: total completions. One user can count multiple times.\n- Combine with `reentry_mode='basic'` or `reentry_mode='optimized'` for multiple attempts. Optimized re-entry picks the best completion path.\n\n**Time-to-convert: prefer medians over averages.** Average time includes outliers — one slow user inflates the average; one fast user pulls it down. Use median or percentiles for true speed trends:\n\n```python\n# Median time via funnel math\nresult = ws.query_funnel(steps, last=90, math='median')\n\n# Compare segments with filtered funnels + tight window\nios = ws.query_funnel(steps, where=Filter.equals('platform', 'iOS'),\n    last=90, conversion_window=6, conversion_window_unit='hour')\nandroid = ws.query_funnel(steps, where=Filter.equals('platform', 'Android'),\n    last=90, conversion_window=6, conversion_window_unit='hour')\n# Compare avg_time_from_start on matching steps\n```\n\n**When comparing segments across funnels:** always try at least 2-3 conversion windows. A difference invisible at 14 days may be stark at 6 hours. This is especially true for speed comparisons — tighter windows filter out noise and reveal which segment completes faster.\n\n**`order` changes what \"conversion\" means.** `'loose'` (default) requires steps in sequence but allows other events between them. `'any'` requires all steps in any order — a user who does C→B→A counts as converting. The difference is dramatic: loose funnels measure sequential workflows; any-order funnels measure feature adoption breadth. When unsure, run both and compare:\n\n```python\n# order='loose' vs 'any' — same steps, fundamentally different questions\nfor ord in ['loose', 'any']:\n    result = ws.query_funnel(steps, last=90, order=ord)\n    print(f\"order={ord}: {result.overall_conversion_rate:.3f}\")\n# If 'any' >> 'loose', users are completing all steps but not in the expected order\n# This often reveals UX issues — users accomplish the goal but not via the designed path\n```\n\n**`holding_constant` isolates cross-step consistency.** Hold a property like `'platform'` or `'device_id'` constant and users who change values between steps (e.g., sign up on iOS, purchase on Android) are excluded. This reveals single-device vs cross-device conversion and is essential for understanding journeys that span platforms. Maximum 3 properties.\n\n**Exclusions disqualify tainted journeys.** `exclusions=[\"Logout\"]` removes users who logged out between funnel steps — unlike flow `hidden_events`, exclusions completely remove users from the funnel. Use for support escalation events, churn signals, or any action that taints the conversion path. Control which steps the exclusion applies to with `Exclusion(\"Logout\", from_step=0, to_step=2)` (0-indexed).\n\n**Per-step filters narrow individual steps without affecting others.** `FunnelStep(\"Purchase\", filters=[Filter.greater_than(\"amount\", 50)])` restricts which Purchase events count, but doesn't filter Signup events. Global `where` filters ALL steps. This distinction is subtle but powerful: filter the population with `where`, filter the definition of a step with per-step filters.\n\n**Session windows are a distinct paradigm.** `conversion_window_unit='session'` constrains the entire funnel to a single engagement session — no multi-session hops. This reveals true in-session conversion behavior, separate from users who spread a journey across days. The third counting mode, `math='conversion_rate_session'`, counts sessions rather than users or events (requires `conversion_window_unit='session'`).\n\n#### Retention Analysis: The Cohort Bucketing Triple\n\n**`retention_unit` + `alignment` + `bucket_sizes` define your entire retention model** — retention's equivalent of the funnel conversion window. `retention_unit` groups users into cohorts (day\u002Fweek\u002Fmonth). `alignment` anchors cohorts (`birth` = each user's clock starts from their event; `interval_start` = snap to calendar boundaries). `bucket_sizes` sets measurement points. Changing any one reshapes all downstream metrics.\n\n**Match `retention_unit` to your product's natural usage cadence.** Daily products (social, messaging) need `retention_unit='day'`. Weekly products (task management, fitness) need `'week'`. Monthly products (subscriptions, B2B SaaS) need `'month'`. When unsure, experiment:\n\n```python\n# Sweep retention_unit to find natural product cadence\nborn, ret = 'Signup', 'Login'  # use real event names\nfor ru in ['day', 'week', 'month']:\n    result = ws.query_retention(born, ret, retention_unit=ru, last=90)\n    avg = result.average\n    if avg is not None and len(avg) > 1:\n        bucket_1_rate = avg.iloc[1]['rate'] if 'rate' in avg.columns else None\n        print(f\"{ru:>6} retention: bucket 1 = {bucket_1_rate}\")\n# The unit where bucket-1 retention is highest reveals natural usage cadence\n\n# Custom buckets for milestone-based retention (days 1, 3, 7, 14, 30)\nresult = ws.query_retention(born, ret, retention_unit='week',\n    bucket_sizes=[1, 3, 7, 14, 30], unit='day', last=90)\nprint(result.df[result.df['cohort_date'] == '$overall'])\n# Day 1 = activation, Day 7 = habit formation, Day 30 = long-term retention\n\n# Compare alignment modes — can shift results dramatically\nfor align in ['birth', 'interval_start']:\n    result = ws.query_retention(born, ret, retention_unit='week',\n        alignment=align, last=90)\n    print(f\"\\nalignment={align}:\")\n    print(result.average.head() if result.average is not None else \"No data\")\n```\n\n**Be wary of unbounded modes — they inflate retention.** `unbounded_mode='carry_forward'` credits future returns to past buckets — a user who returns only on day 30 gets counted as retained in all buckets from 30 onward. `carry_back` inflates early buckets instead. Useful for \"did they ever engage?\" analysis but distorts standard retention curves.\n\n**`retention_cumulative=True` masks re-engagement gaps.** Cumulative retention creates monotonically increasing curves where each bucket includes all prior buckets. This hides whether users who returned in week 1 ALSO returned in week 2. Standard (non-cumulative) retention reveals re-engagement patterns and true habit formation.\n\n**Counting methodology:** `math='retention_rate'` (% who returned — the default), `math='unique'` (count who returned), `math='total'` (how many times they returned — events, not users). `total` reveals engagement intensity; a user logging in 5 times in bucket 1 counts as 5, not 1. Like funnels, the counting choice changes the question.\n\n#### Flow Analysis: Windows, Cardinality, and Signal-to-Noise\n\n**Cardinality controls signal-to-noise** — the most important flow-specific parameter. Low cardinality (2-3) reveals dominant paths — the main story. High cardinality (10+) reveals edge cases and niche journeys. Start low to find the narrative, then increase to find exceptions.\n\n**`conversion_window` matters for flows too** — identical concept to funnels. Session-based windows (`conversion_window_unit='session'`) reveal in-app behavior within a single engagement. Calendar windows reveal multi-day journeys. A tight window isolates intentional workflows; a wide window captures exploratory meandering:\n\n```python\n# Sweep cardinality to find signal-to-noise sweet spot\nevent = 'Login'  # use a real anchor event\nfor card in [2, 3, 5, 10]:\n    result = ws.query_flow(event, forward=3, cardinality=card, last=30)\n    transitions = result.top_transitions(5)\n    print(f\"\\ncardinality={card}: {len(transitions)} top transitions\")\n    for src, dst, count in transitions[:3]:\n        print(f\"  {src} → {dst}: {count}\")\n# Low cardinality = clear narrative; high cardinality = exhaustive but noisy\n\n# Compare count types (same principle as funnels)\nfor ct in ['unique', 'total', 'session']:\n    result = ws.query_flow(event, forward=3, count_type=ct, last=30)\n    dropoff = result.drop_off_summary()\n    print(f\"\\n{ct}: step 0 dropoff = {dropoff}\")\n# unique = how many people; total = how much activity; session = how many sessions\n\n# Compare collapse_repeated to separate intent from noise\nfor collapse in [False, True]:\n    result = ws.query_flow(event, forward=3, collapse_repeated=collapse,\n                            cardinality=5, last=30)\n    print(f\"\\ncollapse_repeated={collapse}:\")\n    for src, dst, count in result.top_transitions(3):\n        print(f\"  {src} → {dst}: {count}\")\n```\n\n**`collapse_repeated` changes what \"a path\" means.** With `False` (default), A→A→A→B is a distinct path from A→B — repetitive clicks look like distinct journeys. With `True`, consecutive duplicates merge, revealing intent over noise. Toggle this to see both the raw behavior and the simplified user intent.\n\n**`hidden_events` vs `exclusions` — hiding vs disqualifying.** `hidden_events` removes events from display but they still affect path structure and counts. `exclusions` disqualifies users who performed those events entirely — a much stronger operation. Use `hidden_events` for decluttering (e.g., ubiquitous page views); use `exclusions` for removing tainted journeys (e.g., users who churned mid-flow).\n\n**Three modes reveal different stories.** `sankey` shows aggregate flow structure and bottlenecks (where do most users go?). `paths` shows exact user journeys in sequence (what are the top 5 complete paths?). `tree` shows branching decision points (where do users diverge?). Use all three on the same data to build a complete picture.\n\n#### User Profile Analysis: Modes, Aggregates, and Distribution Shape\n\n**`mode` is the most critical user query parameter.** `'profiles'` returns individual user records (one row per user). `'aggregate'` returns a single statistic. These are fundamentally different operations — profiles is a data extraction, aggregate is a calculation. Aggregate is also dramatically faster (single API call vs paginated fetching).\n\n**Sweep aggregate functions to understand distribution shape** before building expensive profile queries. `count` tells you \"how many.\" `extremes` reveals range (min\u002Fmax). `percentile` at 50 gives median. `numeric_summary` gives mean, variance, and sum-of-squares:\n\n```python\n# Sweep aggregate functions to understand a property's distribution\nprop = 'lifetime_value'  # use a real numeric profile property\nfor agg in ['count', 'extremes', 'percentile', 'numeric_summary']:\n    kwargs = {'mode': 'aggregate', 'aggregate': agg}\n    if agg != 'count':\n        kwargs['aggregate_property'] = prop\n    if agg == 'percentile':\n        kwargs['percentile'] = 50  # median\n    result = ws.query_user(**kwargs)\n    print(f\"{agg:>16}: {result.aggregate_data}\")\n# count = population size, extremes = range, percentile@50 = median,\n# numeric_summary = full distribution stats\n# If mean (from numeric_summary) >> median (from percentile), distribution is right-skewed\n\n# Point-in-time comparison with as_of\ntoday_count = ws.query_user(mode='aggregate', aggregate='count',\n    where=Filter.equals('plan', 'premium'))\npast_count = ws.query_user(mode='aggregate', aggregate='count',\n    where=Filter.equals('plan', 'premium'), as_of='2025-01-01')\nprint(f\"Premium users: {past_count.value} (Jan 1) → {today_count.value} (today)\")\n```\n\n**Prefer medians over averages** — same principle as funnels and Insights. `aggregate='percentile', percentile=50` gives median; `numeric_summary` gives mean. If they diverge significantly, the distribution is skewed and the mean is misleading.\n\n**`as_of` enables temporal analysis** — query profiles as they existed at a past date. Compare population states over time: \"how many premium users existed on Jan 1 vs today?\" Without `as_of`, you always see current state, making growth and churn invisible.\n\n**Inline `CohortDefinition` vs saved cohorts.** Inline cohorts (`cohort=CohortDefinition.all_of(...)`) let you define complex behavioral segments on-the-fly without roundtripping to save\u002Fdelete in Mixpanel. Much faster iteration for exploratory analysis. Use saved cohorts for production dashboards and monitoring.\n\n#### Analytical Building Blocks: Custom Properties, Cohorts, and Frequency\n\nRaw data is rarely analysis-ready. These three tools transform raw events and properties into analytically useful dimensions, populations, and segments. Recognize when to reach for each — they compose with every query engine.\n\n**Inline Custom Properties — transform data at query time.** When property values are messy, need bucketing, or you need to derive new dimensions, create an `InlineCustomProperty` rather than querying raw values. Key patterns:\n\n- **Bucketing continuous values** for breakdowns (revenue → Low\u002FMedium\u002FHigh)\n- **Cleaning messy strings** with IFS\u002FREGEX_EXTRACT (campaign names, UTM parameters)\n- **Deriving new dimensions** from arithmetic or date functions (profit margin, days since signup)\n- **Fallback chains** across multiple properties (display_name → username → \"unknown\")\n\n```python\nfrom mixpanel_headless import InlineCustomProperty, PropertyInput, GroupBy, Filter, Metric\n\n# Bucket revenue into tiers for breakdown\nrevenue_tier = InlineCustomProperty(\n    formula='IFS(A \u003C 50, \"Low\", A \u003C 200, \"Medium\", TRUE, \"High\")',\n    inputs={\"A\": PropertyInput(\"revenue\", type=\"number\")},\n    property_type=\"string\",\n)\nresult = ws.query(\"Purchase\", group_by=GroupBy(property=revenue_tier), last=30, mode='total')\n\n# Derive profit margin for aggregation\nmargin = InlineCustomProperty.numeric(\"(A - B) \u002F A * 100\", A=\"revenue\", B=\"cost\")\nresult = ws.query(Metric(\"Purchase\", math=\"average\", property=margin), last=30)\n\n# Clean messy strings for segmentation\ndomain = InlineCustomProperty(\n    formula='REGEX_EXTRACT(A, \"@(.+)$\")',\n    inputs={\"A\": PropertyInput(\"email\", type=\"string\")},\n    property_type=\"string\",\n)\nresult = ws.query(\"Signup\", group_by=GroupBy(property=domain), last=30, mode='total')\n```\n\nUse `InlineCustomProperty` for ad-hoc exploration. When a formula proves valuable, persist it with `ws.create_custom_property()` and reference it via `CustomPropertyRef(id)` across reports.\n\n**Inline Cohorts — define complex populations on-the-fly.** Every analytical question starts with \"among WHICH users?\" Simple property filters (`where=Filter.equals(...)`) answer \"users with attribute X.\" Inline cohorts answer harder questions: \"users who did X at least N times in the last D days AND did NOT do Y AND have property Z.\" Compose criteria with AND\u002FOR logic:\n\n```python\nfrom mixpanel_headless import CohortDefinition, CohortCriteria, CohortBreakdown, CohortMetric\n\n# \"Power users\": purchased 5+ times in 30 days, never contacted support\npower_users = CohortDefinition.all_of(\n    CohortCriteria.did_event(\"Purchase\", at_least=5, within_days=30),\n    CohortCriteria.did_not_do_event(\"Support Ticket\", within_days=90),\n)\n\n# Use inline cohort as a breakdown — no need to save first\nresult = ws.query(\"Login\", group_by=CohortBreakdown(power_users, \"Power Users\"), last=30)\n\n# Use inline cohort as a filter in user queries\nresult = ws.query_user(cohort=power_users, mode='aggregate', aggregate='count')\n\n# Track saved cohort size over time alongside event metrics\nresult = ws.query(\n    [Metric(\"Login\", math=\"unique\"), CohortMetric(saved_cohort_id, \"Power Users\")],\n    formula=\"(B \u002F A) * 100\", formula_label=\"% Power Users Active\", last=90,\n)\n```\n\n**Frequency Breakdown\u002FFilter — segment by behavioral intensity.** `FrequencyBreakdown` answers \"how do users who did X once differ from users who did X ten times?\" `FrequencyFilter` restricts queries to users meeting a frequency threshold. These bridge \"what users did\" with \"who users are\":\n\n```python\nfrom mixpanel_headless import FrequencyBreakdown, FrequencyFilter\n\n# Break down login behavior by purchase frequency\nresult = ws.query(\"Login\", math='unique',\n    group_by=FrequencyBreakdown(\"Purchase\", bucket_size=3, bucket_min=0, bucket_max=15),\n    last=30, mode='total')\n# Reveals: do frequent purchasers also log in more?\n\n# Filter to users who purchased 3+ times in 30 days, then analyze their flow\nresult = ws.query_flow(\"Login\", forward=3,\n    where=FrequencyFilter(\"Purchase\", value=3, date_range_value=30, date_range_unit=\"day\"),\n    last=30)\n# Reveals: what do repeat purchasers do after logging in?\n```\n\n**When to reach for each:**\n- Property values are messy or need derivation → **Custom Property**\n- Population requires behavioral criteria (did X, didn't do Y, frequency thresholds) → **Inline Cohort**\n- You need to segment by event frequency (how often, not just whether) → **FrequencyBreakdown\u002FFilter**\n- You need to compare in-cohort vs out-of-cohort behavior → **CohortBreakdown** with `include_negated=True`\n- You need to track a segment's size as a time series → **CohortMetric** (saved cohorts only)\n\n### Legacy Queries & Counts\n\nThese use older APIs. Prefer the typed query methods above when possible.\n\n```python\ndef segmentation(self, event: str, *, from_date: str, to_date: str, on: str | None = None, unit: Literal['day', 'week', 'month'] = 'day', where: str | None = None) -> SegmentationResult: ...\ndef funnel(self, funnel_id: int, *, from_date: str, to_date: str, unit: str | None = None, on: str | None = None) -> FunnelResult: ...\ndef retention(self, *, born_event: str, return_event: str, from_date: str, to_date: str, born_where: str | None = None, return_where: str | None = None, interval: int = 1, interval_count: int = 10, unit: Literal['day', 'week', 'month'] = 'day') -> RetentionResult: ...\ndef event_counts(self, events: list[str], *, from_date: str, to_date: str, type: Literal['general', 'unique', 'average'] = 'general', unit: Literal['day', 'week', 'month'] = 'day') -> EventCountsResult: ...\ndef property_counts(self, event: str, property_name: str, *, from_date: str, to_date: str, type: Literal['general', 'unique', 'average'] = 'general', unit: Literal['day', 'week', 'month'] = 'day', values: list[str] | None = None, limit: int | None = None) -> PropertyCountsResult: ...\ndef frequency(self, *, from_date: str, to_date: str, unit: Literal['day', 'week', 'month'] = 'day', addiction_unit: Literal['hour', 'day'] = 'hour', event: str | None = None, where: str | None = None) -> FrequencyResult: ...\ndef activity_feed(self, distinct_ids: list[str], *, from_date: str | None = None, to_date: str | None = None) -> ActivityFeedResult: ...\ndef query_saved_report(self, bookmark_id: int, *, bookmark_type: Literal['insights', 'funnels', 'retention', 'flows'] = 'insights', from_date: str | None = None, to_date: str | None = None) -> SavedReportResult: ...\ndef query_saved_flows(self, bookmark_id: int) -> FlowsResult: ...\ndef segmentation_numeric(self, event: str, *, from_date: str, to_date: str, on: str, unit: Literal['hour', 'day'] = 'day', where: str | None = None, type: Literal['general', 'unique', 'average'] = 'general') -> NumericBucketResult: ...\ndef segmentation_sum(self, event: str, *, from_date: str, to_date: str, on: str, unit: Literal['hour', 'day'] = 'day', where: str | None = None) -> NumericSumResult: ...\ndef segmentation_average(self, event: str, *, from_date: str, to_date: str, on: str, unit: Literal['hour', 'day'] = 'day', where: str | None = None) -> NumericAverageResult: ...\n```\n\n### Entity CRUD (App API)\n\nAll entity methods require a workspace ID. Use `python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.\u003Cmethod>` for full signatures and parameter types.\nUser Guide: `WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fguide\u002Fentity-management\u002Findex.md\")`\n\n#### Dashboard (→ `Dashboard`)\n\n`list_dashboards`, `create_dashboard`, `get_dashboard`, `update_dashboard`, `delete_dashboard`, `bulk_delete_dashboards`, `favorite_dashboard`, `unfavorite_dashboard`, `pin_dashboard`, `unpin_dashboard`, `add_report_to_dashboard`, `remove_report_from_dashboard`, `update_text_card`, `update_report_link`\n\n**Blueprints:** `list_blueprint_templates` → `list[BlueprintTemplate]`, `create_blueprint`, `get_blueprint_config`, `update_blueprint_cohorts`, `finalize_blueprint`, `create_rca_dashboard`\n\n**Helpers:** `get_bookmark_dashboard_ids` → `list[int]`, `get_dashboard_erf` → `dict`\n\n#### Bookmark \u002F Report (→ `Bookmark`)\n\n`list_bookmarks_v2`, `create_bookmark`, `get_bookmark`, `update_bookmark`, `delete_bookmark`, `bulk_delete_bookmarks`, `bulk_update_bookmarks`, `bookmark_linked_dashboard_ids` → `list[int]`, `get_bookmark_history` → `BookmarkHistoryResponse`\n\n#### Cohort (→ `Cohort`)\n\n`list_cohorts_full`, `get_cohort`, `create_cohort`, `update_cohort`, `delete_cohort`, `bulk_delete_cohorts`, `bulk_update_cohorts`\n\n#### Feature Flag (→ `FeatureFlag`)\n\n`list_feature_flags`, `create_feature_flag`, `get_feature_flag`, `update_feature_flag`, `delete_feature_flag`, `archive_feature_flag`, `restore_feature_flag`, `duplicate_feature_flag`, `set_flag_test_users`, `get_flag_history` → `FlagHistoryResponse`, `get_flag_limits` → `FlagLimitsResponse`\n\n#### Experiment (→ `Experiment`)\n\n`list_experiments`, `create_experiment`, `get_experiment`, `update_experiment`, `delete_experiment`, `launch_experiment`, `conclude_experiment`, `decide_experiment`, `archive_experiment`, `restore_experiment`, `duplicate_experiment`, `list_erf_experiments` → `list[dict]`\n\n#### Alert (→ `CustomAlert`)\n\n`list_alerts`, `create_alert`, `get_alert`, `update_alert`, `delete_alert`, `bulk_delete_alerts`, `get_alert_count` → `AlertCount`, `get_alert_history` → `AlertHistoryResponse`, `test_alert`, `get_alert_screenshot_url`, `validate_alerts_for_bookmark`\n\n#### Annotation (→ `Annotation`)\n\n`list_annotations`, `create_annotation`, `get_annotation`, `update_annotation`, `delete_annotation`, `list_annotation_tags` → `list[AnnotationTag]`, `create_annotation_tag`\n\n#### Webhook (→ `ProjectWebhook`)\n\n`list_webhooks`, `create_webhook`, `update_webhook`, `delete_webhook`, `test_webhook`\n\n#### Lexicon & Data Governance\n\n**Event\u002FProperty Definitions:** `get_event_definitions`, `update_event_definition`, `delete_event_definition`, `bulk_update_event_definitions`, `get_property_definitions`, `update_property_definition`, `bulk_update_property_definitions`, `export_lexicon`, `get_event_history`, `get_property_history`\n\n**Tags:** `list_lexicon_tags`, `create_lexicon_tag`, `update_lexicon_tag`, `delete_lexicon_tag`\n\n**Drop Filters:** `list_drop_filters`, `create_drop_filter`, `update_drop_filter`, `delete_drop_filter`, `get_drop_filter_limits`\n\n**Custom Properties:** `list_custom_properties`, `create_custom_property`, `get_custom_property`, `update_custom_property`, `delete_custom_property`, `validate_custom_property`\n\n**Custom Events:** `list_custom_events`, `update_custom_event`, `delete_custom_event`\n\n**Lookup Tables:** `list_lookup_tables`, `upload_lookup_table`, `download_lookup_table`, `update_lookup_table`, `delete_lookup_tables`\n\n**Schema Registry:** `list_schema_registry`, `create_schema`, `update_schema`, `create_schemas_bulk`, `update_schemas_bulk`, `delete_schemas`\n\n**Schema Enforcement:** `get_schema_enforcement`, `init_schema_enforcement`, `update_schema_enforcement`, `replace_schema_enforcement`, `delete_schema_enforcement`\n\n**Audit & Monitoring:** `run_audit`, `run_audit_events_only`, `list_data_volume_anomalies`, `update_anomaly`, `bulk_update_anomalies`\n\n**Data Deletion:** `list_deletion_requests`, `create_deletion_request`, `cancel_deletion_request`, `preview_deletion_filters`\n\n**Other:** `get_tracking_metadata`\n\n### Business Context\n\nRead and write the markdown documentation that grounds AI assistants in your organization's structure and goals, exposed as a typed Python API.\n\nTwo scopes — `level=\"organization\"` (shared across the whole org) and `level=\"project\"` (per-project). 50,000-character cap enforced **client-side before any HTTP call** so oversize input fails fast. Org-level operations auto-resolve `organization_id` from the cached `\u002Fme` response; pass `organization_id=N` to override.\n\nRun `python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py search business_context` to see all four methods, two types, and one exception.\n\n```python\nfrom mixpanel_headless import BUSINESS_CONTEXT_MAX_CHARS  # 50_000\n\n# Read\nproject_ctx = ws.get_business_context(level=\"project\")\norg_ctx = ws.get_business_context(level=\"organization\")  # auto-resolves org_id\nexplicit = ws.get_business_context(level=\"organization\", organization_id=42)\n\n# Read both at once (single round-trip via \u002Fbusiness-context\u002Fchain)\nchain = ws.get_business_context_chain()\nprint(chain.organization.content)\nprint(chain.project.content)\n\n# Write (full-replace; pass \"\" to clear, or use clear_business_context())\nws.set_business_context(\"# About Acme\\n…\", level=\"project\")\nws.set_business_context(\"# Org-wide standards\", level=\"organization\")\nws.clear_business_context(level=\"project\")\n\n# All return BusinessContext with: level, content, organization_id, project_id\n# Plus convenience .is_empty and .character_count properties (Python only)\nprint(f\"{project_ctx.character_count}\u002F{BUSINESS_CONTEXT_MAX_CHARS} chars; \"\n      f\"empty={project_ctx.is_empty}\")\n```\n\n**When to reach for this:**\n\n- User asks \"what's the business context for this project\u002Forg?\" → `get_business_context_chain()`\n- User wants to version-control project context as a `.md` file → `ws.set_business_context(Path(\"ctx.md\").read_text(), level=\"project\")` in CI\n- User asks to \"audit which projects have AI context configured\" → iterate `ws.projects()` + `ws.use(project=...)` + `ws.get_business_context(level=\"project\")` and check `.is_empty`\n- User asks to seed a new project from the org default → `chain = ws.get_business_context_chain(); ws.set_business_context(chain.organization.content, level=\"project\")`\n\n**Permissions:** project-scope reads need any project access; project-scope writes need `edit_project_info` on the project. Org-scope writes need `edit_project_info` at the org level (typically OAuth, not service account). The `BusinessContextValidationError` exception is raised client-side BEFORE any HTTP call when content exceeds 50,000 chars, so use it to detect oversize input without burning a round-trip.\n\nUser Guide: `WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fguide\u002Fbusiness-context\u002Findex.md\")`\n\n## Key Types\n\nRun `python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py types` for the full list of all types. Use `help.py \u003CTypeName>` for fields, constructors, and enum values.\nFull reference: `WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fapi\u002Ftypes\u002Findex.md\")`\n\n| Type | Purpose |\n|------|---------|\n| `Filter` | Property filter conditions (`.equals()`, `.contains()`, `.in_cohort()`, etc.) |\n| `GroupBy` | Property breakdown with optional bucketing |\n| `Formula` | Calculated metric expression referencing events by position (A, B, C...) |\n| `Metric` | Event with per-event math\u002Faggregation settings |\n| `CohortMetric` | Track cohort size over time as an event metric |\n| `FunnelStep` | Funnel step with per-step filters, labels, ordering |\n| `Exclusion` | Event to exclude between funnel steps |\n| `HoldingConstant` | Property to hold constant across funnel steps |\n| `RetentionEvent` | Retention event with per-event filters |\n| `FlowStep` | Flow anchor event with per-step forward\u002Freverse configuration |\n| `TimeComparison` | Period-over-period comparison (`.relative(\"month\")`, `.absolute_start(...)`) |\n| `FrequencyBreakdown` | Break down by how often users performed an event |\n| `FrequencyFilter` | Filter by how often users performed an event |\n| `CohortBreakdown` | Break down results by cohort membership |\n| `CohortDefinition` | Inline cohort definition for user queries |\n| `CohortCriteria` | Atomic condition for cohort membership |\n| `CustomPropertyRef` | Reference to a persisted custom property by ID |\n| `InlineCustomProperty` | Ephemeral computed property defined by formula |\n\n**Aggregation enums** (use `help.py \u003CEnumName>` to see all values):\n\n| Enum | Used by | Common values |\n|------|---------|---------------|\n| `MathType` | `query()` | total, unique, dau, average, sum, min, max, percentile, sessions |\n| `FunnelMathType` | `query_funnel()` | conversion_rate_unique, conversion_rate_total, average, median |\n| `RetentionMathType` | `query_retention()` | retention_rate, retention_count |\n\n## Statistical Analysis — numpy, scipy\n\nAll query results produce pandas DataFrames, which integrate directly with numpy and scipy:\n\n```python\nimport numpy as np\nfrom scipy import stats\n\n# Compare two segments\na = result.df[result.df[\"platform\"] == \"iOS\"][\"count\"]\nb = result.df[result.df[\"platform\"] == \"Android\"][\"count\"]\nt_stat, p_value = stats.ttest_ind(a, b)\ncohens_d = (a.mean() - b.mean()) \u002F np.sqrt((a.std()**2 + b.std()**2) \u002F 2)\n\n# Useful scipy.stats tests: ttest_ind, mannwhitneyu, chi2_contingency, pearsonr, spearmanr\n# Useful numpy: np.percentile, np.corrcoef, np.polyfit (trend lines)\n```\n\n## Visualization — matplotlib, seaborn\n\nSave charts to files for the user. Always use a non-interactive backend:\n\n```python\nimport matplotlib\nmatplotlib.use(\"Agg\")\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nfig, ax = plt.subplots(figsize=(10, 5))\nresult.df.plot(x=\"date\", y=\"count\", ax=ax)\nax.set_title(\"Daily Logins\")\nfig.savefig(\"chart.png\", dpi=150, bbox_inches=\"tight\")\nplt.close(fig)\n\n# seaborn: sns.lineplot, sns.barplot, sns.heatmap (for retention matrices)\n# Multi-panel: fig, axes = plt.subplots(2, 2) for dashboard-style layouts\n```\n\n## Exceptions\n\nFull reference: `WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fapi\u002Fexceptions\u002Findex.md\")`\n\n| Exception | When |\n|-----------|------|\n| `MixpanelHeadlessError` | Base for all errors |\n| `ConfigError` | No credentials resolved |\n| `AccountNotFoundError` | Named account doesn't exist |\n| `AuthenticationError` | Invalid credentials (401) |\n| `QueryError` | Invalid query parameters (400) |\n| `BookmarkValidationError` | Params failed validation |\n| `RateLimitError` | Rate limit exceeded (429) |\n| `ServerError` | Mixpanel server error (5xx) |\n| `WorkspaceScopeError` | Workspace resolution error (also raised when org_id can't be auto-resolved for `level=\"organization\"` business-context calls) |\n| `DateRangeTooLargeError` | Date range exceeds API maximum |\n| `OAuthError` | OAuth flow error |\n| `BusinessContextValidationError` | Business context content exceeds 50,000 chars (client-side, before HTTP) |\n",{"data":37,"body":39},{"name":4,"description":6,"allowed-tools":38},"Bash Read Write WebFetch",{"type":40,"children":41},"root",[42,51,90,139,146,309,353,387,393,403,410,563,575,597,638,1015,1026,1032,1253,1259,1264,1270,1392,1398,1403,1551,1556,1673,1679,1684,1786,1792,1797,1848,1854,1859,1898,1904,1917,1935,1945,1967,2045,2053,2089,2097,2254,2264,2273,2283,2292,2328,2406,2431,2474,2534,2563,2592,2600,2734,2740,3095,3106,3112,3266,3403,3409,3422,3637,3643,3654,3839,3845,3856,4030,4036,4047,4216,4222,4233,4429,4435,4448,4495,4501,4506,4641,4648,4653,4769,4775,4872,4896,5061,5099,5152,5158,5178,5188,5198,5269,5279,5324,5334,5411,5421,5452,5507,5538,5571,5603,5635,5641,5709,5750,5931,5955,5971,6010,6016,6026,6049,6245,6277,6327,6360,6366,6397,6438,6604,6629,6652,6678,6684,6689,6707,6750,6919,6947,6965,7118,7143,7252,7260,7322,7328,7333,7436,7442,7461,7474,7574,7632,7668,7681,7759,7772,7823,7836,7929,7942,8035,8048,8141,8154,8212,8225,8262,8268,8346,8382,8425,8475,8504,8547,8597,8640,8683,8719,8734,8740,8745,8797,8809,8980,8988,9066,9099,9110,9116,9142,9500,9518,9623,9629,9634,9727,9733,9738,9847,9853,9864,10096],{"type":43,"tag":44,"props":45,"children":47},"element","h1",{"id":46},"mixpanel_headless-api-reference",[48],{"type":49,"value":50},"text","mixpanel_headless API Reference",{"type":43,"tag":52,"props":53,"children":54},"p",{},[55,57,64,66,72,74,80,82,88],{"type":49,"value":56},"Analyze Mixpanel data by writing and executing Python code using the ",{"type":43,"tag":58,"props":59,"children":61},"code",{"className":60},[],[62],{"type":49,"value":63},"mixpanel_headless",{"type":49,"value":65}," library and ",{"type":43,"tag":58,"props":67,"children":69},{"className":68},[],[70],{"type":49,"value":71},"pandas",{"type":49,"value":73},".\nBefore running bundled helper scripts, set ",{"type":43,"tag":58,"props":75,"children":77},{"className":76},[],[78],{"type":49,"value":79},"SKILL_DIR",{"type":49,"value":81}," to the absolute path of this\n",{"type":43,"tag":58,"props":83,"children":85},{"className":84},[],[86],{"type":49,"value":87},"skills\u002Fmixpanelyst",{"type":49,"value":89}," directory.",{"type":43,"tag":91,"props":92,"children":97},"pre",{"className":93,"code":94,"language":95,"meta":96,"style":96},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import mixpanel_headless as mp\nws = mp.Workspace()\nresult = ws.query(\"Login\", last=30)\nprint(result.df.head())\n","python","",[98],{"type":43,"tag":58,"props":99,"children":100},{"__ignoreMap":96},[101,112,121,130],{"type":43,"tag":102,"props":103,"children":106},"span",{"class":104,"line":105},"line",1,[107],{"type":43,"tag":102,"props":108,"children":109},{},[110],{"type":49,"value":111},"import mixpanel_headless as mp\n",{"type":43,"tag":102,"props":113,"children":115},{"class":104,"line":114},2,[116],{"type":43,"tag":102,"props":117,"children":118},{},[119],{"type":49,"value":120},"ws = mp.Workspace()\n",{"type":43,"tag":102,"props":122,"children":124},{"class":104,"line":123},3,[125],{"type":43,"tag":102,"props":126,"children":127},{},[128],{"type":49,"value":129},"result = ws.query(\"Login\", last=30)\n",{"type":43,"tag":102,"props":131,"children":133},{"class":104,"line":132},4,[134],{"type":43,"tag":102,"props":135,"children":136},{},[137],{"type":49,"value":138},"print(result.df.head())\n",{"type":43,"tag":140,"props":141,"children":143},"h2",{"id":142},"query-engines",[144],{"type":49,"value":145},"Query Engines",{"type":43,"tag":147,"props":148,"children":149},"table",{},[150,174],{"type":43,"tag":151,"props":152,"children":153},"thead",{},[154],{"type":43,"tag":155,"props":156,"children":157},"tr",{},[158,164,169],{"type":43,"tag":159,"props":160,"children":161},"th",{},[162],{"type":49,"value":163},"Question",{"type":43,"tag":159,"props":165,"children":166},{},[167],{"type":49,"value":168},"Method",{"type":43,"tag":159,"props":170,"children":171},{},[172],{"type":49,"value":173},"Returns",{"type":43,"tag":175,"props":176,"children":177},"tbody",{},[178,205,231,257,283],{"type":43,"tag":155,"props":179,"children":180},{},[181,187,196],{"type":43,"tag":182,"props":183,"children":184},"td",{},[185],{"type":49,"value":186},"How much? How many? Trends?",{"type":43,"tag":182,"props":188,"children":189},{},[190],{"type":43,"tag":58,"props":191,"children":193},{"className":192},[],[194],{"type":49,"value":195},"ws.query()",{"type":43,"tag":182,"props":197,"children":198},{},[199],{"type":43,"tag":58,"props":200,"children":202},{"className":201},[],[203],{"type":49,"value":204},"QueryResult",{"type":43,"tag":155,"props":206,"children":207},{},[208,213,222],{"type":43,"tag":182,"props":209,"children":210},{},[211],{"type":49,"value":212},"Do users convert through a sequence?",{"type":43,"tag":182,"props":214,"children":215},{},[216],{"type":43,"tag":58,"props":217,"children":219},{"className":218},[],[220],{"type":49,"value":221},"ws.query_funnel()",{"type":43,"tag":182,"props":223,"children":224},{},[225],{"type":43,"tag":58,"props":226,"children":228},{"className":227},[],[229],{"type":49,"value":230},"FunnelQueryResult",{"type":43,"tag":155,"props":232,"children":233},{},[234,239,248],{"type":43,"tag":182,"props":235,"children":236},{},[237],{"type":49,"value":238},"Do users come back?",{"type":43,"tag":182,"props":240,"children":241},{},[242],{"type":43,"tag":58,"props":243,"children":245},{"className":244},[],[246],{"type":49,"value":247},"ws.query_retention()",{"type":43,"tag":182,"props":249,"children":250},{},[251],{"type":43,"tag":58,"props":252,"children":254},{"className":253},[],[255],{"type":49,"value":256},"RetentionQueryResult",{"type":43,"tag":155,"props":258,"children":259},{},[260,265,274],{"type":43,"tag":182,"props":261,"children":262},{},[263],{"type":49,"value":264},"What paths do users take?",{"type":43,"tag":182,"props":266,"children":267},{},[268],{"type":43,"tag":58,"props":269,"children":271},{"className":270},[],[272],{"type":49,"value":273},"ws.query_flow()",{"type":43,"tag":182,"props":275,"children":276},{},[277],{"type":43,"tag":58,"props":278,"children":280},{"className":279},[],[281],{"type":49,"value":282},"FlowQueryResult",{"type":43,"tag":155,"props":284,"children":285},{},[286,291,300],{"type":43,"tag":182,"props":287,"children":288},{},[289],{"type":49,"value":290},"Who are they? What do they look like?",{"type":43,"tag":182,"props":292,"children":293},{},[294],{"type":43,"tag":58,"props":295,"children":297},{"className":296},[],[298],{"type":49,"value":299},"ws.query_user()",{"type":43,"tag":182,"props":301,"children":302},{},[303],{"type":43,"tag":58,"props":304,"children":306},{"className":305},[],[307],{"type":49,"value":308},"UserQueryResult",{"type":43,"tag":52,"props":310,"children":311},{},[312,314,320,322,328,330,335,337,343,345,351],{"type":49,"value":313},"All result types have a ",{"type":43,"tag":58,"props":315,"children":317},{"className":316},[],[318],{"type":49,"value":319},".df",{"type":49,"value":321}," property returning a pandas DataFrame and a ",{"type":43,"tag":58,"props":323,"children":325},{"className":324},[],[326],{"type":49,"value":327},".params",{"type":49,"value":329}," dict containing the bookmark JSON.\n",{"type":43,"tag":58,"props":331,"children":333},{"className":332},[],[334],{"type":49,"value":282},{"type":49,"value":336}," also has ",{"type":43,"tag":58,"props":338,"children":340},{"className":339},[],[341],{"type":49,"value":342},".graph",{"type":49,"value":344}," (NetworkX DiGraph) and ",{"type":43,"tag":58,"props":346,"children":348},{"className":347},[],[349],{"type":49,"value":350},".anytree",{"type":49,"value":352}," (list of tree roots).",{"type":43,"tag":52,"props":354,"children":355},{},[356,362,364,370,372,377,379,385],{"type":43,"tag":357,"props":358,"children":359},"strong",{},[360],{"type":49,"value":361},"Quick lookups",{"type":49,"value":363}," use ",{"type":43,"tag":58,"props":365,"children":367},{"className":366},[],[368],{"type":49,"value":369},"python3 -c \"...\"",{"type":49,"value":371}," one-liners. ",{"type":43,"tag":357,"props":373,"children":374},{},[375],{"type":49,"value":376},"Multi-step analysis",{"type":49,"value":378}," writes ",{"type":43,"tag":58,"props":380,"children":382},{"className":381},[],[383],{"type":49,"value":384},".py",{"type":49,"value":386}," files.",{"type":43,"tag":140,"props":388,"children":390},{"id":389},"discovery-always-do-both-steps-before-querying",[391],{"type":49,"value":392},"Discovery — ALWAYS Do Both Steps Before Querying",{"type":43,"tag":52,"props":394,"children":395},{},[396,398],{"type":49,"value":397},"Guessing event names causes silent empty results. Guessing API parameters causes TypeErrors and invalid queries. ",{"type":43,"tag":357,"props":399,"children":400},{},[401],{"type":49,"value":402},"Discover both the data schema AND the API surface before writing any query.",{"type":43,"tag":404,"props":405,"children":407},"h3",{"id":406},"step-1-discover-the-data-schema",[408],{"type":49,"value":409},"Step 1: Discover the data schema",{"type":43,"tag":91,"props":411,"children":413},{"className":93,"code":412,"language":95,"meta":96,"style":96},"import mixpanel_headless as mp\nfrom mixpanel_headless import Filter, GroupBy, Metric\nws = mp.Workspace()\n\n# 1. Find real event names\nevents = ws.events()\ntop = ws.top_events(limit=10)\nprint(\"Events:\", events[:20])\nprint(\"Top:\", [(e.event, e.count) for e in top])\n\n# 2. Find real property names for the event you'll query\nprops = ws.properties(\"Login\")  # use an actual event name from step 1\nprint(\"Properties:\", props)\n\n# 3. (Optional) Check property values to validate filter inputs\nvals = ws.property_values(\"platform\", event=\"Login\")\nprint(\"Platforms:\", vals)\n",[414],{"type":43,"tag":58,"props":415,"children":416},{"__ignoreMap":96},[417,424,432,439,448,457,466,475,484,493,501,510,519,528,536,545,554],{"type":43,"tag":102,"props":418,"children":419},{"class":104,"line":105},[420],{"type":43,"tag":102,"props":421,"children":422},{},[423],{"type":49,"value":111},{"type":43,"tag":102,"props":425,"children":426},{"class":104,"line":114},[427],{"type":43,"tag":102,"props":428,"children":429},{},[430],{"type":49,"value":431},"from mixpanel_headless import Filter, GroupBy, Metric\n",{"type":43,"tag":102,"props":433,"children":434},{"class":104,"line":123},[435],{"type":43,"tag":102,"props":436,"children":437},{},[438],{"type":49,"value":120},{"type":43,"tag":102,"props":440,"children":441},{"class":104,"line":132},[442],{"type":43,"tag":102,"props":443,"children":445},{"emptyLinePlaceholder":444},true,[446],{"type":49,"value":447},"\n",{"type":43,"tag":102,"props":449,"children":451},{"class":104,"line":450},5,[452],{"type":43,"tag":102,"props":453,"children":454},{},[455],{"type":49,"value":456},"# 1. Find real event names\n",{"type":43,"tag":102,"props":458,"children":460},{"class":104,"line":459},6,[461],{"type":43,"tag":102,"props":462,"children":463},{},[464],{"type":49,"value":465},"events = ws.events()\n",{"type":43,"tag":102,"props":467,"children":469},{"class":104,"line":468},7,[470],{"type":43,"tag":102,"props":471,"children":472},{},[473],{"type":49,"value":474},"top = ws.top_events(limit=10)\n",{"type":43,"tag":102,"props":476,"children":478},{"class":104,"line":477},8,[479],{"type":43,"tag":102,"props":480,"children":481},{},[482],{"type":49,"value":483},"print(\"Events:\", events[:20])\n",{"type":43,"tag":102,"props":485,"children":487},{"class":104,"line":486},9,[488],{"type":43,"tag":102,"props":489,"children":490},{},[491],{"type":49,"value":492},"print(\"Top:\", [(e.event, e.count) for e in top])\n",{"type":43,"tag":102,"props":494,"children":496},{"class":104,"line":495},10,[497],{"type":43,"tag":102,"props":498,"children":499},{"emptyLinePlaceholder":444},[500],{"type":49,"value":447},{"type":43,"tag":102,"props":502,"children":504},{"class":104,"line":503},11,[505],{"type":43,"tag":102,"props":506,"children":507},{},[508],{"type":49,"value":509},"# 2. Find real property names for the event you'll query\n",{"type":43,"tag":102,"props":511,"children":513},{"class":104,"line":512},12,[514],{"type":43,"tag":102,"props":515,"children":516},{},[517],{"type":49,"value":518},"props = ws.properties(\"Login\")  # use an actual event name from step 1\n",{"type":43,"tag":102,"props":520,"children":522},{"class":104,"line":521},13,[523],{"type":43,"tag":102,"props":524,"children":525},{},[526],{"type":49,"value":527},"print(\"Properties:\", props)\n",{"type":43,"tag":102,"props":529,"children":531},{"class":104,"line":530},14,[532],{"type":43,"tag":102,"props":533,"children":534},{"emptyLinePlaceholder":444},[535],{"type":49,"value":447},{"type":43,"tag":102,"props":537,"children":539},{"class":104,"line":538},15,[540],{"type":43,"tag":102,"props":541,"children":542},{},[543],{"type":49,"value":544},"# 3. (Optional) Check property values to validate filter inputs\n",{"type":43,"tag":102,"props":546,"children":548},{"class":104,"line":547},16,[549],{"type":43,"tag":102,"props":550,"children":551},{},[552],{"type":49,"value":553},"vals = ws.property_values(\"platform\", event=\"Login\")\n",{"type":43,"tag":102,"props":555,"children":557},{"class":104,"line":556},17,[558],{"type":43,"tag":102,"props":559,"children":560},{},[561],{"type":49,"value":562},"print(\"Platforms:\", vals)\n",{"type":43,"tag":404,"props":564,"children":566},{"id":565},"step-2-discover-the-api-surface-with-helppy",[567,569],{"type":49,"value":568},"Step 2: Discover the API surface with ",{"type":43,"tag":58,"props":570,"children":572},{"className":571},[],[573],{"type":49,"value":574},"help.py",{"type":43,"tag":52,"props":576,"children":577},{},[578,588,590,595],{"type":43,"tag":357,"props":579,"children":580},{},[581,586],{"type":43,"tag":58,"props":582,"children":584},{"className":583},[],[585],{"type":49,"value":574},{"type":49,"value":587}," is the source of truth for method signatures, parameter names, type constructors, and enum values.",{"type":49,"value":589}," The method signatures later in this document are summaries — always verify with ",{"type":43,"tag":58,"props":591,"children":593},{"className":592},[],[594],{"type":49,"value":574},{"type":49,"value":596}," before using a method or type you haven't looked up.",{"type":43,"tag":52,"props":598,"children":599},{},[600,605,607,613,615,621,623,629,631,636],{"type":43,"tag":357,"props":601,"children":602},{},[603],{"type":49,"value":604},"Never guess parameter names.",{"type":49,"value":606}," If you're unsure whether a parameter is called ",{"type":43,"tag":58,"props":608,"children":610},{"className":609},[],[611],{"type":49,"value":612},"property",{"type":49,"value":614}," or ",{"type":43,"tag":58,"props":616,"children":618},{"className":617},[],[619],{"type":49,"value":620},"math_property",{"type":49,"value":622},", or what arguments ",{"type":43,"tag":58,"props":624,"children":626},{"className":625},[],[627],{"type":49,"value":628},"GroupBy()",{"type":49,"value":630}," accepts, run ",{"type":43,"tag":58,"props":632,"children":634},{"className":633},[],[635],{"type":49,"value":574},{"type":49,"value":637}," first. Wrong parameter names cause TypeErrors that waste tool calls.",{"type":43,"tag":91,"props":639,"children":643},{"className":640,"code":641,"language":642,"meta":96,"style":96},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Look up a query method BEFORE writing the query\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query_funnel\n\n# Look up types BEFORE constructing them\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Filter          # → classmethods: .equals(), .less_than(), etc.\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Metric          # → property=, NOT math_property=\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py GroupBy          # → property, property_type only\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py MathType         # → enum values\n\n# Look up result types to know what columns .df returns\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py QueryResult\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py FlowQueryResult\n\n# Search when you're not sure of the exact name\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py search cohort   # → CohortBreakdown, CohortMetric, CohortDefinition, ...\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py search retention # → query_retention, RetentionEvent, RetentionMathType, ...\n\n# List everything\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py types            # all public types\npython3 $SKILL_DIR\u002Fscripts\u002Fhelp.py exceptions        # all exceptions\n","bash",[644],{"type":43,"tag":58,"props":645,"children":646},{"__ignoreMap":96},[647,656,682,702,709,717,742,767,792,817,824,832,852,872,879,887,917,946,954,963,989],{"type":43,"tag":102,"props":648,"children":649},{"class":104,"line":105},[650],{"type":43,"tag":102,"props":651,"children":653},{"style":652},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[654],{"type":49,"value":655},"# Look up a query method BEFORE writing the query\n",{"type":43,"tag":102,"props":657,"children":658},{"class":104,"line":114},[659,665,671,677],{"type":43,"tag":102,"props":660,"children":662},{"style":661},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[663],{"type":49,"value":664},"python3",{"type":43,"tag":102,"props":666,"children":668},{"style":667},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[669],{"type":49,"value":670}," $SKILL_DIR",{"type":43,"tag":102,"props":672,"children":674},{"style":673},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[675],{"type":49,"value":676},"\u002Fscripts\u002Fhelp.py",{"type":43,"tag":102,"props":678,"children":679},{"style":673},[680],{"type":49,"value":681}," Workspace.query\n",{"type":43,"tag":102,"props":683,"children":684},{"class":104,"line":123},[685,689,693,697],{"type":43,"tag":102,"props":686,"children":687},{"style":661},[688],{"type":49,"value":664},{"type":43,"tag":102,"props":690,"children":691},{"style":667},[692],{"type":49,"value":670},{"type":43,"tag":102,"props":694,"children":695},{"style":673},[696],{"type":49,"value":676},{"type":43,"tag":102,"props":698,"children":699},{"style":673},[700],{"type":49,"value":701}," Workspace.query_funnel\n",{"type":43,"tag":102,"props":703,"children":704},{"class":104,"line":132},[705],{"type":43,"tag":102,"props":706,"children":707},{"emptyLinePlaceholder":444},[708],{"type":49,"value":447},{"type":43,"tag":102,"props":710,"children":711},{"class":104,"line":450},[712],{"type":43,"tag":102,"props":713,"children":714},{"style":652},[715],{"type":49,"value":716},"# Look up types BEFORE constructing them\n",{"type":43,"tag":102,"props":718,"children":719},{"class":104,"line":459},[720,724,728,732,737],{"type":43,"tag":102,"props":721,"children":722},{"style":661},[723],{"type":49,"value":664},{"type":43,"tag":102,"props":725,"children":726},{"style":667},[727],{"type":49,"value":670},{"type":43,"tag":102,"props":729,"children":730},{"style":673},[731],{"type":49,"value":676},{"type":43,"tag":102,"props":733,"children":734},{"style":673},[735],{"type":49,"value":736}," Filter",{"type":43,"tag":102,"props":738,"children":739},{"style":652},[740],{"type":49,"value":741},"          # → classmethods: .equals(), .less_than(), etc.\n",{"type":43,"tag":102,"props":743,"children":744},{"class":104,"line":468},[745,749,753,757,762],{"type":43,"tag":102,"props":746,"children":747},{"style":661},[748],{"type":49,"value":664},{"type":43,"tag":102,"props":750,"children":751},{"style":667},[752],{"type":49,"value":670},{"type":43,"tag":102,"props":754,"children":755},{"style":673},[756],{"type":49,"value":676},{"type":43,"tag":102,"props":758,"children":759},{"style":673},[760],{"type":49,"value":761}," Metric",{"type":43,"tag":102,"props":763,"children":764},{"style":652},[765],{"type":49,"value":766},"          # → property=, NOT math_property=\n",{"type":43,"tag":102,"props":768,"children":769},{"class":104,"line":477},[770,774,778,782,787],{"type":43,"tag":102,"props":771,"children":772},{"style":661},[773],{"type":49,"value":664},{"type":43,"tag":102,"props":775,"children":776},{"style":667},[777],{"type":49,"value":670},{"type":43,"tag":102,"props":779,"children":780},{"style":673},[781],{"type":49,"value":676},{"type":43,"tag":102,"props":783,"children":784},{"style":673},[785],{"type":49,"value":786}," GroupBy",{"type":43,"tag":102,"props":788,"children":789},{"style":652},[790],{"type":49,"value":791},"          # → property, property_type only\n",{"type":43,"tag":102,"props":793,"children":794},{"class":104,"line":486},[795,799,803,807,812],{"type":43,"tag":102,"props":796,"children":797},{"style":661},[798],{"type":49,"value":664},{"type":43,"tag":102,"props":800,"children":801},{"style":667},[802],{"type":49,"value":670},{"type":43,"tag":102,"props":804,"children":805},{"style":673},[806],{"type":49,"value":676},{"type":43,"tag":102,"props":808,"children":809},{"style":673},[810],{"type":49,"value":811}," MathType",{"type":43,"tag":102,"props":813,"children":814},{"style":652},[815],{"type":49,"value":816},"         # → enum values\n",{"type":43,"tag":102,"props":818,"children":819},{"class":104,"line":495},[820],{"type":43,"tag":102,"props":821,"children":822},{"emptyLinePlaceholder":444},[823],{"type":49,"value":447},{"type":43,"tag":102,"props":825,"children":826},{"class":104,"line":503},[827],{"type":43,"tag":102,"props":828,"children":829},{"style":652},[830],{"type":49,"value":831},"# Look up result types to know what columns .df returns\n",{"type":43,"tag":102,"props":833,"children":834},{"class":104,"line":512},[835,839,843,847],{"type":43,"tag":102,"props":836,"children":837},{"style":661},[838],{"type":49,"value":664},{"type":43,"tag":102,"props":840,"children":841},{"style":667},[842],{"type":49,"value":670},{"type":43,"tag":102,"props":844,"children":845},{"style":673},[846],{"type":49,"value":676},{"type":43,"tag":102,"props":848,"children":849},{"style":673},[850],{"type":49,"value":851}," QueryResult\n",{"type":43,"tag":102,"props":853,"children":854},{"class":104,"line":521},[855,859,863,867],{"type":43,"tag":102,"props":856,"children":857},{"style":661},[858],{"type":49,"value":664},{"type":43,"tag":102,"props":860,"children":861},{"style":667},[862],{"type":49,"value":670},{"type":43,"tag":102,"props":864,"children":865},{"style":673},[866],{"type":49,"value":676},{"type":43,"tag":102,"props":868,"children":869},{"style":673},[870],{"type":49,"value":871}," FlowQueryResult\n",{"type":43,"tag":102,"props":873,"children":874},{"class":104,"line":530},[875],{"type":43,"tag":102,"props":876,"children":877},{"emptyLinePlaceholder":444},[878],{"type":49,"value":447},{"type":43,"tag":102,"props":880,"children":881},{"class":104,"line":538},[882],{"type":43,"tag":102,"props":883,"children":884},{"style":652},[885],{"type":49,"value":886},"# Search when you're not sure of the exact name\n",{"type":43,"tag":102,"props":888,"children":889},{"class":104,"line":547},[890,894,898,902,907,912],{"type":43,"tag":102,"props":891,"children":892},{"style":661},[893],{"type":49,"value":664},{"type":43,"tag":102,"props":895,"children":896},{"style":667},[897],{"type":49,"value":670},{"type":43,"tag":102,"props":899,"children":900},{"style":673},[901],{"type":49,"value":676},{"type":43,"tag":102,"props":903,"children":904},{"style":673},[905],{"type":49,"value":906}," search",{"type":43,"tag":102,"props":908,"children":909},{"style":673},[910],{"type":49,"value":911}," cohort",{"type":43,"tag":102,"props":913,"children":914},{"style":652},[915],{"type":49,"value":916},"   # → CohortBreakdown, CohortMetric, CohortDefinition, ...\n",{"type":43,"tag":102,"props":918,"children":919},{"class":104,"line":556},[920,924,928,932,936,941],{"type":43,"tag":102,"props":921,"children":922},{"style":661},[923],{"type":49,"value":664},{"type":43,"tag":102,"props":925,"children":926},{"style":667},[927],{"type":49,"value":670},{"type":43,"tag":102,"props":929,"children":930},{"style":673},[931],{"type":49,"value":676},{"type":43,"tag":102,"props":933,"children":934},{"style":673},[935],{"type":49,"value":906},{"type":43,"tag":102,"props":937,"children":938},{"style":673},[939],{"type":49,"value":940}," retention",{"type":43,"tag":102,"props":942,"children":943},{"style":652},[944],{"type":49,"value":945}," # → query_retention, RetentionEvent, RetentionMathType, ...\n",{"type":43,"tag":102,"props":947,"children":949},{"class":104,"line":948},18,[950],{"type":43,"tag":102,"props":951,"children":952},{"emptyLinePlaceholder":444},[953],{"type":49,"value":447},{"type":43,"tag":102,"props":955,"children":957},{"class":104,"line":956},19,[958],{"type":43,"tag":102,"props":959,"children":960},{"style":652},[961],{"type":49,"value":962},"# List everything\n",{"type":43,"tag":102,"props":964,"children":966},{"class":104,"line":965},20,[967,971,975,979,984],{"type":43,"tag":102,"props":968,"children":969},{"style":661},[970],{"type":49,"value":664},{"type":43,"tag":102,"props":972,"children":973},{"style":667},[974],{"type":49,"value":670},{"type":43,"tag":102,"props":976,"children":977},{"style":673},[978],{"type":49,"value":676},{"type":43,"tag":102,"props":980,"children":981},{"style":673},[982],{"type":49,"value":983}," types",{"type":43,"tag":102,"props":985,"children":986},{"style":652},[987],{"type":49,"value":988},"            # all public types\n",{"type":43,"tag":102,"props":990,"children":992},{"class":104,"line":991},21,[993,997,1001,1005,1010],{"type":43,"tag":102,"props":994,"children":995},{"style":661},[996],{"type":49,"value":664},{"type":43,"tag":102,"props":998,"children":999},{"style":667},[1000],{"type":49,"value":670},{"type":43,"tag":102,"props":1002,"children":1003},{"style":673},[1004],{"type":49,"value":676},{"type":43,"tag":102,"props":1006,"children":1007},{"style":673},[1008],{"type":49,"value":1009}," exceptions",{"type":43,"tag":102,"props":1011,"children":1012},{"style":652},[1013],{"type":49,"value":1014},"        # all exceptions\n",{"type":43,"tag":52,"props":1016,"children":1017},{},[1018,1020],{"type":49,"value":1019},"For tutorials and guides: ",{"type":43,"tag":58,"props":1021,"children":1023},{"className":1022},[],[1024],{"type":49,"value":1025},"WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fllms.txt\")",{"type":43,"tag":404,"props":1027,"children":1029},{"id":1028},"discovery-method-signatures",[1030],{"type":49,"value":1031},"Discovery method signatures",{"type":43,"tag":91,"props":1033,"children":1035},{"className":93,"code":1034,"language":95,"meta":96,"style":96},"def events(self) -> list[str]: ...\n    # List all event names (cached).\n\ndef properties(self, event: str) -> list[str]: ...\n    # List all property names for an event (cached).\n\ndef property_values(self, property_name: str, *, event: str | None = None, limit: int = 100) -> list[str]: ...\n    # Get sample values for a property.\n\ndef top_events(self, *, type: Literal['general', 'average', 'unique'] = 'general', limit: int | None = None) -> list[TopEvent]: ...\n    # Get today's most active events. TopEvent has .event (str), .count (int), .percent_change (float).\n\ndef funnels(self) -> list[FunnelInfo]: ...\n    # List saved funnels.\n\ndef cohorts(self) -> list[SavedCohort]: ...\n    # List saved cohorts.\n\ndef list_bookmarks(self, bookmark_type: BookmarkType | None = None) -> list[BookmarkInfo]: ...\n    # List all saved reports (bookmarks).\n\ndef lexicon_schemas(self, *, entity_type: EntityType | None = None) -> list[LexiconSchema]: ...\n    # List Lexicon schemas (event\u002Fproperty definitions).\n\ndef clear_discovery_cache(self) -> None: ...\n    # Clear cached discovery results.\n# User Guide: WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fguide\u002Fdiscovery\u002Findex.md\")\n",[1036],{"type":43,"tag":58,"props":1037,"children":1038},{"__ignoreMap":96},[1039,1047,1055,1062,1070,1078,1085,1093,1101,1108,1116,1124,1131,1139,1147,1154,1162,1170,1177,1185,1193,1200,1209,1218,1226,1235,1244],{"type":43,"tag":102,"props":1040,"children":1041},{"class":104,"line":105},[1042],{"type":43,"tag":102,"props":1043,"children":1044},{},[1045],{"type":49,"value":1046},"def events(self) -> list[str]: ...\n",{"type":43,"tag":102,"props":1048,"children":1049},{"class":104,"line":114},[1050],{"type":43,"tag":102,"props":1051,"children":1052},{},[1053],{"type":49,"value":1054},"    # List all event names (cached).\n",{"type":43,"tag":102,"props":1056,"children":1057},{"class":104,"line":123},[1058],{"type":43,"tag":102,"props":1059,"children":1060},{"emptyLinePlaceholder":444},[1061],{"type":49,"value":447},{"type":43,"tag":102,"props":1063,"children":1064},{"class":104,"line":132},[1065],{"type":43,"tag":102,"props":1066,"children":1067},{},[1068],{"type":49,"value":1069},"def properties(self, event: str) -> list[str]: ...\n",{"type":43,"tag":102,"props":1071,"children":1072},{"class":104,"line":450},[1073],{"type":43,"tag":102,"props":1074,"children":1075},{},[1076],{"type":49,"value":1077},"    # List all property names for an event (cached).\n",{"type":43,"tag":102,"props":1079,"children":1080},{"class":104,"line":459},[1081],{"type":43,"tag":102,"props":1082,"children":1083},{"emptyLinePlaceholder":444},[1084],{"type":49,"value":447},{"type":43,"tag":102,"props":1086,"children":1087},{"class":104,"line":468},[1088],{"type":43,"tag":102,"props":1089,"children":1090},{},[1091],{"type":49,"value":1092},"def property_values(self, property_name: str, *, event: str | None = None, limit: int = 100) -> list[str]: ...\n",{"type":43,"tag":102,"props":1094,"children":1095},{"class":104,"line":477},[1096],{"type":43,"tag":102,"props":1097,"children":1098},{},[1099],{"type":49,"value":1100},"    # Get sample values for a property.\n",{"type":43,"tag":102,"props":1102,"children":1103},{"class":104,"line":486},[1104],{"type":43,"tag":102,"props":1105,"children":1106},{"emptyLinePlaceholder":444},[1107],{"type":49,"value":447},{"type":43,"tag":102,"props":1109,"children":1110},{"class":104,"line":495},[1111],{"type":43,"tag":102,"props":1112,"children":1113},{},[1114],{"type":49,"value":1115},"def top_events(self, *, type: Literal['general', 'average', 'unique'] = 'general', limit: int | None = None) -> list[TopEvent]: ...\n",{"type":43,"tag":102,"props":1117,"children":1118},{"class":104,"line":503},[1119],{"type":43,"tag":102,"props":1120,"children":1121},{},[1122],{"type":49,"value":1123},"    # Get today's most active events. TopEvent has .event (str), .count (int), .percent_change (float).\n",{"type":43,"tag":102,"props":1125,"children":1126},{"class":104,"line":512},[1127],{"type":43,"tag":102,"props":1128,"children":1129},{"emptyLinePlaceholder":444},[1130],{"type":49,"value":447},{"type":43,"tag":102,"props":1132,"children":1133},{"class":104,"line":521},[1134],{"type":43,"tag":102,"props":1135,"children":1136},{},[1137],{"type":49,"value":1138},"def funnels(self) -> list[FunnelInfo]: ...\n",{"type":43,"tag":102,"props":1140,"children":1141},{"class":104,"line":530},[1142],{"type":43,"tag":102,"props":1143,"children":1144},{},[1145],{"type":49,"value":1146},"    # List saved funnels.\n",{"type":43,"tag":102,"props":1148,"children":1149},{"class":104,"line":538},[1150],{"type":43,"tag":102,"props":1151,"children":1152},{"emptyLinePlaceholder":444},[1153],{"type":49,"value":447},{"type":43,"tag":102,"props":1155,"children":1156},{"class":104,"line":547},[1157],{"type":43,"tag":102,"props":1158,"children":1159},{},[1160],{"type":49,"value":1161},"def cohorts(self) -> list[SavedCohort]: ...\n",{"type":43,"tag":102,"props":1163,"children":1164},{"class":104,"line":556},[1165],{"type":43,"tag":102,"props":1166,"children":1167},{},[1168],{"type":49,"value":1169},"    # List saved cohorts.\n",{"type":43,"tag":102,"props":1171,"children":1172},{"class":104,"line":948},[1173],{"type":43,"tag":102,"props":1174,"children":1175},{"emptyLinePlaceholder":444},[1176],{"type":49,"value":447},{"type":43,"tag":102,"props":1178,"children":1179},{"class":104,"line":956},[1180],{"type":43,"tag":102,"props":1181,"children":1182},{},[1183],{"type":49,"value":1184},"def list_bookmarks(self, bookmark_type: BookmarkType | None = None) -> list[BookmarkInfo]: ...\n",{"type":43,"tag":102,"props":1186,"children":1187},{"class":104,"line":965},[1188],{"type":43,"tag":102,"props":1189,"children":1190},{},[1191],{"type":49,"value":1192},"    # List all saved reports (bookmarks).\n",{"type":43,"tag":102,"props":1194,"children":1195},{"class":104,"line":991},[1196],{"type":43,"tag":102,"props":1197,"children":1198},{"emptyLinePlaceholder":444},[1199],{"type":49,"value":447},{"type":43,"tag":102,"props":1201,"children":1203},{"class":104,"line":1202},22,[1204],{"type":43,"tag":102,"props":1205,"children":1206},{},[1207],{"type":49,"value":1208},"def lexicon_schemas(self, *, entity_type: EntityType | None = None) -> list[LexiconSchema]: ...\n",{"type":43,"tag":102,"props":1210,"children":1212},{"class":104,"line":1211},23,[1213],{"type":43,"tag":102,"props":1214,"children":1215},{},[1216],{"type":49,"value":1217},"    # List Lexicon schemas (event\u002Fproperty definitions).\n",{"type":43,"tag":102,"props":1219,"children":1221},{"class":104,"line":1220},24,[1222],{"type":43,"tag":102,"props":1223,"children":1224},{"emptyLinePlaceholder":444},[1225],{"type":49,"value":447},{"type":43,"tag":102,"props":1227,"children":1229},{"class":104,"line":1228},25,[1230],{"type":43,"tag":102,"props":1231,"children":1232},{},[1233],{"type":49,"value":1234},"def clear_discovery_cache(self) -> None: ...\n",{"type":43,"tag":102,"props":1236,"children":1238},{"class":104,"line":1237},26,[1239],{"type":43,"tag":102,"props":1240,"children":1241},{},[1242],{"type":49,"value":1243},"    # Clear cached discovery results.\n",{"type":43,"tag":102,"props":1245,"children":1247},{"class":104,"line":1246},27,[1248],{"type":43,"tag":102,"props":1249,"children":1250},{},[1251],{"type":49,"value":1252},"# User Guide: WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fguide\u002Fdiscovery\u002Findex.md\")\n",{"type":43,"tag":140,"props":1254,"children":1256},{"id":1255},"exploratory-analysis-workflow",[1257],{"type":49,"value":1258},"Exploratory Analysis Workflow",{"type":43,"tag":52,"props":1260,"children":1261},{},[1262],{"type":49,"value":1263},"When exploring an unfamiliar dataset or asked to \"find insights,\" follow this systematic approach. Do NOT skip to querying — explore first.",{"type":43,"tag":404,"props":1265,"children":1267},{"id":1266},"step-1-orient-map-the-event-schema",[1268],{"type":49,"value":1269},"Step 1: Orient — Map the Event Schema",{"type":43,"tag":91,"props":1271,"children":1273},{"className":93,"code":1272,"language":95,"meta":96,"style":96},"import mixpanel_headless as mp\nws = mp.Workspace()\n\nevents = ws.events()\ntop = ws.top_events(limit=15)\nprint(\"Events:\", events)\nprint(\"Top events:\", [(e.event, e.count) for e in top])\n\n# Profile the top 3-5 events by volume\nfor event in [e.event for e in top[:5]]:\n    props = ws.properties(event)\n    print(f\"\\n{event} ({len(props)} properties):\")\n    for p in props[:15]:\n        vals = ws.property_values(p, event=event, limit=10)\n        print(f\"  {p}: {vals}\")\n",[1274],{"type":43,"tag":58,"props":1275,"children":1276},{"__ignoreMap":96},[1277,1284,1291,1298,1305,1313,1321,1329,1336,1344,1352,1360,1368,1376,1384],{"type":43,"tag":102,"props":1278,"children":1279},{"class":104,"line":105},[1280],{"type":43,"tag":102,"props":1281,"children":1282},{},[1283],{"type":49,"value":111},{"type":43,"tag":102,"props":1285,"children":1286},{"class":104,"line":114},[1287],{"type":43,"tag":102,"props":1288,"children":1289},{},[1290],{"type":49,"value":120},{"type":43,"tag":102,"props":1292,"children":1293},{"class":104,"line":123},[1294],{"type":43,"tag":102,"props":1295,"children":1296},{"emptyLinePlaceholder":444},[1297],{"type":49,"value":447},{"type":43,"tag":102,"props":1299,"children":1300},{"class":104,"line":132},[1301],{"type":43,"tag":102,"props":1302,"children":1303},{},[1304],{"type":49,"value":465},{"type":43,"tag":102,"props":1306,"children":1307},{"class":104,"line":450},[1308],{"type":43,"tag":102,"props":1309,"children":1310},{},[1311],{"type":49,"value":1312},"top = ws.top_events(limit=15)\n",{"type":43,"tag":102,"props":1314,"children":1315},{"class":104,"line":459},[1316],{"type":43,"tag":102,"props":1317,"children":1318},{},[1319],{"type":49,"value":1320},"print(\"Events:\", events)\n",{"type":43,"tag":102,"props":1322,"children":1323},{"class":104,"line":468},[1324],{"type":43,"tag":102,"props":1325,"children":1326},{},[1327],{"type":49,"value":1328},"print(\"Top events:\", [(e.event, e.count) for e in top])\n",{"type":43,"tag":102,"props":1330,"children":1331},{"class":104,"line":477},[1332],{"type":43,"tag":102,"props":1333,"children":1334},{"emptyLinePlaceholder":444},[1335],{"type":49,"value":447},{"type":43,"tag":102,"props":1337,"children":1338},{"class":104,"line":486},[1339],{"type":43,"tag":102,"props":1340,"children":1341},{},[1342],{"type":49,"value":1343},"# Profile the top 3-5 events by volume\n",{"type":43,"tag":102,"props":1345,"children":1346},{"class":104,"line":495},[1347],{"type":43,"tag":102,"props":1348,"children":1349},{},[1350],{"type":49,"value":1351},"for event in [e.event for e in top[:5]]:\n",{"type":43,"tag":102,"props":1353,"children":1354},{"class":104,"line":503},[1355],{"type":43,"tag":102,"props":1356,"children":1357},{},[1358],{"type":49,"value":1359},"    props = ws.properties(event)\n",{"type":43,"tag":102,"props":1361,"children":1362},{"class":104,"line":512},[1363],{"type":43,"tag":102,"props":1364,"children":1365},{},[1366],{"type":49,"value":1367},"    print(f\"\\n{event} ({len(props)} properties):\")\n",{"type":43,"tag":102,"props":1369,"children":1370},{"class":104,"line":521},[1371],{"type":43,"tag":102,"props":1372,"children":1373},{},[1374],{"type":49,"value":1375},"    for p in props[:15]:\n",{"type":43,"tag":102,"props":1377,"children":1378},{"class":104,"line":530},[1379],{"type":43,"tag":102,"props":1380,"children":1381},{},[1382],{"type":49,"value":1383},"        vals = ws.property_values(p, event=event, limit=10)\n",{"type":43,"tag":102,"props":1385,"children":1386},{"class":104,"line":538},[1387],{"type":43,"tag":102,"props":1388,"children":1389},{},[1390],{"type":49,"value":1391},"        print(f\"  {p}: {vals}\")\n",{"type":43,"tag":404,"props":1393,"children":1395},{"id":1394},"step-2-classify-properties",[1396],{"type":49,"value":1397},"Step 2: Classify Properties",{"type":43,"tag":52,"props":1399,"children":1400},{},[1401],{"type":49,"value":1402},"Infer property types from sampled values to decide how to use each:",{"type":43,"tag":1404,"props":1405,"children":1406},"ul",{},[1407,1434,1472,1524,1541],{"type":43,"tag":1408,"props":1409,"children":1410},"li",{},[1411,1416,1418,1424,1426,1432],{"type":43,"tag":357,"props":1412,"children":1413},{},[1414],{"type":49,"value":1415},"Boolean",{"type":49,"value":1417},": values are ",{"type":43,"tag":58,"props":1419,"children":1421},{"className":1420},[],[1422],{"type":49,"value":1423},"['true', 'false']",{"type":49,"value":1425}," — segment with ",{"type":43,"tag":58,"props":1427,"children":1429},{"className":1428},[],[1430],{"type":49,"value":1431},"group_by",{"type":49,"value":1433},", often pre-computed behavioral flags",{"type":43,"tag":1408,"props":1435,"children":1436},{},[1437,1442,1444,1450,1452,1458,1459,1465,1467],{"type":43,"tag":357,"props":1438,"children":1439},{},[1440],{"type":49,"value":1441},"Low-cardinality categorical",{"type":49,"value":1443}," (\u003C10 values): ",{"type":43,"tag":58,"props":1445,"children":1447},{"className":1446},[],[1448],{"type":49,"value":1449},"platform",{"type":49,"value":1451},", ",{"type":43,"tag":58,"props":1453,"children":1455},{"className":1454},[],[1456],{"type":49,"value":1457},"tier",{"type":49,"value":1451},{"type":43,"tag":58,"props":1460,"children":1462},{"className":1461},[],[1463],{"type":49,"value":1464},"category",{"type":49,"value":1466}," — use for ",{"type":43,"tag":58,"props":1468,"children":1470},{"className":1469},[],[1471],{"type":49,"value":1431},{"type":43,"tag":1408,"props":1473,"children":1474},{},[1475,1480,1482,1488,1489,1495,1496,1502,1503,1509,1510,1516,1518],{"type":43,"tag":357,"props":1476,"children":1477},{},[1478],{"type":49,"value":1479},"Numeric",{"type":49,"value":1481},": values parse as int\u002Ffloat: ",{"type":43,"tag":58,"props":1483,"children":1485},{"className":1484},[],[1486],{"type":49,"value":1487},"price",{"type":49,"value":1451},{"type":43,"tag":58,"props":1490,"children":1492},{"className":1491},[],[1493],{"type":49,"value":1494},"total",{"type":49,"value":1451},{"type":43,"tag":58,"props":1497,"children":1499},{"className":1498},[],[1500],{"type":49,"value":1501},"count",{"type":49,"value":1466},{"type":43,"tag":58,"props":1504,"children":1506},{"className":1505},[],[1507],{"type":49,"value":1508},"math='average'",{"type":49,"value":614},{"type":43,"tag":58,"props":1511,"children":1513},{"className":1512},[],[1514],{"type":49,"value":1515},"math='sum'",{"type":49,"value":1517}," with ",{"type":43,"tag":58,"props":1519,"children":1521},{"className":1520},[],[1522],{"type":49,"value":1523},"math_property=",{"type":43,"tag":1408,"props":1525,"children":1526},{},[1527,1532,1534,1539],{"type":43,"tag":357,"props":1528,"children":1529},{},[1530],{"type":49,"value":1531},"High-cardinality",{"type":49,"value":1533}," (>100 values): IDs, names — skip for ",{"type":43,"tag":58,"props":1535,"children":1537},{"className":1536},[],[1538],{"type":49,"value":1431},{"type":49,"value":1540},", may need custom property cleanup",{"type":43,"tag":1408,"props":1542,"children":1543},{},[1544,1549],{"type":43,"tag":357,"props":1545,"children":1546},{},[1547],{"type":49,"value":1548},"Temporal",{"type":49,"value":1550},": ISO dates or epoch values — use for time-based analysis",{"type":43,"tag":52,"props":1552,"children":1553},{},[1554],{"type":49,"value":1555},"Property naming patterns that signal analytical value:",{"type":43,"tag":1404,"props":1557,"children":1558},{},[1559,1591,1623,1655],{"type":43,"tag":1408,"props":1560,"children":1561},{},[1562,1568,1569,1575,1576,1582,1583,1589],{"type":43,"tag":58,"props":1563,"children":1565},{"className":1564},[],[1566],{"type":49,"value":1567},"is_*",{"type":49,"value":1451},{"type":43,"tag":58,"props":1570,"children":1572},{"className":1571},[],[1573],{"type":49,"value":1574},"has_*",{"type":49,"value":1451},{"type":43,"tag":58,"props":1577,"children":1579},{"className":1578},[],[1580],{"type":49,"value":1581},"was_*",{"type":49,"value":1451},{"type":43,"tag":58,"props":1584,"children":1586},{"className":1585},[],[1587],{"type":49,"value":1588},"post_*",{"type":49,"value":1590}," → boolean flags, often pre-computed behavioral segments worth investigating",{"type":43,"tag":1408,"props":1592,"children":1593},{},[1594,1600,1601,1607,1608,1614,1615,1621],{"type":43,"tag":58,"props":1595,"children":1597},{"className":1596},[],[1598],{"type":49,"value":1599},"*_total",{"type":49,"value":1451},{"type":43,"tag":58,"props":1602,"children":1604},{"className":1603},[],[1605],{"type":49,"value":1606},"*_count",{"type":49,"value":1451},{"type":43,"tag":58,"props":1609,"children":1611},{"className":1610},[],[1612],{"type":49,"value":1613},"*_value",{"type":49,"value":1451},{"type":43,"tag":58,"props":1616,"children":1618},{"className":1617},[],[1619],{"type":49,"value":1620},"*_amount",{"type":49,"value":1622}," → numeric, aggregate with avg\u002Fsum\u002Fmedian",{"type":43,"tag":1408,"props":1624,"children":1625},{},[1626,1632,1633,1639,1640,1646,1647,1653],{"type":43,"tag":58,"props":1627,"children":1629},{"className":1628},[],[1630],{"type":49,"value":1631},"*_name",{"type":49,"value":1451},{"type":43,"tag":58,"props":1634,"children":1636},{"className":1635},[],[1637],{"type":49,"value":1638},"*_type",{"type":49,"value":1451},{"type":43,"tag":58,"props":1641,"children":1643},{"className":1642},[],[1644],{"type":49,"value":1645},"*_category",{"type":49,"value":1451},{"type":43,"tag":58,"props":1648,"children":1650},{"className":1649},[],[1651],{"type":49,"value":1652},"*_tier",{"type":49,"value":1654}," → categorical, use for breakdowns",{"type":43,"tag":1408,"props":1656,"children":1657},{},[1658,1664,1665,1671],{"type":43,"tag":58,"props":1659,"children":1661},{"className":1660},[],[1662],{"type":49,"value":1663},"*_id",{"type":49,"value":1451},{"type":43,"tag":58,"props":1666,"children":1668},{"className":1667},[],[1669],{"type":49,"value":1670},"*_uuid",{"type":49,"value":1672}," → identifiers, skip for breakdowns",{"type":43,"tag":404,"props":1674,"children":1676},{"id":1675},"step-3-scan-for-significant-segments",[1677],{"type":49,"value":1678},"Step 3: Scan for Significant Segments",{"type":43,"tag":52,"props":1680,"children":1681},{},[1682],{"type":49,"value":1683},"For each boolean and low-cardinality categorical property on key events, run a quick breakdown against a numeric metric:",{"type":43,"tag":91,"props":1685,"children":1687},{"className":93,"code":1686,"language":95,"meta":96,"style":96},"# Example: scan all interesting properties on a purchase event\nnumeric_prop = 'order_total'  # or whatever the key metric is\ninteresting_props = [p for p in props if not p.endswith('_id')]\n\nfor prop in interesting_props:\n    vals = ws.property_values(prop, event=event, limit=10)\n    if len(set(vals)) \u003C= 10:  # low cardinality — worth a breakdown\n        result = ws.query(event, math='average', math_property=numeric_prop,\n                           group_by=prop, last=90, mode='total')\n        print(f\"\\n{numeric_prop} by {prop}:\")\n        print(result.df.to_string(index=False))\n        # Flag segments where metric differs >15% from overall\n",[1688],{"type":43,"tag":58,"props":1689,"children":1690},{"__ignoreMap":96},[1691,1699,1707,1715,1722,1730,1738,1746,1754,1762,1770,1778],{"type":43,"tag":102,"props":1692,"children":1693},{"class":104,"line":105},[1694],{"type":43,"tag":102,"props":1695,"children":1696},{},[1697],{"type":49,"value":1698},"# Example: scan all interesting properties on a purchase event\n",{"type":43,"tag":102,"props":1700,"children":1701},{"class":104,"line":114},[1702],{"type":43,"tag":102,"props":1703,"children":1704},{},[1705],{"type":49,"value":1706},"numeric_prop = 'order_total'  # or whatever the key metric is\n",{"type":43,"tag":102,"props":1708,"children":1709},{"class":104,"line":123},[1710],{"type":43,"tag":102,"props":1711,"children":1712},{},[1713],{"type":49,"value":1714},"interesting_props = [p for p in props if not p.endswith('_id')]\n",{"type":43,"tag":102,"props":1716,"children":1717},{"class":104,"line":132},[1718],{"type":43,"tag":102,"props":1719,"children":1720},{"emptyLinePlaceholder":444},[1721],{"type":49,"value":447},{"type":43,"tag":102,"props":1723,"children":1724},{"class":104,"line":450},[1725],{"type":43,"tag":102,"props":1726,"children":1727},{},[1728],{"type":49,"value":1729},"for prop in interesting_props:\n",{"type":43,"tag":102,"props":1731,"children":1732},{"class":104,"line":459},[1733],{"type":43,"tag":102,"props":1734,"children":1735},{},[1736],{"type":49,"value":1737},"    vals = ws.property_values(prop, event=event, limit=10)\n",{"type":43,"tag":102,"props":1739,"children":1740},{"class":104,"line":468},[1741],{"type":43,"tag":102,"props":1742,"children":1743},{},[1744],{"type":49,"value":1745},"    if len(set(vals)) \u003C= 10:  # low cardinality — worth a breakdown\n",{"type":43,"tag":102,"props":1747,"children":1748},{"class":104,"line":477},[1749],{"type":43,"tag":102,"props":1750,"children":1751},{},[1752],{"type":49,"value":1753},"        result = ws.query(event, math='average', math_property=numeric_prop,\n",{"type":43,"tag":102,"props":1755,"children":1756},{"class":104,"line":486},[1757],{"type":43,"tag":102,"props":1758,"children":1759},{},[1760],{"type":49,"value":1761},"                           group_by=prop, last=90, mode='total')\n",{"type":43,"tag":102,"props":1763,"children":1764},{"class":104,"line":495},[1765],{"type":43,"tag":102,"props":1766,"children":1767},{},[1768],{"type":49,"value":1769},"        print(f\"\\n{numeric_prop} by {prop}:\")\n",{"type":43,"tag":102,"props":1771,"children":1772},{"class":104,"line":503},[1773],{"type":43,"tag":102,"props":1774,"children":1775},{},[1776],{"type":49,"value":1777},"        print(result.df.to_string(index=False))\n",{"type":43,"tag":102,"props":1779,"children":1780},{"class":104,"line":512},[1781],{"type":43,"tag":102,"props":1782,"children":1783},{},[1784],{"type":49,"value":1785},"        # Flag segments where metric differs >15% from overall\n",{"type":43,"tag":404,"props":1787,"children":1789},{"id":1788},"step-4-deep-dive-on-significant-findings",[1790],{"type":49,"value":1791},"Step 4: Deep Dive on Significant Findings",{"type":43,"tag":52,"props":1793,"children":1794},{},[1795],{"type":49,"value":1796},"When a breakdown reveals a notable difference (>15% between segments):",{"type":43,"tag":1798,"props":1799,"children":1800},"ol",{},[1801,1811,1821,1831],{"type":43,"tag":1408,"props":1802,"children":1803},{},[1804,1809],{"type":43,"tag":357,"props":1805,"children":1806},{},[1807],{"type":49,"value":1808},"Quantify",{"type":49,"value":1810},": calculate the exact ratio between segments",{"type":43,"tag":1408,"props":1812,"children":1813},{},[1814,1819],{"type":43,"tag":357,"props":1815,"children":1816},{},[1817],{"type":49,"value":1818},"Cross-reference",{"type":49,"value":1820},": does this segment differ on other metrics too?",{"type":43,"tag":1408,"props":1822,"children":1823},{},[1824,1829],{"type":43,"tag":357,"props":1825,"children":1826},{},[1827],{"type":49,"value":1828},"Investigate causally",{"type":49,"value":1830},": run funnels or retention filtered by the segment",{"type":43,"tag":1408,"props":1832,"children":1833},{},[1834,1839,1841,1846],{"type":43,"tag":357,"props":1835,"children":1836},{},[1837],{"type":49,"value":1838},"Control for confounds",{"type":49,"value":1840},": add a second ",{"type":43,"tag":58,"props":1842,"children":1844},{"className":1843},[],[1845],{"type":49,"value":1431},{"type":49,"value":1847}," dimension to check if the effect holds",{"type":43,"tag":404,"props":1849,"children":1851},{"id":1850},"step-5-analyze-messy-string-properties",[1852],{"type":49,"value":1853},"Step 5: Analyze Messy String Properties",{"type":43,"tag":52,"props":1855,"children":1856},{},[1857],{"type":49,"value":1858},"When string properties have complex\u002Funreadable values (e.g., campaign names from tools like Braze):",{"type":43,"tag":1798,"props":1860,"children":1861},{},[1862,1867,1872,1877,1888],{"type":43,"tag":1408,"props":1863,"children":1864},{},[1865],{"type":49,"value":1866},"Sample 15-20 values to identify the naming convention",{"type":43,"tag":1408,"props":1868,"children":1869},{},[1870],{"type":49,"value":1871},"Look for structural patterns: date codes, targeting prefixes, channel suffixes, audience tags",{"type":43,"tag":1408,"props":1873,"children":1874},{},[1875],{"type":49,"value":1876},"Design regex cleanup rules, one layer per structural element",{"type":43,"tag":1408,"props":1878,"children":1879},{},[1880,1882],{"type":49,"value":1881},"Create a custom property with ",{"type":43,"tag":58,"props":1883,"children":1885},{"className":1884},[],[1886],{"type":49,"value":1887},"ws.create_custom_property(CreateCustomPropertyParams(...))",{"type":43,"tag":1408,"props":1889,"children":1890},{},[1891,1893],{"type":49,"value":1892},"Verify by querying with the custom property as ",{"type":43,"tag":58,"props":1894,"children":1896},{"className":1895},[],[1897],{"type":49,"value":1431},{"type":43,"tag":404,"props":1899,"children":1901},{"id":1900},"custom-property-formula-reference",[1902],{"type":49,"value":1903},"Custom Property Formula Reference",{"type":43,"tag":52,"props":1905,"children":1906},{},[1907,1909,1915],{"type":49,"value":1908},"Formulas use a SQL-like expression language. Variables (A, B, _A, etc.) map to properties via ",{"type":43,"tag":58,"props":1910,"children":1912},{"className":1911},[],[1913],{"type":49,"value":1914},"composedProperties",{"type":49,"value":1916},".",{"type":43,"tag":52,"props":1918,"children":1919},{},[1920,1925,1927,1933],{"type":43,"tag":357,"props":1921,"children":1922},{},[1923],{"type":49,"value":1924},"Variable binding:",{"type":49,"value":1926}," ",{"type":43,"tag":58,"props":1928,"children":1930},{"className":1929},[],[1931],{"type":49,"value":1932},"LET(name, expression, body)",{"type":49,"value":1934}," — define intermediate results:",{"type":43,"tag":91,"props":1936,"children":1940},{"className":1937,"code":1939,"language":49},[1938],"language-text","LET(raw, A, REGEX_REPLACE(raw, \"pattern\", \"replacement\"))\nLET(x, A * B, IFS(x \u003C 50, \"low\", x \u003C 200, \"mid\", TRUE, \"high\"))\n",[1941],{"type":43,"tag":58,"props":1942,"children":1943},{"__ignoreMap":96},[1944],{"type":49,"value":1939},{"type":43,"tag":52,"props":1946,"children":1947},{},[1948,1953,1954,1960,1961],{"type":43,"tag":357,"props":1949,"children":1950},{},[1951],{"type":49,"value":1952},"Conditionals:",{"type":49,"value":1926},{"type":43,"tag":58,"props":1955,"children":1957},{"className":1956},[],[1958],{"type":49,"value":1959},"IF(cond, then, else)",{"type":49,"value":1451},{"type":43,"tag":58,"props":1962,"children":1964},{"className":1963},[],[1965],{"type":49,"value":1966},"IFS(cond1, val1, cond2, val2, ..., TRUE, default)",{"type":43,"tag":52,"props":1968,"children":1969},{},[1970,1975,1976,1982,1983,1989,1990,1996,1997,2003,2004,2010,2011,2017,2018,2024,2025,2031,2032,2038,2039],{"type":43,"tag":357,"props":1971,"children":1972},{},[1973],{"type":49,"value":1974},"String functions:",{"type":49,"value":1926},{"type":43,"tag":58,"props":1977,"children":1979},{"className":1978},[],[1980],{"type":49,"value":1981},"UPPER(s)",{"type":49,"value":1451},{"type":43,"tag":58,"props":1984,"children":1986},{"className":1985},[],[1987],{"type":49,"value":1988},"LOWER(s)",{"type":49,"value":1451},{"type":43,"tag":58,"props":1991,"children":1993},{"className":1992},[],[1994],{"type":49,"value":1995},"LEN(s)",{"type":49,"value":1451},{"type":43,"tag":58,"props":1998,"children":2000},{"className":1999},[],[2001],{"type":49,"value":2002},"LEFT(s, n)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2005,"children":2007},{"className":2006},[],[2008],{"type":49,"value":2009},"RIGHT(s, n)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2012,"children":2014},{"className":2013},[],[2015],{"type":49,"value":2016},"MID(s, start, count)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2019,"children":2021},{"className":2020},[],[2022],{"type":49,"value":2023},"SPLIT(s, delim, n)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2026,"children":2028},{"className":2027},[],[2029],{"type":49,"value":2030},"HAS_PREFIX(s, p)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2033,"children":2035},{"className":2034},[],[2036],{"type":49,"value":2037},"HAS_SUFFIX(s, p)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2040,"children":2042},{"className":2041},[],[2043],{"type":49,"value":2044},"PARSE_URL(s, \"domain\")",{"type":43,"tag":52,"props":2046,"children":2047},{},[2048],{"type":43,"tag":357,"props":2049,"children":2050},{},[2051],{"type":49,"value":2052},"Regex functions (PCRE2 engine):",{"type":43,"tag":1404,"props":2054,"children":2055},{},[2056,2067,2078],{"type":43,"tag":1408,"props":2057,"children":2058},{},[2059,2065],{"type":43,"tag":58,"props":2060,"children":2062},{"className":2061},[],[2063],{"type":49,"value":2064},"REGEX_MATCH(haystack, pattern)",{"type":49,"value":2066}," — returns true\u002Ffalse",{"type":43,"tag":1408,"props":2068,"children":2069},{},[2070,2076],{"type":43,"tag":58,"props":2071,"children":2073},{"className":2072},[],[2074],{"type":49,"value":2075},"REGEX_EXTRACT(haystack, pattern, capture_group)",{"type":49,"value":2077}," — returns match or capture group",{"type":43,"tag":1408,"props":2079,"children":2080},{},[2081,2087],{"type":43,"tag":58,"props":2082,"children":2084},{"className":2083},[],[2085],{"type":49,"value":2086},"REGEX_REPLACE(haystack, pattern, replacement)",{"type":49,"value":2088}," — replaces all matches",{"type":43,"tag":52,"props":2090,"children":2091},{},[2092],{"type":43,"tag":357,"props":2093,"children":2094},{},[2095],{"type":49,"value":2096},"Regex engine quirks (Mixpanel-specific):",{"type":43,"tag":1404,"props":2098,"children":2099},{},[2100,2118,2159,2191,2228],{"type":43,"tag":1408,"props":2101,"children":2102},{},[2103,2108,2110,2116],{"type":43,"tag":357,"props":2104,"children":2105},{},[2106],{"type":49,"value":2107},"Case-insensitive by default",{"type":49,"value":2109}," — use ",{"type":43,"tag":58,"props":2111,"children":2113},{"className":2112},[],[2114],{"type":49,"value":2115},"(?-i)",{"type":49,"value":2117}," to switch to case-sensitive matching within a pattern",{"type":43,"tag":1408,"props":2119,"children":2120},{},[2121,2126,2128,2134,2135,2141,2143,2149,2151,2157],{"type":43,"tag":357,"props":2122,"children":2123},{},[2124],{"type":49,"value":2125},"Backreferences work",{"type":49,"value":2127}," — ",{"type":43,"tag":58,"props":2129,"children":2131},{"className":2130},[],[2132],{"type":49,"value":2133},"$1",{"type":49,"value":1451},{"type":43,"tag":58,"props":2136,"children":2138},{"className":2137},[],[2139],{"type":49,"value":2140},"$2",{"type":49,"value":2142}," capture groups and ",{"type":43,"tag":58,"props":2144,"children":2146},{"className":2145},[],[2147],{"type":49,"value":2148},"$0",{"type":49,"value":2150}," whole-match all work in ",{"type":43,"tag":58,"props":2152,"children":2154},{"className":2153},[],[2155],{"type":49,"value":2156},"REGEX_REPLACE",{"type":49,"value":2158}," replacements",{"type":43,"tag":1408,"props":2160,"children":2161},{},[2162,2173,2175,2181,2183,2189],{"type":43,"tag":357,"props":2163,"children":2164},{},[2165,2171],{"type":43,"tag":58,"props":2166,"children":2168},{"className":2167},[],[2169],{"type":49,"value":2170},"{n,m}",{"type":49,"value":2172}," quantifiers conflict with formula syntax",{"type":49,"value":2174}," — curly braces are parsed as formula constructs. Use repeated character classes instead (e.g., ",{"type":43,"tag":58,"props":2176,"children":2178},{"className":2177},[],[2179],{"type":49,"value":2180},"[0-9][0-9][0-9][0-9]",{"type":49,"value":2182}," instead of ",{"type":43,"tag":58,"props":2184,"children":2186},{"className":2185},[],[2187],{"type":49,"value":2188},"[0-9]{4}",{"type":49,"value":2190},")",{"type":43,"tag":1408,"props":2192,"children":2193},{},[2194,2212,2213,2219,2220,2226],{"type":43,"tag":357,"props":2195,"children":2196},{},[2197,2203,2204,2210],{"type":43,"tag":58,"props":2198,"children":2200},{"className":2199},[],[2201],{"type":49,"value":2202},"\\d",{"type":49,"value":1451},{"type":43,"tag":58,"props":2205,"children":2207},{"className":2206},[],[2208],{"type":49,"value":2209},"\\w",{"type":49,"value":2211}," shorthand classes don't work",{"type":49,"value":2109},{"type":43,"tag":58,"props":2214,"children":2216},{"className":2215},[],[2217],{"type":49,"value":2218},"[0-9]",{"type":49,"value":1451},{"type":43,"tag":58,"props":2221,"children":2223},{"className":2222},[],[2224],{"type":49,"value":2225},"[A-Za-z0-9_]",{"type":49,"value":2227}," explicitly",{"type":43,"tag":1408,"props":2229,"children":2230},{},[2231,2236,2238,2244,2246,2252],{"type":43,"tag":357,"props":2232,"children":2233},{},[2234],{"type":49,"value":2235},"Escape backslashes carefully",{"type":49,"value":2237}," — in formula strings, ",{"type":43,"tag":58,"props":2239,"children":2241},{"className":2240},[],[2242],{"type":49,"value":2243},"\\\\\\\\",{"type":49,"value":2245}," may be needed for a literal ",{"type":43,"tag":58,"props":2247,"children":2249},{"className":2248},[],[2250],{"type":49,"value":2251},"\\",{"type":49,"value":2253}," depending on how the formula is constructed (Python string → JSON → regex engine)",{"type":43,"tag":52,"props":2255,"children":2256},{},[2257,2262],{"type":43,"tag":357,"props":2258,"children":2259},{},[2260],{"type":49,"value":2261},"CamelCase splitting",{"type":49,"value":2263}," — insert space between lowercase→uppercase boundaries:",{"type":43,"tag":91,"props":2265,"children":2268},{"className":2266,"code":2267,"language":49},[1938],"REGEX_REPLACE(text, \"(?-i)([a-z])([A-Z])\", \"$1 $2\")\n\u002F\u002F ChickenSundaysApril → Chicken Sundays April\n",[2269],{"type":43,"tag":58,"props":2270,"children":2271},{"__ignoreMap":96},[2272],{"type":49,"value":2267},{"type":43,"tag":52,"props":2274,"children":2275},{},[2276,2281],{"type":43,"tag":357,"props":2277,"children":2278},{},[2279],{"type":49,"value":2280},"Practical multi-step cleanup example",{"type":49,"value":2282}," (campaign names from Braze):",{"type":43,"tag":91,"props":2284,"children":2287},{"className":2285,"code":2286,"language":49},[1938],"LET(s1, REGEX_REPLACE(A, \"^[0-9][0-9][0-9][0-9][0-9]*_\", \"\"),\nLET(s2, REGEX_REPLACE(s1, \"^(NW|TARGETED|REGIONAL|NTL)_\", \"\"),\nLET(s3, REGEX_REPLACE(s2, \"_(Push|Email|NotificationCenter|ModalInAppMessage)_.*$\", \"\"),\nLET(s4, REGEX_REPLACE(s3, \"_\", \" \"),\n  REGEX_REPLACE(s4, \" +\", \" \")\n))))\n",[2288],{"type":43,"tag":58,"props":2289,"children":2290},{"__ignoreMap":96},[2291],{"type":49,"value":2286},{"type":43,"tag":52,"props":2293,"children":2294},{},[2295,2300,2301,2307,2308,2314,2315,2321,2322],{"type":43,"tag":357,"props":2296,"children":2297},{},[2298],{"type":49,"value":2299},"Type functions:",{"type":49,"value":1926},{"type":43,"tag":58,"props":2302,"children":2304},{"className":2303},[],[2305],{"type":49,"value":2306},"STRING(x)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2309,"children":2311},{"className":2310},[],[2312],{"type":49,"value":2313},"NUMBER(x)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2316,"children":2318},{"className":2317},[],[2319],{"type":49,"value":2320},"BOOLEAN(x)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2323,"children":2325},{"className":2324},[],[2326],{"type":49,"value":2327},"DEFINED(x)",{"type":43,"tag":52,"props":2329,"children":2330},{},[2331,2336,2337,2343,2344,2350,2351,2357,2358,2364,2365,2371,2372,2378,2379,2385,2386,2392,2393,2399,2400],{"type":43,"tag":357,"props":2332,"children":2333},{},[2334],{"type":49,"value":2335},"Math:",{"type":49,"value":1926},{"type":43,"tag":58,"props":2338,"children":2340},{"className":2339},[],[2341],{"type":49,"value":2342},"+",{"type":49,"value":1451},{"type":43,"tag":58,"props":2345,"children":2347},{"className":2346},[],[2348],{"type":49,"value":2349},"-",{"type":49,"value":1451},{"type":43,"tag":58,"props":2352,"children":2354},{"className":2353},[],[2355],{"type":49,"value":2356},"*",{"type":49,"value":1451},{"type":43,"tag":58,"props":2359,"children":2361},{"className":2360},[],[2362],{"type":49,"value":2363},"\u002F",{"type":49,"value":1451},{"type":43,"tag":58,"props":2366,"children":2368},{"className":2367},[],[2369],{"type":49,"value":2370},"%",{"type":49,"value":1451},{"type":43,"tag":58,"props":2373,"children":2375},{"className":2374},[],[2376],{"type":49,"value":2377},"MIN(a,b)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2380,"children":2382},{"className":2381},[],[2383],{"type":49,"value":2384},"MAX(a,b)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2387,"children":2389},{"className":2388},[],[2390],{"type":49,"value":2391},"FLOOR(n)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2394,"children":2396},{"className":2395},[],[2397],{"type":49,"value":2398},"CEIL(n)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2401,"children":2403},{"className":2402},[],[2404],{"type":49,"value":2405},"ROUND(n)",{"type":43,"tag":52,"props":2407,"children":2408},{},[2409,2414,2415,2421,2423,2429],{"type":43,"tag":357,"props":2410,"children":2411},{},[2412],{"type":49,"value":2413},"Date:",{"type":49,"value":1926},{"type":43,"tag":58,"props":2416,"children":2418},{"className":2417},[],[2419],{"type":49,"value":2420},"DATEDIF(start, end, unit)",{"type":49,"value":2422}," — units: D, M, Y, MD, YM, YD. ",{"type":43,"tag":58,"props":2424,"children":2426},{"className":2425},[],[2427],{"type":49,"value":2428},"TODAY()",{"type":49,"value":2430}," for current date.",{"type":43,"tag":52,"props":2432,"children":2433},{},[2434,2439,2440,2446,2447,2453,2454,2460,2461,2467,2468],{"type":43,"tag":357,"props":2435,"children":2436},{},[2437],{"type":49,"value":2438},"List:",{"type":49,"value":1926},{"type":43,"tag":58,"props":2441,"children":2443},{"className":2442},[],[2444],{"type":49,"value":2445},"SUM(list)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2448,"children":2450},{"className":2449},[],[2451],{"type":49,"value":2452},"ANY(x, list, expr)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2455,"children":2457},{"className":2456},[],[2458],{"type":49,"value":2459},"ALL(x, list, expr)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2462,"children":2464},{"className":2463},[],[2465],{"type":49,"value":2466},"FILTER(x, list, expr)",{"type":49,"value":1451},{"type":43,"tag":58,"props":2469,"children":2471},{"className":2470},[],[2472],{"type":49,"value":2473},"MAP(x, list, expr)",{"type":43,"tag":52,"props":2475,"children":2476},{},[2477,2482,2483,2489,2490,2496,2497,2503,2504,2510,2511,2517,2518,2524,2526,2532],{"type":43,"tag":357,"props":2478,"children":2479},{},[2480],{"type":49,"value":2481},"Comparison:",{"type":49,"value":1926},{"type":43,"tag":58,"props":2484,"children":2486},{"className":2485},[],[2487],{"type":49,"value":2488},"==",{"type":49,"value":1451},{"type":43,"tag":58,"props":2491,"children":2493},{"className":2492},[],[2494],{"type":49,"value":2495},"!=",{"type":49,"value":1451},{"type":43,"tag":58,"props":2498,"children":2500},{"className":2499},[],[2501],{"type":49,"value":2502},"\u003C",{"type":49,"value":1451},{"type":43,"tag":58,"props":2505,"children":2507},{"className":2506},[],[2508],{"type":49,"value":2509},">",{"type":49,"value":1451},{"type":43,"tag":58,"props":2512,"children":2514},{"className":2513},[],[2515],{"type":49,"value":2516},"\u003C=",{"type":49,"value":1451},{"type":43,"tag":58,"props":2519,"children":2521},{"className":2520},[],[2522],{"type":49,"value":2523},">=",{"type":49,"value":2525}," (case-insensitive for strings), ",{"type":43,"tag":58,"props":2527,"children":2529},{"className":2528},[],[2530],{"type":49,"value":2531},"IN",{"type":49,"value":2533}," for list membership",{"type":43,"tag":52,"props":2535,"children":2536},{},[2537,2542,2543,2549,2550,2556,2557],{"type":43,"tag":357,"props":2538,"children":2539},{},[2540],{"type":49,"value":2541},"Logical:",{"type":49,"value":1926},{"type":43,"tag":58,"props":2544,"children":2546},{"className":2545},[],[2547],{"type":49,"value":2548},"AND",{"type":49,"value":1451},{"type":43,"tag":58,"props":2551,"children":2553},{"className":2552},[],[2554],{"type":49,"value":2555},"OR",{"type":49,"value":1451},{"type":43,"tag":58,"props":2558,"children":2560},{"className":2559},[],[2561],{"type":49,"value":2562},"NOT(x)",{"type":43,"tag":52,"props":2564,"children":2565},{},[2566,2571,2572,2578,2579,2585,2586],{"type":43,"tag":357,"props":2567,"children":2568},{},[2569],{"type":49,"value":2570},"Constants:",{"type":49,"value":1926},{"type":43,"tag":58,"props":2573,"children":2575},{"className":2574},[],[2576],{"type":49,"value":2577},"TRUE",{"type":49,"value":1451},{"type":43,"tag":58,"props":2580,"children":2582},{"className":2581},[],[2583],{"type":49,"value":2584},"FALSE",{"type":49,"value":1451},{"type":43,"tag":58,"props":2587,"children":2589},{"className":2588},[],[2590],{"type":49,"value":2591},"UNDEFINED",{"type":43,"tag":52,"props":2593,"children":2594},{},[2595],{"type":43,"tag":357,"props":2596,"children":2597},{},[2598],{"type":49,"value":2599},"Creating a custom property via the API:",{"type":43,"tag":91,"props":2601,"children":2603},{"className":93,"code":2602,"language":95,"meta":96,"style":96},"from mixpanel_headless import CreateCustomPropertyParams, ComposedPropertyValue\n\nparams = CreateCustomPropertyParams(\n    name=\"Clean Campaign Name\",\n    resource_type=\"events\",\n    display_formula='LET(raw, A, REGEX_REPLACE(REGEX_REPLACE(raw, \"^[0-9]+_\", \"\"), \"_\", \" \"))',\n    composed_properties={\n        \"A\": ComposedPropertyValue(\n            resource_type=\"event\", type=\"string\", value=\"campaign_name\",\n            label=\"Campaign Name\", property_default_type=\"string\",\n        )\n    }\n)\nprop = ws.create_custom_property(params)\nref = CustomPropertyRef(prop.custom_property_id)\nresult = ws.query(event, group_by=GroupBy(ref), last=30, mode='total')\n",[2604],{"type":43,"tag":58,"props":2605,"children":2606},{"__ignoreMap":96},[2607,2615,2622,2630,2638,2646,2654,2662,2670,2678,2686,2694,2702,2710,2718,2726],{"type":43,"tag":102,"props":2608,"children":2609},{"class":104,"line":105},[2610],{"type":43,"tag":102,"props":2611,"children":2612},{},[2613],{"type":49,"value":2614},"from mixpanel_headless import CreateCustomPropertyParams, ComposedPropertyValue\n",{"type":43,"tag":102,"props":2616,"children":2617},{"class":104,"line":114},[2618],{"type":43,"tag":102,"props":2619,"children":2620},{"emptyLinePlaceholder":444},[2621],{"type":49,"value":447},{"type":43,"tag":102,"props":2623,"children":2624},{"class":104,"line":123},[2625],{"type":43,"tag":102,"props":2626,"children":2627},{},[2628],{"type":49,"value":2629},"params = CreateCustomPropertyParams(\n",{"type":43,"tag":102,"props":2631,"children":2632},{"class":104,"line":132},[2633],{"type":43,"tag":102,"props":2634,"children":2635},{},[2636],{"type":49,"value":2637},"    name=\"Clean Campaign Name\",\n",{"type":43,"tag":102,"props":2639,"children":2640},{"class":104,"line":450},[2641],{"type":43,"tag":102,"props":2642,"children":2643},{},[2644],{"type":49,"value":2645},"    resource_type=\"events\",\n",{"type":43,"tag":102,"props":2647,"children":2648},{"class":104,"line":459},[2649],{"type":43,"tag":102,"props":2650,"children":2651},{},[2652],{"type":49,"value":2653},"    display_formula='LET(raw, A, REGEX_REPLACE(REGEX_REPLACE(raw, \"^[0-9]+_\", \"\"), \"_\", \" \"))',\n",{"type":43,"tag":102,"props":2655,"children":2656},{"class":104,"line":468},[2657],{"type":43,"tag":102,"props":2658,"children":2659},{},[2660],{"type":49,"value":2661},"    composed_properties={\n",{"type":43,"tag":102,"props":2663,"children":2664},{"class":104,"line":477},[2665],{"type":43,"tag":102,"props":2666,"children":2667},{},[2668],{"type":49,"value":2669},"        \"A\": ComposedPropertyValue(\n",{"type":43,"tag":102,"props":2671,"children":2672},{"class":104,"line":486},[2673],{"type":43,"tag":102,"props":2674,"children":2675},{},[2676],{"type":49,"value":2677},"            resource_type=\"event\", type=\"string\", value=\"campaign_name\",\n",{"type":43,"tag":102,"props":2679,"children":2680},{"class":104,"line":495},[2681],{"type":43,"tag":102,"props":2682,"children":2683},{},[2684],{"type":49,"value":2685},"            label=\"Campaign Name\", property_default_type=\"string\",\n",{"type":43,"tag":102,"props":2687,"children":2688},{"class":104,"line":503},[2689],{"type":43,"tag":102,"props":2690,"children":2691},{},[2692],{"type":49,"value":2693},"        )\n",{"type":43,"tag":102,"props":2695,"children":2696},{"class":104,"line":512},[2697],{"type":43,"tag":102,"props":2698,"children":2699},{},[2700],{"type":49,"value":2701},"    }\n",{"type":43,"tag":102,"props":2703,"children":2704},{"class":104,"line":521},[2705],{"type":43,"tag":102,"props":2706,"children":2707},{},[2708],{"type":49,"value":2709},")\n",{"type":43,"tag":102,"props":2711,"children":2712},{"class":104,"line":530},[2713],{"type":43,"tag":102,"props":2714,"children":2715},{},[2716],{"type":49,"value":2717},"prop = ws.create_custom_property(params)\n",{"type":43,"tag":102,"props":2719,"children":2720},{"class":104,"line":538},[2721],{"type":43,"tag":102,"props":2722,"children":2723},{},[2724],{"type":49,"value":2725},"ref = CustomPropertyRef(prop.custom_property_id)\n",{"type":43,"tag":102,"props":2727,"children":2728},{"class":104,"line":547},[2729],{"type":43,"tag":102,"props":2730,"children":2731},{},[2732],{"type":49,"value":2733},"result = ws.query(event, group_by=GroupBy(ref), last=30, mode='total')\n",{"type":43,"tag":140,"props":2735,"children":2737},{"id":2736},"workspace",[2738],{"type":49,"value":2739},"Workspace",{"type":43,"tag":91,"props":2741,"children":2743},{"className":93,"code":2742,"language":95,"meta":96,"style":96},"class Workspace:\n    \"\"\"Unified entry point for Mixpanel data operations (042 redesign).\"\"\"\n\n    def __init__(\n        self,\n        *,\n        account: str | None = None,\n        project: str | None = None,\n        workspace: int | None = None,\n        target: str | None = None,\n        session: Session | None = None,\n    ) -> None:\n        \"\"\"Create a new Workspace. Resolution per axis is independent\n        (env > param > target > bridge > config); see\n        ``mixpanel_headless.auth_types`` and the resolver.\n\n        With ``session=`` supplied, all other axis kwargs are ignored\n        (full bypass).\n        \"\"\"\n        ...\n\n    # --- Properties (read-only) ---\n    account: Account            # Resolved Account (discriminated union)\n    project: Project            # Resolved Project\n    workspace: WorkspaceRef | None  # Resolved workspace, or None for lazy-resolve\n    session: Session            # The (account, project, workspace) tuple\n    api: MixpanelAPIClient      # Direct API client access (escape hatch)\n\n    def use(\n        self,\n        *,\n        account: str | None = None,\n        project: str | None = None,\n        workspace: int | None = None,\n        target: str | None = None,\n        persist: bool = False,\n    ) -> Self:\n        \"\"\"Switch any axis in-session. Returns self for chaining.\n        Preserves the underlying httpx.Client. With persist=True, also\n        writes to ~\u002F.mp\u002Fconfig.toml [active]. ``target=`` is mutex\n        with the per-axis kwargs.\n        \"\"\"\n        ...\n",[2744],{"type":43,"tag":58,"props":2745,"children":2746},{"__ignoreMap":96},[2747,2755,2763,2770,2778,2786,2794,2802,2810,2818,2826,2834,2842,2850,2858,2866,2873,2881,2889,2897,2905,2912,2920,2928,2936,2944,2952,2960,2968,2977,2985,2993,3001,3009,3017,3025,3034,3043,3052,3061,3070,3079,3087],{"type":43,"tag":102,"props":2748,"children":2749},{"class":104,"line":105},[2750],{"type":43,"tag":102,"props":2751,"children":2752},{},[2753],{"type":49,"value":2754},"class Workspace:\n",{"type":43,"tag":102,"props":2756,"children":2757},{"class":104,"line":114},[2758],{"type":43,"tag":102,"props":2759,"children":2760},{},[2761],{"type":49,"value":2762},"    \"\"\"Unified entry point for Mixpanel data operations (042 redesign).\"\"\"\n",{"type":43,"tag":102,"props":2764,"children":2765},{"class":104,"line":123},[2766],{"type":43,"tag":102,"props":2767,"children":2768},{"emptyLinePlaceholder":444},[2769],{"type":49,"value":447},{"type":43,"tag":102,"props":2771,"children":2772},{"class":104,"line":132},[2773],{"type":43,"tag":102,"props":2774,"children":2775},{},[2776],{"type":49,"value":2777},"    def __init__(\n",{"type":43,"tag":102,"props":2779,"children":2780},{"class":104,"line":450},[2781],{"type":43,"tag":102,"props":2782,"children":2783},{},[2784],{"type":49,"value":2785},"        self,\n",{"type":43,"tag":102,"props":2787,"children":2788},{"class":104,"line":459},[2789],{"type":43,"tag":102,"props":2790,"children":2791},{},[2792],{"type":49,"value":2793},"        *,\n",{"type":43,"tag":102,"props":2795,"children":2796},{"class":104,"line":468},[2797],{"type":43,"tag":102,"props":2798,"children":2799},{},[2800],{"type":49,"value":2801},"        account: str | None = None,\n",{"type":43,"tag":102,"props":2803,"children":2804},{"class":104,"line":477},[2805],{"type":43,"tag":102,"props":2806,"children":2807},{},[2808],{"type":49,"value":2809},"        project: str | None = None,\n",{"type":43,"tag":102,"props":2811,"children":2812},{"class":104,"line":486},[2813],{"type":43,"tag":102,"props":2814,"children":2815},{},[2816],{"type":49,"value":2817},"        workspace: int | None = None,\n",{"type":43,"tag":102,"props":2819,"children":2820},{"class":104,"line":495},[2821],{"type":43,"tag":102,"props":2822,"children":2823},{},[2824],{"type":49,"value":2825},"        target: str | None = None,\n",{"type":43,"tag":102,"props":2827,"children":2828},{"class":104,"line":503},[2829],{"type":43,"tag":102,"props":2830,"children":2831},{},[2832],{"type":49,"value":2833},"        session: Session | None = None,\n",{"type":43,"tag":102,"props":2835,"children":2836},{"class":104,"line":512},[2837],{"type":43,"tag":102,"props":2838,"children":2839},{},[2840],{"type":49,"value":2841},"    ) -> None:\n",{"type":43,"tag":102,"props":2843,"children":2844},{"class":104,"line":521},[2845],{"type":43,"tag":102,"props":2846,"children":2847},{},[2848],{"type":49,"value":2849},"        \"\"\"Create a new Workspace. Resolution per axis is independent\n",{"type":43,"tag":102,"props":2851,"children":2852},{"class":104,"line":530},[2853],{"type":43,"tag":102,"props":2854,"children":2855},{},[2856],{"type":49,"value":2857},"        (env > param > target > bridge > config); see\n",{"type":43,"tag":102,"props":2859,"children":2860},{"class":104,"line":538},[2861],{"type":43,"tag":102,"props":2862,"children":2863},{},[2864],{"type":49,"value":2865},"        ``mixpanel_headless.auth_types`` and the resolver.\n",{"type":43,"tag":102,"props":2867,"children":2868},{"class":104,"line":547},[2869],{"type":43,"tag":102,"props":2870,"children":2871},{"emptyLinePlaceholder":444},[2872],{"type":49,"value":447},{"type":43,"tag":102,"props":2874,"children":2875},{"class":104,"line":556},[2876],{"type":43,"tag":102,"props":2877,"children":2878},{},[2879],{"type":49,"value":2880},"        With ``session=`` supplied, all other axis kwargs are ignored\n",{"type":43,"tag":102,"props":2882,"children":2883},{"class":104,"line":948},[2884],{"type":43,"tag":102,"props":2885,"children":2886},{},[2887],{"type":49,"value":2888},"        (full bypass).\n",{"type":43,"tag":102,"props":2890,"children":2891},{"class":104,"line":956},[2892],{"type":43,"tag":102,"props":2893,"children":2894},{},[2895],{"type":49,"value":2896},"        \"\"\"\n",{"type":43,"tag":102,"props":2898,"children":2899},{"class":104,"line":965},[2900],{"type":43,"tag":102,"props":2901,"children":2902},{},[2903],{"type":49,"value":2904},"        ...\n",{"type":43,"tag":102,"props":2906,"children":2907},{"class":104,"line":991},[2908],{"type":43,"tag":102,"props":2909,"children":2910},{"emptyLinePlaceholder":444},[2911],{"type":49,"value":447},{"type":43,"tag":102,"props":2913,"children":2914},{"class":104,"line":1202},[2915],{"type":43,"tag":102,"props":2916,"children":2917},{},[2918],{"type":49,"value":2919},"    # --- Properties (read-only) ---\n",{"type":43,"tag":102,"props":2921,"children":2922},{"class":104,"line":1211},[2923],{"type":43,"tag":102,"props":2924,"children":2925},{},[2926],{"type":49,"value":2927},"    account: Account            # Resolved Account (discriminated union)\n",{"type":43,"tag":102,"props":2929,"children":2930},{"class":104,"line":1220},[2931],{"type":43,"tag":102,"props":2932,"children":2933},{},[2934],{"type":49,"value":2935},"    project: Project            # Resolved Project\n",{"type":43,"tag":102,"props":2937,"children":2938},{"class":104,"line":1228},[2939],{"type":43,"tag":102,"props":2940,"children":2941},{},[2942],{"type":49,"value":2943},"    workspace: WorkspaceRef | None  # Resolved workspace, or None for lazy-resolve\n",{"type":43,"tag":102,"props":2945,"children":2946},{"class":104,"line":1237},[2947],{"type":43,"tag":102,"props":2948,"children":2949},{},[2950],{"type":49,"value":2951},"    session: Session            # The (account, project, workspace) tuple\n",{"type":43,"tag":102,"props":2953,"children":2954},{"class":104,"line":1246},[2955],{"type":43,"tag":102,"props":2956,"children":2957},{},[2958],{"type":49,"value":2959},"    api: MixpanelAPIClient      # Direct API client access (escape hatch)\n",{"type":43,"tag":102,"props":2961,"children":2963},{"class":104,"line":2962},28,[2964],{"type":43,"tag":102,"props":2965,"children":2966},{"emptyLinePlaceholder":444},[2967],{"type":49,"value":447},{"type":43,"tag":102,"props":2969,"children":2971},{"class":104,"line":2970},29,[2972],{"type":43,"tag":102,"props":2973,"children":2974},{},[2975],{"type":49,"value":2976},"    def use(\n",{"type":43,"tag":102,"props":2978,"children":2980},{"class":104,"line":2979},30,[2981],{"type":43,"tag":102,"props":2982,"children":2983},{},[2984],{"type":49,"value":2785},{"type":43,"tag":102,"props":2986,"children":2988},{"class":104,"line":2987},31,[2989],{"type":43,"tag":102,"props":2990,"children":2991},{},[2992],{"type":49,"value":2793},{"type":43,"tag":102,"props":2994,"children":2996},{"class":104,"line":2995},32,[2997],{"type":43,"tag":102,"props":2998,"children":2999},{},[3000],{"type":49,"value":2801},{"type":43,"tag":102,"props":3002,"children":3004},{"class":104,"line":3003},33,[3005],{"type":43,"tag":102,"props":3006,"children":3007},{},[3008],{"type":49,"value":2809},{"type":43,"tag":102,"props":3010,"children":3012},{"class":104,"line":3011},34,[3013],{"type":43,"tag":102,"props":3014,"children":3015},{},[3016],{"type":49,"value":2817},{"type":43,"tag":102,"props":3018,"children":3020},{"class":104,"line":3019},35,[3021],{"type":43,"tag":102,"props":3022,"children":3023},{},[3024],{"type":49,"value":2825},{"type":43,"tag":102,"props":3026,"children":3028},{"class":104,"line":3027},36,[3029],{"type":43,"tag":102,"props":3030,"children":3031},{},[3032],{"type":49,"value":3033},"        persist: bool = False,\n",{"type":43,"tag":102,"props":3035,"children":3037},{"class":104,"line":3036},37,[3038],{"type":43,"tag":102,"props":3039,"children":3040},{},[3041],{"type":49,"value":3042},"    ) -> Self:\n",{"type":43,"tag":102,"props":3044,"children":3046},{"class":104,"line":3045},38,[3047],{"type":43,"tag":102,"props":3048,"children":3049},{},[3050],{"type":49,"value":3051},"        \"\"\"Switch any axis in-session. Returns self for chaining.\n",{"type":43,"tag":102,"props":3053,"children":3055},{"class":104,"line":3054},39,[3056],{"type":43,"tag":102,"props":3057,"children":3058},{},[3059],{"type":49,"value":3060},"        Preserves the underlying httpx.Client. With persist=True, also\n",{"type":43,"tag":102,"props":3062,"children":3064},{"class":104,"line":3063},40,[3065],{"type":43,"tag":102,"props":3066,"children":3067},{},[3068],{"type":49,"value":3069},"        writes to ~\u002F.mp\u002Fconfig.toml [active]. ``target=`` is mutex\n",{"type":43,"tag":102,"props":3071,"children":3073},{"class":104,"line":3072},41,[3074],{"type":43,"tag":102,"props":3075,"children":3076},{},[3077],{"type":49,"value":3078},"        with the per-axis kwargs.\n",{"type":43,"tag":102,"props":3080,"children":3082},{"class":104,"line":3081},42,[3083],{"type":43,"tag":102,"props":3084,"children":3085},{},[3086],{"type":49,"value":2896},{"type":43,"tag":102,"props":3088,"children":3090},{"class":104,"line":3089},43,[3091],{"type":43,"tag":102,"props":3092,"children":3093},{},[3094],{"type":49,"value":2904},{"type":43,"tag":52,"props":3096,"children":3097},{},[3098,3100],{"type":49,"value":3099},"Supports context manager: ",{"type":43,"tag":58,"props":3101,"children":3103},{"className":3102},[],[3104],{"type":49,"value":3105},"with mp.Workspace() as ws: ...",{"type":43,"tag":404,"props":3107,"children":3109},{"id":3108},"project-workspace-management",[3110],{"type":49,"value":3111},"Project & Workspace Management",{"type":43,"tag":91,"props":3113,"children":3115},{"className":93,"code":3114,"language":95,"meta":96,"style":96},"def me(self, *, force_refresh: bool = False) -> Any: ...\n    # Get \u002Fme response for current credentials (cached 24h).\n\ndef projects(self) -> list[Project]: ...\n    # List accessible projects (v3; returns Project records — id, name,\n    # organization_id, timezone). Replaces deprecated discover_projects().\n\ndef workspaces(self, *, project_id: str | None = None) -> list[WorkspaceRef]: ...\n    # List workspaces in a project (v3; returns WorkspaceRef records —\n    # id, name, is_default). Replaces deprecated discover_workspaces().\n\ndef list_workspaces(self) -> list[PublicWorkspace]: ...\n    # List all public workspaces for the current project (App API).\n\ndef resolve_workspace_id(self) -> int: ...\n    # Auto-discover and resolve workspace ID (lazy-resolve helper).\n\ndef close(self) -> None: ...\n    # Close all resources (HTTP client). Idempotent.\n",[3116],{"type":43,"tag":58,"props":3117,"children":3118},{"__ignoreMap":96},[3119,3127,3135,3142,3150,3158,3166,3173,3181,3189,3197,3204,3212,3220,3227,3235,3243,3250,3258],{"type":43,"tag":102,"props":3120,"children":3121},{"class":104,"line":105},[3122],{"type":43,"tag":102,"props":3123,"children":3124},{},[3125],{"type":49,"value":3126},"def me(self, *, force_refresh: bool = False) -> Any: ...\n",{"type":43,"tag":102,"props":3128,"children":3129},{"class":104,"line":114},[3130],{"type":43,"tag":102,"props":3131,"children":3132},{},[3133],{"type":49,"value":3134},"    # Get \u002Fme response for current credentials (cached 24h).\n",{"type":43,"tag":102,"props":3136,"children":3137},{"class":104,"line":123},[3138],{"type":43,"tag":102,"props":3139,"children":3140},{"emptyLinePlaceholder":444},[3141],{"type":49,"value":447},{"type":43,"tag":102,"props":3143,"children":3144},{"class":104,"line":132},[3145],{"type":43,"tag":102,"props":3146,"children":3147},{},[3148],{"type":49,"value":3149},"def projects(self) -> list[Project]: ...\n",{"type":43,"tag":102,"props":3151,"children":3152},{"class":104,"line":450},[3153],{"type":43,"tag":102,"props":3154,"children":3155},{},[3156],{"type":49,"value":3157},"    # List accessible projects (v3; returns Project records — id, name,\n",{"type":43,"tag":102,"props":3159,"children":3160},{"class":104,"line":459},[3161],{"type":43,"tag":102,"props":3162,"children":3163},{},[3164],{"type":49,"value":3165},"    # organization_id, timezone). Replaces deprecated discover_projects().\n",{"type":43,"tag":102,"props":3167,"children":3168},{"class":104,"line":468},[3169],{"type":43,"tag":102,"props":3170,"children":3171},{"emptyLinePlaceholder":444},[3172],{"type":49,"value":447},{"type":43,"tag":102,"props":3174,"children":3175},{"class":104,"line":477},[3176],{"type":43,"tag":102,"props":3177,"children":3178},{},[3179],{"type":49,"value":3180},"def workspaces(self, *, project_id: str | None = None) -> list[WorkspaceRef]: ...\n",{"type":43,"tag":102,"props":3182,"children":3183},{"class":104,"line":486},[3184],{"type":43,"tag":102,"props":3185,"children":3186},{},[3187],{"type":49,"value":3188},"    # List workspaces in a project (v3; returns WorkspaceRef records —\n",{"type":43,"tag":102,"props":3190,"children":3191},{"class":104,"line":495},[3192],{"type":43,"tag":102,"props":3193,"children":3194},{},[3195],{"type":49,"value":3196},"    # id, name, is_default). Replaces deprecated discover_workspaces().\n",{"type":43,"tag":102,"props":3198,"children":3199},{"class":104,"line":503},[3200],{"type":43,"tag":102,"props":3201,"children":3202},{"emptyLinePlaceholder":444},[3203],{"type":49,"value":447},{"type":43,"tag":102,"props":3205,"children":3206},{"class":104,"line":512},[3207],{"type":43,"tag":102,"props":3208,"children":3209},{},[3210],{"type":49,"value":3211},"def list_workspaces(self) -> list[PublicWorkspace]: ...\n",{"type":43,"tag":102,"props":3213,"children":3214},{"class":104,"line":521},[3215],{"type":43,"tag":102,"props":3216,"children":3217},{},[3218],{"type":49,"value":3219},"    # List all public workspaces for the current project (App API).\n",{"type":43,"tag":102,"props":3221,"children":3222},{"class":104,"line":530},[3223],{"type":43,"tag":102,"props":3224,"children":3225},{"emptyLinePlaceholder":444},[3226],{"type":49,"value":447},{"type":43,"tag":102,"props":3228,"children":3229},{"class":104,"line":538},[3230],{"type":43,"tag":102,"props":3231,"children":3232},{},[3233],{"type":49,"value":3234},"def resolve_workspace_id(self) -> int: ...\n",{"type":43,"tag":102,"props":3236,"children":3237},{"class":104,"line":547},[3238],{"type":43,"tag":102,"props":3239,"children":3240},{},[3241],{"type":49,"value":3242},"    # Auto-discover and resolve workspace ID (lazy-resolve helper).\n",{"type":43,"tag":102,"props":3244,"children":3245},{"class":104,"line":556},[3246],{"type":43,"tag":102,"props":3247,"children":3248},{"emptyLinePlaceholder":444},[3249],{"type":49,"value":447},{"type":43,"tag":102,"props":3251,"children":3252},{"class":104,"line":948},[3253],{"type":43,"tag":102,"props":3254,"children":3255},{},[3256],{"type":49,"value":3257},"def close(self) -> None: ...\n",{"type":43,"tag":102,"props":3259,"children":3260},{"class":104,"line":956},[3261],{"type":43,"tag":102,"props":3262,"children":3263},{},[3264],{"type":49,"value":3265},"    # Close all resources (HTTP client). Idempotent.\n",{"type":43,"tag":3267,"props":3268,"children":3269},"blockquote",{},[3270],{"type":43,"tag":52,"props":3271,"children":3272},{},[3273,3278,3279,3285,3287,3293,3294,3300,3301,3307,3309,3315,3316,3322,3323,3329,3330,3336,3337,3343,3345,3351,3352,3358,3359,3365,3366,3372,3373,3379,3380,3386,3387,3393,3395,3401],{"type":43,"tag":357,"props":3274,"children":3275},{},[3276],{"type":49,"value":3277},"Removed (042 redesign — FR-038):",{"type":49,"value":1926},{"type":43,"tag":58,"props":3280,"children":3282},{"className":3281},[],[3283],{"type":49,"value":3284},"Workspace.workspace_id",{"type":49,"value":3286}," property,\n",{"type":43,"tag":58,"props":3288,"children":3290},{"className":3289},[],[3291],{"type":49,"value":3292},"set_workspace_id()",{"type":49,"value":1451},{"type":43,"tag":58,"props":3295,"children":3297},{"className":3296},[],[3298],{"type":49,"value":3299},"switch_project()",{"type":49,"value":1451},{"type":43,"tag":58,"props":3302,"children":3304},{"className":3303},[],[3305],{"type":49,"value":3306},"switch_workspace()",{"type":49,"value":3308},",\n",{"type":43,"tag":58,"props":3310,"children":3312},{"className":3311},[],[3313],{"type":49,"value":3314},"discover_projects()",{"type":49,"value":1451},{"type":43,"tag":58,"props":3317,"children":3319},{"className":3318},[],[3320],{"type":49,"value":3321},"discover_workspaces()",{"type":49,"value":1451},{"type":43,"tag":58,"props":3324,"children":3326},{"className":3325},[],[3327],{"type":49,"value":3328},"current_project",{"type":49,"value":3308},{"type":43,"tag":58,"props":3331,"children":3333},{"className":3332},[],[3334],{"type":49,"value":3335},"current_credential",{"type":49,"value":1451},{"type":43,"tag":58,"props":3338,"children":3340},{"className":3339},[],[3341],{"type":49,"value":3342},"test_credentials()",{"type":49,"value":3344},". Use ",{"type":43,"tag":58,"props":3346,"children":3348},{"className":3347},[],[3349],{"type":49,"value":3350},"ws.session.workspace_id",{"type":49,"value":3308},{"type":43,"tag":58,"props":3353,"children":3355},{"className":3354},[],[3356],{"type":49,"value":3357},"ws.use(workspace=N)",{"type":49,"value":1451},{"type":43,"tag":58,"props":3360,"children":3362},{"className":3361},[],[3363],{"type":49,"value":3364},"ws.use(project=P)",{"type":49,"value":1451},{"type":43,"tag":58,"props":3367,"children":3369},{"className":3368},[],[3370],{"type":49,"value":3371},"ws.projects()",{"type":49,"value":3308},{"type":43,"tag":58,"props":3374,"children":3376},{"className":3375},[],[3377],{"type":49,"value":3378},"ws.workspaces()",{"type":49,"value":1451},{"type":43,"tag":58,"props":3381,"children":3383},{"className":3382},[],[3384],{"type":49,"value":3385},"ws.project",{"type":49,"value":1451},{"type":43,"tag":58,"props":3388,"children":3390},{"className":3389},[],[3391],{"type":49,"value":3392},"ws.account",{"type":49,"value":3394},", and ",{"type":43,"tag":58,"props":3396,"children":3398},{"className":3397},[],[3399],{"type":49,"value":3400},"mp.accounts.test(NAME)",{"type":49,"value":3402},"\nrespectively.",{"type":43,"tag":404,"props":3404,"children":3406},{"id":3405},"insights-query",[3407],{"type":49,"value":3408},"Insights Query",{"type":43,"tag":52,"props":3410,"children":3411},{},[3412,3414,3420],{"type":49,"value":3413},"Run ",{"type":43,"tag":58,"props":3415,"children":3417},{"className":3416},[],[3418],{"type":49,"value":3419},"python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query",{"type":49,"value":3421}," for the full signature.",{"type":43,"tag":91,"props":3423,"children":3425},{"className":93,"code":3424,"language":95,"meta":96,"style":96},"def query(\n    self,\n    events: str | Metric | CohortMetric | Formula | Sequence[...],\n    *,\n    from_date: str | None = None,        # YYYY-MM-DD, overrides last\n    to_date: str | None = None,          # YYYY-MM-DD, requires from_date\n    last: int = 30,                      # relative days (ignored if from_date set)\n    unit: QueryTimeUnit = 'day',\n    math: MathType = 'total',            # aggregation: total, unique, dau, average, sum, ...\n    math_property: str | None = None,    # top-level shorthand; Metric() uses property= instead\n    per_user: PerUserAggregation | None = None,\n    percentile_value: int | float | None = None,\n    group_by: str | GroupBy | CohortBreakdown | FrequencyBreakdown | list[...] | None = None,\n    where: Filter | FrequencyFilter | list[...] | None = None,\n    formula: str | None = None,          # e.g. \"(B \u002F A) * 100\", requires 2+ events\n    formula_label: str | None = None,\n    rolling: int | None = None,\n    cumulative: bool = False,\n    mode: Literal['timeseries', 'total', 'table'] = 'timeseries',\n    time_comparison: TimeComparison | None = None,\n    data_group_id: int | None = None,\n) -> QueryResult:\n    # .df columns: timeseries → [date, event, count]\n    #              total → [event, count]\n    #              with group_by → adds segment column\n    ...\n",[3426],{"type":43,"tag":58,"props":3427,"children":3428},{"__ignoreMap":96},[3429,3437,3445,3453,3461,3469,3477,3485,3493,3501,3509,3517,3525,3533,3541,3549,3557,3565,3573,3581,3589,3597,3605,3613,3621,3629],{"type":43,"tag":102,"props":3430,"children":3431},{"class":104,"line":105},[3432],{"type":43,"tag":102,"props":3433,"children":3434},{},[3435],{"type":49,"value":3436},"def query(\n",{"type":43,"tag":102,"props":3438,"children":3439},{"class":104,"line":114},[3440],{"type":43,"tag":102,"props":3441,"children":3442},{},[3443],{"type":49,"value":3444},"    self,\n",{"type":43,"tag":102,"props":3446,"children":3447},{"class":104,"line":123},[3448],{"type":43,"tag":102,"props":3449,"children":3450},{},[3451],{"type":49,"value":3452},"    events: str | Metric | CohortMetric | Formula | Sequence[...],\n",{"type":43,"tag":102,"props":3454,"children":3455},{"class":104,"line":132},[3456],{"type":43,"tag":102,"props":3457,"children":3458},{},[3459],{"type":49,"value":3460},"    *,\n",{"type":43,"tag":102,"props":3462,"children":3463},{"class":104,"line":450},[3464],{"type":43,"tag":102,"props":3465,"children":3466},{},[3467],{"type":49,"value":3468},"    from_date: str | None = None,        # YYYY-MM-DD, overrides last\n",{"type":43,"tag":102,"props":3470,"children":3471},{"class":104,"line":459},[3472],{"type":43,"tag":102,"props":3473,"children":3474},{},[3475],{"type":49,"value":3476},"    to_date: str | None = None,          # YYYY-MM-DD, requires from_date\n",{"type":43,"tag":102,"props":3478,"children":3479},{"class":104,"line":468},[3480],{"type":43,"tag":102,"props":3481,"children":3482},{},[3483],{"type":49,"value":3484},"    last: int = 30,                      # relative days (ignored if from_date set)\n",{"type":43,"tag":102,"props":3486,"children":3487},{"class":104,"line":477},[3488],{"type":43,"tag":102,"props":3489,"children":3490},{},[3491],{"type":49,"value":3492},"    unit: QueryTimeUnit = 'day',\n",{"type":43,"tag":102,"props":3494,"children":3495},{"class":104,"line":486},[3496],{"type":43,"tag":102,"props":3497,"children":3498},{},[3499],{"type":49,"value":3500},"    math: MathType = 'total',            # aggregation: total, unique, dau, average, sum, ...\n",{"type":43,"tag":102,"props":3502,"children":3503},{"class":104,"line":495},[3504],{"type":43,"tag":102,"props":3505,"children":3506},{},[3507],{"type":49,"value":3508},"    math_property: str | None = None,    # top-level shorthand; Metric() uses property= instead\n",{"type":43,"tag":102,"props":3510,"children":3511},{"class":104,"line":503},[3512],{"type":43,"tag":102,"props":3513,"children":3514},{},[3515],{"type":49,"value":3516},"    per_user: PerUserAggregation | None = None,\n",{"type":43,"tag":102,"props":3518,"children":3519},{"class":104,"line":512},[3520],{"type":43,"tag":102,"props":3521,"children":3522},{},[3523],{"type":49,"value":3524},"    percentile_value: int | float | None = None,\n",{"type":43,"tag":102,"props":3526,"children":3527},{"class":104,"line":521},[3528],{"type":43,"tag":102,"props":3529,"children":3530},{},[3531],{"type":49,"value":3532},"    group_by: str | GroupBy | CohortBreakdown | FrequencyBreakdown | list[...] | None = None,\n",{"type":43,"tag":102,"props":3534,"children":3535},{"class":104,"line":530},[3536],{"type":43,"tag":102,"props":3537,"children":3538},{},[3539],{"type":49,"value":3540},"    where: Filter | FrequencyFilter | list[...] | None = None,\n",{"type":43,"tag":102,"props":3542,"children":3543},{"class":104,"line":538},[3544],{"type":43,"tag":102,"props":3545,"children":3546},{},[3547],{"type":49,"value":3548},"    formula: str | None = None,          # e.g. \"(B \u002F A) * 100\", requires 2+ events\n",{"type":43,"tag":102,"props":3550,"children":3551},{"class":104,"line":547},[3552],{"type":43,"tag":102,"props":3553,"children":3554},{},[3555],{"type":49,"value":3556},"    formula_label: str | None = None,\n",{"type":43,"tag":102,"props":3558,"children":3559},{"class":104,"line":556},[3560],{"type":43,"tag":102,"props":3561,"children":3562},{},[3563],{"type":49,"value":3564},"    rolling: int | None = None,\n",{"type":43,"tag":102,"props":3566,"children":3567},{"class":104,"line":948},[3568],{"type":43,"tag":102,"props":3569,"children":3570},{},[3571],{"type":49,"value":3572},"    cumulative: bool = False,\n",{"type":43,"tag":102,"props":3574,"children":3575},{"class":104,"line":956},[3576],{"type":43,"tag":102,"props":3577,"children":3578},{},[3579],{"type":49,"value":3580},"    mode: Literal['timeseries', 'total', 'table'] = 'timeseries',\n",{"type":43,"tag":102,"props":3582,"children":3583},{"class":104,"line":965},[3584],{"type":43,"tag":102,"props":3585,"children":3586},{},[3587],{"type":49,"value":3588},"    time_comparison: TimeComparison | None = None,\n",{"type":43,"tag":102,"props":3590,"children":3591},{"class":104,"line":991},[3592],{"type":43,"tag":102,"props":3593,"children":3594},{},[3595],{"type":49,"value":3596},"    data_group_id: int | None = None,\n",{"type":43,"tag":102,"props":3598,"children":3599},{"class":104,"line":1202},[3600],{"type":43,"tag":102,"props":3601,"children":3602},{},[3603],{"type":49,"value":3604},") -> QueryResult:\n",{"type":43,"tag":102,"props":3606,"children":3607},{"class":104,"line":1211},[3608],{"type":43,"tag":102,"props":3609,"children":3610},{},[3611],{"type":49,"value":3612},"    # .df columns: timeseries → [date, event, count]\n",{"type":43,"tag":102,"props":3614,"children":3615},{"class":104,"line":1220},[3616],{"type":43,"tag":102,"props":3617,"children":3618},{},[3619],{"type":49,"value":3620},"    #              total → [event, count]\n",{"type":43,"tag":102,"props":3622,"children":3623},{"class":104,"line":1228},[3624],{"type":43,"tag":102,"props":3625,"children":3626},{},[3627],{"type":49,"value":3628},"    #              with group_by → adds segment column\n",{"type":43,"tag":102,"props":3630,"children":3631},{"class":104,"line":1237},[3632],{"type":43,"tag":102,"props":3633,"children":3634},{},[3635],{"type":49,"value":3636},"    ...\n",{"type":43,"tag":404,"props":3638,"children":3640},{"id":3639},"funnel-query",[3641],{"type":49,"value":3642},"Funnel Query",{"type":43,"tag":52,"props":3644,"children":3645},{},[3646,3647,3653],{"type":49,"value":3413},{"type":43,"tag":58,"props":3648,"children":3650},{"className":3649},[],[3651],{"type":49,"value":3652},"python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query_funnel",{"type":49,"value":3421},{"type":43,"tag":91,"props":3655,"children":3657},{"className":93,"code":3656,"language":95,"meta":96,"style":96},"def query_funnel(\n    self,\n    steps: list[str | FunnelStep],      # at least 2 steps required\n    *,\n    conversion_window: int = 14,\n    conversion_window_unit: Literal['second', 'minute', 'hour', 'day', 'week', 'month', 'session'] = 'day',\n    order: Literal['loose', 'any'] = 'loose',\n    from_date: str | None = None, to_date: str | None = None, last: int = 30,\n    unit: QueryTimeUnit = 'day',\n    math: FunnelMathType = 'conversion_rate_unique',\n    math_property: str | None = None,\n    group_by: str | GroupBy | CohortBreakdown | list[...] | None = None,\n    where: Filter | list[Filter] | None = None,\n    exclusions: list[str | Exclusion] | None = None,\n    holding_constant: str | HoldingConstant | list[...] | None = None,\n    mode: Literal['steps', 'trends', 'table'] = 'steps',\n    reentry_mode: FunnelReentryMode | None = None,\n    time_comparison: TimeComparison | None = None,\n    data_group_id: int | None = None,\n) -> FunnelQueryResult:\n    # .df columns: [step, event, count, step_conv_ratio, avg_time]\n    # .overall_conversion_rate: float\n    ...\n",[3658],{"type":43,"tag":58,"props":3659,"children":3660},{"__ignoreMap":96},[3661,3669,3676,3684,3691,3699,3707,3715,3723,3730,3738,3746,3754,3762,3770,3778,3786,3794,3801,3808,3816,3824,3832],{"type":43,"tag":102,"props":3662,"children":3663},{"class":104,"line":105},[3664],{"type":43,"tag":102,"props":3665,"children":3666},{},[3667],{"type":49,"value":3668},"def query_funnel(\n",{"type":43,"tag":102,"props":3670,"children":3671},{"class":104,"line":114},[3672],{"type":43,"tag":102,"props":3673,"children":3674},{},[3675],{"type":49,"value":3444},{"type":43,"tag":102,"props":3677,"children":3678},{"class":104,"line":123},[3679],{"type":43,"tag":102,"props":3680,"children":3681},{},[3682],{"type":49,"value":3683},"    steps: list[str | FunnelStep],      # at least 2 steps required\n",{"type":43,"tag":102,"props":3685,"children":3686},{"class":104,"line":132},[3687],{"type":43,"tag":102,"props":3688,"children":3689},{},[3690],{"type":49,"value":3460},{"type":43,"tag":102,"props":3692,"children":3693},{"class":104,"line":450},[3694],{"type":43,"tag":102,"props":3695,"children":3696},{},[3697],{"type":49,"value":3698},"    conversion_window: int = 14,\n",{"type":43,"tag":102,"props":3700,"children":3701},{"class":104,"line":459},[3702],{"type":43,"tag":102,"props":3703,"children":3704},{},[3705],{"type":49,"value":3706},"    conversion_window_unit: Literal['second', 'minute', 'hour', 'day', 'week', 'month', 'session'] = 'day',\n",{"type":43,"tag":102,"props":3708,"children":3709},{"class":104,"line":468},[3710],{"type":43,"tag":102,"props":3711,"children":3712},{},[3713],{"type":49,"value":3714},"    order: Literal['loose', 'any'] = 'loose',\n",{"type":43,"tag":102,"props":3716,"children":3717},{"class":104,"line":477},[3718],{"type":43,"tag":102,"props":3719,"children":3720},{},[3721],{"type":49,"value":3722},"    from_date: str | None = None, to_date: str | None = None, last: int = 30,\n",{"type":43,"tag":102,"props":3724,"children":3725},{"class":104,"line":486},[3726],{"type":43,"tag":102,"props":3727,"children":3728},{},[3729],{"type":49,"value":3492},{"type":43,"tag":102,"props":3731,"children":3732},{"class":104,"line":495},[3733],{"type":43,"tag":102,"props":3734,"children":3735},{},[3736],{"type":49,"value":3737},"    math: FunnelMathType = 'conversion_rate_unique',\n",{"type":43,"tag":102,"props":3739,"children":3740},{"class":104,"line":503},[3741],{"type":43,"tag":102,"props":3742,"children":3743},{},[3744],{"type":49,"value":3745},"    math_property: str | None = None,\n",{"type":43,"tag":102,"props":3747,"children":3748},{"class":104,"line":512},[3749],{"type":43,"tag":102,"props":3750,"children":3751},{},[3752],{"type":49,"value":3753},"    group_by: str | GroupBy | CohortBreakdown | list[...] | None = None,\n",{"type":43,"tag":102,"props":3755,"children":3756},{"class":104,"line":521},[3757],{"type":43,"tag":102,"props":3758,"children":3759},{},[3760],{"type":49,"value":3761},"    where: Filter | list[Filter] | None = None,\n",{"type":43,"tag":102,"props":3763,"children":3764},{"class":104,"line":530},[3765],{"type":43,"tag":102,"props":3766,"children":3767},{},[3768],{"type":49,"value":3769},"    exclusions: list[str | Exclusion] | None = None,\n",{"type":43,"tag":102,"props":3771,"children":3772},{"class":104,"line":538},[3773],{"type":43,"tag":102,"props":3774,"children":3775},{},[3776],{"type":49,"value":3777},"    holding_constant: str | HoldingConstant | list[...] | None = None,\n",{"type":43,"tag":102,"props":3779,"children":3780},{"class":104,"line":547},[3781],{"type":43,"tag":102,"props":3782,"children":3783},{},[3784],{"type":49,"value":3785},"    mode: Literal['steps', 'trends', 'table'] = 'steps',\n",{"type":43,"tag":102,"props":3787,"children":3788},{"class":104,"line":556},[3789],{"type":43,"tag":102,"props":3790,"children":3791},{},[3792],{"type":49,"value":3793},"    reentry_mode: FunnelReentryMode | None = None,\n",{"type":43,"tag":102,"props":3795,"children":3796},{"class":104,"line":948},[3797],{"type":43,"tag":102,"props":3798,"children":3799},{},[3800],{"type":49,"value":3588},{"type":43,"tag":102,"props":3802,"children":3803},{"class":104,"line":956},[3804],{"type":43,"tag":102,"props":3805,"children":3806},{},[3807],{"type":49,"value":3596},{"type":43,"tag":102,"props":3809,"children":3810},{"class":104,"line":965},[3811],{"type":43,"tag":102,"props":3812,"children":3813},{},[3814],{"type":49,"value":3815},") -> FunnelQueryResult:\n",{"type":43,"tag":102,"props":3817,"children":3818},{"class":104,"line":991},[3819],{"type":43,"tag":102,"props":3820,"children":3821},{},[3822],{"type":49,"value":3823},"    # .df columns: [step, event, count, step_conv_ratio, avg_time]\n",{"type":43,"tag":102,"props":3825,"children":3826},{"class":104,"line":1202},[3827],{"type":43,"tag":102,"props":3828,"children":3829},{},[3830],{"type":49,"value":3831},"    # .overall_conversion_rate: float\n",{"type":43,"tag":102,"props":3833,"children":3834},{"class":104,"line":1211},[3835],{"type":43,"tag":102,"props":3836,"children":3837},{},[3838],{"type":49,"value":3636},{"type":43,"tag":404,"props":3840,"children":3842},{"id":3841},"retention-query",[3843],{"type":49,"value":3844},"Retention Query",{"type":43,"tag":52,"props":3846,"children":3847},{},[3848,3849,3855],{"type":49,"value":3413},{"type":43,"tag":58,"props":3850,"children":3852},{"className":3851},[],[3853],{"type":49,"value":3854},"python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query_retention",{"type":49,"value":3421},{"type":43,"tag":91,"props":3857,"children":3859},{"className":93,"code":3858,"language":95,"meta":96,"style":96},"def query_retention(\n    self,\n    born_event: str | RetentionEvent,\n    return_event: str | RetentionEvent,\n    *,\n    retention_unit: TimeUnit = 'week',\n    alignment: RetentionAlignment = 'birth',\n    bucket_sizes: list[int] | None = None,\n    from_date: str | None = None, to_date: str | None = None, last: int = 30,\n    unit: QueryTimeUnit = 'day',\n    math: RetentionMathType = 'retention_rate',\n    group_by: str | GroupBy | CohortBreakdown | list[...] | None = None,\n    where: Filter | list[Filter] | None = None,\n    mode: RetentionMode = 'curve',\n    unbounded_mode: RetentionUnboundedMode | None = None,\n    retention_cumulative: bool = False,\n    time_comparison: TimeComparison | None = None,\n    data_group_id: int | None = None,\n) -> RetentionQueryResult:\n    # .df columns: [cohort_date, bucket, count, rate]  (+ segment with group_by)\n    # .average: synthetic average across cohorts\n    ...\n",[3860],{"type":43,"tag":58,"props":3861,"children":3862},{"__ignoreMap":96},[3863,3871,3878,3886,3894,3901,3909,3917,3925,3932,3939,3947,3954,3961,3969,3977,3985,3992,3999,4007,4015,4023],{"type":43,"tag":102,"props":3864,"children":3865},{"class":104,"line":105},[3866],{"type":43,"tag":102,"props":3867,"children":3868},{},[3869],{"type":49,"value":3870},"def query_retention(\n",{"type":43,"tag":102,"props":3872,"children":3873},{"class":104,"line":114},[3874],{"type":43,"tag":102,"props":3875,"children":3876},{},[3877],{"type":49,"value":3444},{"type":43,"tag":102,"props":3879,"children":3880},{"class":104,"line":123},[3881],{"type":43,"tag":102,"props":3882,"children":3883},{},[3884],{"type":49,"value":3885},"    born_event: str | RetentionEvent,\n",{"type":43,"tag":102,"props":3887,"children":3888},{"class":104,"line":132},[3889],{"type":43,"tag":102,"props":3890,"children":3891},{},[3892],{"type":49,"value":3893},"    return_event: str | RetentionEvent,\n",{"type":43,"tag":102,"props":3895,"children":3896},{"class":104,"line":450},[3897],{"type":43,"tag":102,"props":3898,"children":3899},{},[3900],{"type":49,"value":3460},{"type":43,"tag":102,"props":3902,"children":3903},{"class":104,"line":459},[3904],{"type":43,"tag":102,"props":3905,"children":3906},{},[3907],{"type":49,"value":3908},"    retention_unit: TimeUnit = 'week',\n",{"type":43,"tag":102,"props":3910,"children":3911},{"class":104,"line":468},[3912],{"type":43,"tag":102,"props":3913,"children":3914},{},[3915],{"type":49,"value":3916},"    alignment: RetentionAlignment = 'birth',\n",{"type":43,"tag":102,"props":3918,"children":3919},{"class":104,"line":477},[3920],{"type":43,"tag":102,"props":3921,"children":3922},{},[3923],{"type":49,"value":3924},"    bucket_sizes: list[int] | None = None,\n",{"type":43,"tag":102,"props":3926,"children":3927},{"class":104,"line":486},[3928],{"type":43,"tag":102,"props":3929,"children":3930},{},[3931],{"type":49,"value":3722},{"type":43,"tag":102,"props":3933,"children":3934},{"class":104,"line":495},[3935],{"type":43,"tag":102,"props":3936,"children":3937},{},[3938],{"type":49,"value":3492},{"type":43,"tag":102,"props":3940,"children":3941},{"class":104,"line":503},[3942],{"type":43,"tag":102,"props":3943,"children":3944},{},[3945],{"type":49,"value":3946},"    math: RetentionMathType = 'retention_rate',\n",{"type":43,"tag":102,"props":3948,"children":3949},{"class":104,"line":512},[3950],{"type":43,"tag":102,"props":3951,"children":3952},{},[3953],{"type":49,"value":3753},{"type":43,"tag":102,"props":3955,"children":3956},{"class":104,"line":521},[3957],{"type":43,"tag":102,"props":3958,"children":3959},{},[3960],{"type":49,"value":3761},{"type":43,"tag":102,"props":3962,"children":3963},{"class":104,"line":530},[3964],{"type":43,"tag":102,"props":3965,"children":3966},{},[3967],{"type":49,"value":3968},"    mode: RetentionMode = 'curve',\n",{"type":43,"tag":102,"props":3970,"children":3971},{"class":104,"line":538},[3972],{"type":43,"tag":102,"props":3973,"children":3974},{},[3975],{"type":49,"value":3976},"    unbounded_mode: RetentionUnboundedMode | None = None,\n",{"type":43,"tag":102,"props":3978,"children":3979},{"class":104,"line":547},[3980],{"type":43,"tag":102,"props":3981,"children":3982},{},[3983],{"type":49,"value":3984},"    retention_cumulative: bool = False,\n",{"type":43,"tag":102,"props":3986,"children":3987},{"class":104,"line":556},[3988],{"type":43,"tag":102,"props":3989,"children":3990},{},[3991],{"type":49,"value":3588},{"type":43,"tag":102,"props":3993,"children":3994},{"class":104,"line":948},[3995],{"type":43,"tag":102,"props":3996,"children":3997},{},[3998],{"type":49,"value":3596},{"type":43,"tag":102,"props":4000,"children":4001},{"class":104,"line":956},[4002],{"type":43,"tag":102,"props":4003,"children":4004},{},[4005],{"type":49,"value":4006},") -> RetentionQueryResult:\n",{"type":43,"tag":102,"props":4008,"children":4009},{"class":104,"line":965},[4010],{"type":43,"tag":102,"props":4011,"children":4012},{},[4013],{"type":49,"value":4014},"    # .df columns: [cohort_date, bucket, count, rate]  (+ segment with group_by)\n",{"type":43,"tag":102,"props":4016,"children":4017},{"class":104,"line":991},[4018],{"type":43,"tag":102,"props":4019,"children":4020},{},[4021],{"type":49,"value":4022},"    # .average: synthetic average across cohorts\n",{"type":43,"tag":102,"props":4024,"children":4025},{"class":104,"line":1202},[4026],{"type":43,"tag":102,"props":4027,"children":4028},{},[4029],{"type":49,"value":3636},{"type":43,"tag":404,"props":4031,"children":4033},{"id":4032},"flow-query",[4034],{"type":49,"value":4035},"Flow Query",{"type":43,"tag":52,"props":4037,"children":4038},{},[4039,4040,4046],{"type":49,"value":3413},{"type":43,"tag":58,"props":4041,"children":4043},{"className":4042},[],[4044],{"type":49,"value":4045},"python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query_flow",{"type":49,"value":3421},{"type":43,"tag":91,"props":4048,"children":4050},{"className":93,"code":4049,"language":95,"meta":96,"style":96},"def query_flow(\n    self,\n    event: str | FlowStep | Sequence[str | FlowStep],\n    *,\n    forward: int = 3, reverse: int = 0,\n    from_date: str | None = None, to_date: str | None = None, last: int = 30,\n    conversion_window: int = 7,\n    conversion_window_unit: Literal['day', 'week', 'month', 'session'] = 'day',\n    count_type: Literal['unique', 'total', 'session'] = 'unique',\n    cardinality: int = 3,\n    collapse_repeated: bool = False,\n    hidden_events: list[str] | None = None,\n    mode: Literal['sankey', 'paths', 'tree'] = 'sankey',\n    where: Filter | list[Filter] | None = None,\n    segments: str | GroupBy | CohortBreakdown | FrequencyBreakdown | list[...] | None = None,\n    exclusions: list[str] | None = None,\n    data_group_id: int | None = None,\n) -> FlowQueryResult:\n    # .df, .graph (NetworkX DiGraph), .anytree (tree mode)\n    # .top_transitions(n), .drop_off_summary()\n    ...\n",[4051],{"type":43,"tag":58,"props":4052,"children":4053},{"__ignoreMap":96},[4054,4062,4069,4077,4084,4092,4099,4107,4115,4123,4131,4139,4147,4155,4162,4170,4178,4185,4193,4201,4209],{"type":43,"tag":102,"props":4055,"children":4056},{"class":104,"line":105},[4057],{"type":43,"tag":102,"props":4058,"children":4059},{},[4060],{"type":49,"value":4061},"def query_flow(\n",{"type":43,"tag":102,"props":4063,"children":4064},{"class":104,"line":114},[4065],{"type":43,"tag":102,"props":4066,"children":4067},{},[4068],{"type":49,"value":3444},{"type":43,"tag":102,"props":4070,"children":4071},{"class":104,"line":123},[4072],{"type":43,"tag":102,"props":4073,"children":4074},{},[4075],{"type":49,"value":4076},"    event: str | FlowStep | Sequence[str | FlowStep],\n",{"type":43,"tag":102,"props":4078,"children":4079},{"class":104,"line":132},[4080],{"type":43,"tag":102,"props":4081,"children":4082},{},[4083],{"type":49,"value":3460},{"type":43,"tag":102,"props":4085,"children":4086},{"class":104,"line":450},[4087],{"type":43,"tag":102,"props":4088,"children":4089},{},[4090],{"type":49,"value":4091},"    forward: int = 3, reverse: int = 0,\n",{"type":43,"tag":102,"props":4093,"children":4094},{"class":104,"line":459},[4095],{"type":43,"tag":102,"props":4096,"children":4097},{},[4098],{"type":49,"value":3722},{"type":43,"tag":102,"props":4100,"children":4101},{"class":104,"line":468},[4102],{"type":43,"tag":102,"props":4103,"children":4104},{},[4105],{"type":49,"value":4106},"    conversion_window: int = 7,\n",{"type":43,"tag":102,"props":4108,"children":4109},{"class":104,"line":477},[4110],{"type":43,"tag":102,"props":4111,"children":4112},{},[4113],{"type":49,"value":4114},"    conversion_window_unit: Literal['day', 'week', 'month', 'session'] = 'day',\n",{"type":43,"tag":102,"props":4116,"children":4117},{"class":104,"line":486},[4118],{"type":43,"tag":102,"props":4119,"children":4120},{},[4121],{"type":49,"value":4122},"    count_type: Literal['unique', 'total', 'session'] = 'unique',\n",{"type":43,"tag":102,"props":4124,"children":4125},{"class":104,"line":495},[4126],{"type":43,"tag":102,"props":4127,"children":4128},{},[4129],{"type":49,"value":4130},"    cardinality: int = 3,\n",{"type":43,"tag":102,"props":4132,"children":4133},{"class":104,"line":503},[4134],{"type":43,"tag":102,"props":4135,"children":4136},{},[4137],{"type":49,"value":4138},"    collapse_repeated: bool = False,\n",{"type":43,"tag":102,"props":4140,"children":4141},{"class":104,"line":512},[4142],{"type":43,"tag":102,"props":4143,"children":4144},{},[4145],{"type":49,"value":4146},"    hidden_events: list[str] | None = None,\n",{"type":43,"tag":102,"props":4148,"children":4149},{"class":104,"line":521},[4150],{"type":43,"tag":102,"props":4151,"children":4152},{},[4153],{"type":49,"value":4154},"    mode: Literal['sankey', 'paths', 'tree'] = 'sankey',\n",{"type":43,"tag":102,"props":4156,"children":4157},{"class":104,"line":530},[4158],{"type":43,"tag":102,"props":4159,"children":4160},{},[4161],{"type":49,"value":3761},{"type":43,"tag":102,"props":4163,"children":4164},{"class":104,"line":538},[4165],{"type":43,"tag":102,"props":4166,"children":4167},{},[4168],{"type":49,"value":4169},"    segments: str | GroupBy | CohortBreakdown | FrequencyBreakdown | list[...] | None = None,\n",{"type":43,"tag":102,"props":4171,"children":4172},{"class":104,"line":547},[4173],{"type":43,"tag":102,"props":4174,"children":4175},{},[4176],{"type":49,"value":4177},"    exclusions: list[str] | None = None,\n",{"type":43,"tag":102,"props":4179,"children":4180},{"class":104,"line":556},[4181],{"type":43,"tag":102,"props":4182,"children":4183},{},[4184],{"type":49,"value":3596},{"type":43,"tag":102,"props":4186,"children":4187},{"class":104,"line":948},[4188],{"type":43,"tag":102,"props":4189,"children":4190},{},[4191],{"type":49,"value":4192},") -> FlowQueryResult:\n",{"type":43,"tag":102,"props":4194,"children":4195},{"class":104,"line":956},[4196],{"type":43,"tag":102,"props":4197,"children":4198},{},[4199],{"type":49,"value":4200},"    # .df, .graph (NetworkX DiGraph), .anytree (tree mode)\n",{"type":43,"tag":102,"props":4202,"children":4203},{"class":104,"line":965},[4204],{"type":43,"tag":102,"props":4205,"children":4206},{},[4207],{"type":49,"value":4208},"    # .top_transitions(n), .drop_off_summary()\n",{"type":43,"tag":102,"props":4210,"children":4211},{"class":104,"line":991},[4212],{"type":43,"tag":102,"props":4213,"children":4214},{},[4215],{"type":49,"value":3636},{"type":43,"tag":404,"props":4217,"children":4219},{"id":4218},"user-profile-query",[4220],{"type":49,"value":4221},"User Profile Query",{"type":43,"tag":52,"props":4223,"children":4224},{},[4225,4226,4232],{"type":49,"value":3413},{"type":43,"tag":58,"props":4227,"children":4229},{"className":4228},[],[4230],{"type":49,"value":4231},"python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.query_user",{"type":49,"value":3421},{"type":43,"tag":91,"props":4234,"children":4236},{"className":93,"code":4235,"language":95,"meta":96,"style":96},"def query_user(\n    self,\n    *,\n    where: Filter | list[Filter] | str | None = None,\n    cohort: int | CohortDefinition | None = None,\n    properties: list[str] | None = None,\n    sort_by: str | None = None,\n    sort_order: Literal['ascending', 'descending'] = 'descending',\n    limit: int | None = 1,              # None = fetch all matching\n    search: str | None = None,\n    distinct_id: str | None = None,     # single user lookup\n    distinct_ids: list[str] | None = None,  # batch lookup\n    group_id: str | None = None,        # query group profiles\n    as_of: str | int | None = None,     # point-in-time\n    mode: Literal['profiles', 'aggregate'] = 'aggregate',\n    aggregate: Literal['count', 'extremes', 'percentile', 'numeric_summary'] = 'count',\n    aggregate_property: str | None = None,\n    percentile: float | None = None,\n    segment_by: list[int] | None = None,\n    parallel: bool = False, workers: int = 5,\n    include_all_users: bool = False,\n) -> UserQueryResult:\n    # .df, .total, .profiles\n    ...\n",[4237],{"type":43,"tag":58,"props":4238,"children":4239},{"__ignoreMap":96},[4240,4248,4255,4262,4270,4278,4286,4294,4302,4310,4318,4326,4334,4342,4350,4358,4366,4374,4382,4390,4398,4406,4414,4422],{"type":43,"tag":102,"props":4241,"children":4242},{"class":104,"line":105},[4243],{"type":43,"tag":102,"props":4244,"children":4245},{},[4246],{"type":49,"value":4247},"def query_user(\n",{"type":43,"tag":102,"props":4249,"children":4250},{"class":104,"line":114},[4251],{"type":43,"tag":102,"props":4252,"children":4253},{},[4254],{"type":49,"value":3444},{"type":43,"tag":102,"props":4256,"children":4257},{"class":104,"line":123},[4258],{"type":43,"tag":102,"props":4259,"children":4260},{},[4261],{"type":49,"value":3460},{"type":43,"tag":102,"props":4263,"children":4264},{"class":104,"line":132},[4265],{"type":43,"tag":102,"props":4266,"children":4267},{},[4268],{"type":49,"value":4269},"    where: Filter | list[Filter] | str | None = None,\n",{"type":43,"tag":102,"props":4271,"children":4272},{"class":104,"line":450},[4273],{"type":43,"tag":102,"props":4274,"children":4275},{},[4276],{"type":49,"value":4277},"    cohort: int | CohortDefinition | None = None,\n",{"type":43,"tag":102,"props":4279,"children":4280},{"class":104,"line":459},[4281],{"type":43,"tag":102,"props":4282,"children":4283},{},[4284],{"type":49,"value":4285},"    properties: list[str] | None = None,\n",{"type":43,"tag":102,"props":4287,"children":4288},{"class":104,"line":468},[4289],{"type":43,"tag":102,"props":4290,"children":4291},{},[4292],{"type":49,"value":4293},"    sort_by: str | None = None,\n",{"type":43,"tag":102,"props":4295,"children":4296},{"class":104,"line":477},[4297],{"type":43,"tag":102,"props":4298,"children":4299},{},[4300],{"type":49,"value":4301},"    sort_order: Literal['ascending', 'descending'] = 'descending',\n",{"type":43,"tag":102,"props":4303,"children":4304},{"class":104,"line":486},[4305],{"type":43,"tag":102,"props":4306,"children":4307},{},[4308],{"type":49,"value":4309},"    limit: int | None = 1,              # None = fetch all matching\n",{"type":43,"tag":102,"props":4311,"children":4312},{"class":104,"line":495},[4313],{"type":43,"tag":102,"props":4314,"children":4315},{},[4316],{"type":49,"value":4317},"    search: str | None = None,\n",{"type":43,"tag":102,"props":4319,"children":4320},{"class":104,"line":503},[4321],{"type":43,"tag":102,"props":4322,"children":4323},{},[4324],{"type":49,"value":4325},"    distinct_id: str | None = None,     # single user lookup\n",{"type":43,"tag":102,"props":4327,"children":4328},{"class":104,"line":512},[4329],{"type":43,"tag":102,"props":4330,"children":4331},{},[4332],{"type":49,"value":4333},"    distinct_ids: list[str] | None = None,  # batch lookup\n",{"type":43,"tag":102,"props":4335,"children":4336},{"class":104,"line":521},[4337],{"type":43,"tag":102,"props":4338,"children":4339},{},[4340],{"type":49,"value":4341},"    group_id: str | None = None,        # query group profiles\n",{"type":43,"tag":102,"props":4343,"children":4344},{"class":104,"line":530},[4345],{"type":43,"tag":102,"props":4346,"children":4347},{},[4348],{"type":49,"value":4349},"    as_of: str | int | None = None,     # point-in-time\n",{"type":43,"tag":102,"props":4351,"children":4352},{"class":104,"line":538},[4353],{"type":43,"tag":102,"props":4354,"children":4355},{},[4356],{"type":49,"value":4357},"    mode: Literal['profiles', 'aggregate'] = 'aggregate',\n",{"type":43,"tag":102,"props":4359,"children":4360},{"class":104,"line":547},[4361],{"type":43,"tag":102,"props":4362,"children":4363},{},[4364],{"type":49,"value":4365},"    aggregate: Literal['count', 'extremes', 'percentile', 'numeric_summary'] = 'count',\n",{"type":43,"tag":102,"props":4367,"children":4368},{"class":104,"line":556},[4369],{"type":43,"tag":102,"props":4370,"children":4371},{},[4372],{"type":49,"value":4373},"    aggregate_property: str | None = None,\n",{"type":43,"tag":102,"props":4375,"children":4376},{"class":104,"line":948},[4377],{"type":43,"tag":102,"props":4378,"children":4379},{},[4380],{"type":49,"value":4381},"    percentile: float | None = None,\n",{"type":43,"tag":102,"props":4383,"children":4384},{"class":104,"line":956},[4385],{"type":43,"tag":102,"props":4386,"children":4387},{},[4388],{"type":49,"value":4389},"    segment_by: list[int] | None = None,\n",{"type":43,"tag":102,"props":4391,"children":4392},{"class":104,"line":965},[4393],{"type":43,"tag":102,"props":4394,"children":4395},{},[4396],{"type":49,"value":4397},"    parallel: bool = False, workers: int = 5,\n",{"type":43,"tag":102,"props":4399,"children":4400},{"class":104,"line":991},[4401],{"type":43,"tag":102,"props":4402,"children":4403},{},[4404],{"type":49,"value":4405},"    include_all_users: bool = False,\n",{"type":43,"tag":102,"props":4407,"children":4408},{"class":104,"line":1202},[4409],{"type":43,"tag":102,"props":4410,"children":4411},{},[4412],{"type":49,"value":4413},") -> UserQueryResult:\n",{"type":43,"tag":102,"props":4415,"children":4416},{"class":104,"line":1211},[4417],{"type":43,"tag":102,"props":4418,"children":4419},{},[4420],{"type":49,"value":4421},"    # .df, .total, .profiles\n",{"type":43,"tag":102,"props":4423,"children":4424},{"class":104,"line":1220},[4425],{"type":43,"tag":102,"props":4426,"children":4427},{},[4428],{"type":49,"value":3636},{"type":43,"tag":404,"props":4430,"children":4432},{"id":4431},"build-params-without-executing",[4433],{"type":49,"value":4434},"Build Params (without executing)",{"type":43,"tag":52,"props":4436,"children":4437},{},[4438,4440,4446],{"type":49,"value":4439},"Same parameters as the corresponding query methods, but return ",{"type":43,"tag":58,"props":4441,"children":4443},{"className":4442},[],[4444],{"type":49,"value":4445},"dict[str, Any]",{"type":49,"value":4447}," bookmark params without making an API call. Useful for creating saved reports (bookmarks).",{"type":43,"tag":91,"props":4449,"children":4451},{"className":93,"code":4450,"language":95,"meta":96,"style":96},"def build_params(self, events, **kwargs) -> dict[str, Any]: ...\ndef build_funnel_params(self, steps, **kwargs) -> dict[str, Any]: ...\ndef build_retention_params(self, born_event, return_event, **kwargs) -> dict[str, Any]: ...\ndef build_flow_params(self, event, **kwargs) -> dict[str, Any]: ...\ndef build_user_params(self, **kwargs) -> dict[str, Any]: ...\n",[4452],{"type":43,"tag":58,"props":4453,"children":4454},{"__ignoreMap":96},[4455,4463,4471,4479,4487],{"type":43,"tag":102,"props":4456,"children":4457},{"class":104,"line":105},[4458],{"type":43,"tag":102,"props":4459,"children":4460},{},[4461],{"type":49,"value":4462},"def build_params(self, events, **kwargs) -> dict[str, Any]: ...\n",{"type":43,"tag":102,"props":4464,"children":4465},{"class":104,"line":114},[4466],{"type":43,"tag":102,"props":4467,"children":4468},{},[4469],{"type":49,"value":4470},"def build_funnel_params(self, steps, **kwargs) -> dict[str, Any]: ...\n",{"type":43,"tag":102,"props":4472,"children":4473},{"class":104,"line":123},[4474],{"type":43,"tag":102,"props":4475,"children":4476},{},[4477],{"type":49,"value":4478},"def build_retention_params(self, born_event, return_event, **kwargs) -> dict[str, Any]: ...\n",{"type":43,"tag":102,"props":4480,"children":4481},{"class":104,"line":132},[4482],{"type":43,"tag":102,"props":4483,"children":4484},{},[4485],{"type":49,"value":4486},"def build_flow_params(self, event, **kwargs) -> dict[str, Any]: ...\n",{"type":43,"tag":102,"props":4488,"children":4489},{"class":104,"line":450},[4490],{"type":43,"tag":102,"props":4491,"children":4492},{},[4493],{"type":49,"value":4494},"def build_user_params(self, **kwargs) -> dict[str, Any]: ...\n",{"type":43,"tag":404,"props":4496,"children":4498},{"id":4497},"multi-step-analysis-patterns",[4499],{"type":49,"value":4500},"Multi-Step Analysis Patterns",{"type":43,"tag":52,"props":4502,"children":4503},{},[4504],{"type":49,"value":4505},"Every query engine has parameters that look like simple settings but are actually analytical choices with outsized influence on results. Before running any query, apply these principles:",{"type":43,"tag":1404,"props":4507,"children":4510},{"className":4508},[4509],"contains-task-list",[4511,4529,4544,4574,4589,4626],{"type":43,"tag":1408,"props":4512,"children":4515},{"className":4513},[4514],"task-list-item",[4516,4521,4522,4527],{"type":43,"tag":4517,"props":4518,"children":4520},"input",{"disabled":444,"type":4519},"checkbox",[],{"type":49,"value":1926},{"type":43,"tag":357,"props":4523,"children":4524},{},[4525],{"type":49,"value":4526},"Find the master dial.",{"type":49,"value":4528}," Each engine has one parameter (or small set) that reshapes all downstream metrics. Changing it changes the story. Know which parameter it is and choose deliberately — don't accept defaults blindly.",{"type":43,"tag":1408,"props":4530,"children":4532},{"className":4531},[4514],[4533,4536,4537,4542],{"type":43,"tag":4517,"props":4534,"children":4535},{"disabled":444,"type":4519},[],{"type":49,"value":1926},{"type":43,"tag":357,"props":4538,"children":4539},{},[4540],{"type":49,"value":4541},"Match parameters to the domain.",{"type":49,"value":4543}," There are no universal \"correct\" values. A social app needs daily retention; a B2B SaaS needs monthly. A food-ordering funnel needs a 1-hour window; an onboarding funnel needs 14 days. The product's natural usage cadence dictates the setting.",{"type":43,"tag":1408,"props":4545,"children":4547},{"className":4546},[4514],[4548,4551,4552,4557,4559,4565,4566,4572],{"type":43,"tag":4517,"props":4549,"children":4550},{"disabled":444,"type":4519},[],{"type":49,"value":1926},{"type":43,"tag":357,"props":4553,"children":4554},{},[4555],{"type":49,"value":4556},"Distrust averages.",{"type":49,"value":4558}," Averages include outliers — one extreme value distorts the whole metric. Use medians (",{"type":43,"tag":58,"props":4560,"children":4562},{"className":4561},[],[4563],{"type":49,"value":4564},"math='median'",{"type":49,"value":1451},{"type":43,"tag":58,"props":4567,"children":4569},{"className":4568},[],[4570],{"type":49,"value":4571},"percentile=50",{"type":49,"value":4573},") to see what's typical. If the mean and median diverge, the distribution is skewed and the mean is misleading.",{"type":43,"tag":1408,"props":4575,"children":4577},{"className":4576},[4514],[4578,4581,4582,4587],{"type":43,"tag":4517,"props":4579,"children":4580},{"disabled":444,"type":4519},[],{"type":49,"value":1926},{"type":43,"tag":357,"props":4583,"children":4584},{},[4585],{"type":49,"value":4586},"Counting methodology is a modeling choice.",{"type":49,"value":4588}," \"Unique users,\" \"total events,\" and \"sessions\" aren't just modes — they answer fundamentally different questions. \"How many people?\" vs \"How much activity?\" vs \"How many engagement moments?\" Choose the counting method that matches the business question.",{"type":43,"tag":1408,"props":4590,"children":4592},{"className":4591},[4514],[4593,4596,4597,4602,4604,4609,4610,4616,4618,4624],{"type":43,"tag":4517,"props":4594,"children":4595},{"disabled":444,"type":4519},[],{"type":49,"value":1926},{"type":43,"tag":357,"props":4598,"children":4599},{},[4600],{"type":49,"value":4601},"Know the silent defaults.",{"type":49,"value":4603}," Parameters are sometimes silently ignored (e.g., ",{"type":43,"tag":58,"props":4605,"children":4607},{"className":4606},[],[4608],{"type":49,"value":620},{"type":49,"value":1517},{"type":43,"tag":58,"props":4611,"children":4613},{"className":4612},[],[4614],{"type":49,"value":4615},"math='unique'",{"type":49,"value":4617},"), silently constraining (e.g., no funnel re-entry by default), or silently inflating (e.g., ",{"type":43,"tag":58,"props":4619,"children":4621},{"className":4620},[],[4622],{"type":49,"value":4623},"unbounded_mode='carry_forward'",{"type":49,"value":4625}," in retention). If results look surprising, check whether a default is shaping them.",{"type":43,"tag":1408,"props":4627,"children":4629},{"className":4628},[4514],[4630,4633,4634,4639],{"type":43,"tag":4517,"props":4631,"children":4632},{"disabled":444,"type":4519},[],{"type":49,"value":1926},{"type":43,"tag":357,"props":4635,"children":4636},{},[4637],{"type":49,"value":4638},"Sweep, don't guess.",{"type":49,"value":4640}," When unsure which parameter value to use, try several and observe how metrics shift. Where the metric stabilizes or diverges reveals the true signal. The code examples below demonstrate this for each engine.",{"type":43,"tag":4642,"props":4643,"children":4645},"h4",{"id":4644},"comparing-segments-across-multiple-dimensions",[4646],{"type":49,"value":4647},"Comparing Segments Across Multiple Dimensions",{"type":43,"tag":52,"props":4649,"children":4650},{},[4651],{"type":49,"value":4652},"When a single breakdown shows a difference, verify it holds across dimensions:",{"type":43,"tag":91,"props":4654,"children":4656},{"className":93,"code":4655,"language":95,"meta":96,"style":96},"# Step 1: Find the interesting segment\nresult = ws.query(event, math='average', math_property='order_total',\n                   group_by='deal_sweet_spot', last=90, mode='total')\n# Found: deal_sweet_spot=true has 37% higher AOV\n\n# Step 2: Check if it holds across another dimension\nresult = ws.query(event, math='average', math_property='order_total',\n                   group_by=['deal_sweet_spot', 'platform'], last=90, mode='total')\n# Does the sweet spot hold for both iOS and Android?\n\n# Step 3: Check segment rates across a third dimension\nresult = ws.query(event, math='unique',\n                   group_by=['loyalty_tier', 'deal_sweet_spot'], last=90, mode='total')\n# Which tier is most likely to achieve the sweet spot?\n",[4657],{"type":43,"tag":58,"props":4658,"children":4659},{"__ignoreMap":96},[4660,4668,4676,4684,4692,4699,4707,4714,4722,4730,4737,4745,4753,4761],{"type":43,"tag":102,"props":4661,"children":4662},{"class":104,"line":105},[4663],{"type":43,"tag":102,"props":4664,"children":4665},{},[4666],{"type":49,"value":4667},"# Step 1: Find the interesting segment\n",{"type":43,"tag":102,"props":4669,"children":4670},{"class":104,"line":114},[4671],{"type":43,"tag":102,"props":4672,"children":4673},{},[4674],{"type":49,"value":4675},"result = ws.query(event, math='average', math_property='order_total',\n",{"type":43,"tag":102,"props":4677,"children":4678},{"class":104,"line":123},[4679],{"type":43,"tag":102,"props":4680,"children":4681},{},[4682],{"type":49,"value":4683},"                   group_by='deal_sweet_spot', last=90, mode='total')\n",{"type":43,"tag":102,"props":4685,"children":4686},{"class":104,"line":132},[4687],{"type":43,"tag":102,"props":4688,"children":4689},{},[4690],{"type":49,"value":4691},"# Found: deal_sweet_spot=true has 37% higher AOV\n",{"type":43,"tag":102,"props":4693,"children":4694},{"class":104,"line":450},[4695],{"type":43,"tag":102,"props":4696,"children":4697},{"emptyLinePlaceholder":444},[4698],{"type":49,"value":447},{"type":43,"tag":102,"props":4700,"children":4701},{"class":104,"line":459},[4702],{"type":43,"tag":102,"props":4703,"children":4704},{},[4705],{"type":49,"value":4706},"# Step 2: Check if it holds across another dimension\n",{"type":43,"tag":102,"props":4708,"children":4709},{"class":104,"line":468},[4710],{"type":43,"tag":102,"props":4711,"children":4712},{},[4713],{"type":49,"value":4675},{"type":43,"tag":102,"props":4715,"children":4716},{"class":104,"line":477},[4717],{"type":43,"tag":102,"props":4718,"children":4719},{},[4720],{"type":49,"value":4721},"                   group_by=['deal_sweet_spot', 'platform'], last=90, mode='total')\n",{"type":43,"tag":102,"props":4723,"children":4724},{"class":104,"line":486},[4725],{"type":43,"tag":102,"props":4726,"children":4727},{},[4728],{"type":49,"value":4729},"# Does the sweet spot hold for both iOS and Android?\n",{"type":43,"tag":102,"props":4731,"children":4732},{"class":104,"line":495},[4733],{"type":43,"tag":102,"props":4734,"children":4735},{"emptyLinePlaceholder":444},[4736],{"type":49,"value":447},{"type":43,"tag":102,"props":4738,"children":4739},{"class":104,"line":503},[4740],{"type":43,"tag":102,"props":4741,"children":4742},{},[4743],{"type":49,"value":4744},"# Step 3: Check segment rates across a third dimension\n",{"type":43,"tag":102,"props":4746,"children":4747},{"class":104,"line":512},[4748],{"type":43,"tag":102,"props":4749,"children":4750},{},[4751],{"type":49,"value":4752},"result = ws.query(event, math='unique',\n",{"type":43,"tag":102,"props":4754,"children":4755},{"class":104,"line":521},[4756],{"type":43,"tag":102,"props":4757,"children":4758},{},[4759],{"type":49,"value":4760},"                   group_by=['loyalty_tier', 'deal_sweet_spot'], last=90, mode='total')\n",{"type":43,"tag":102,"props":4762,"children":4763},{"class":104,"line":530},[4764],{"type":43,"tag":102,"props":4765,"children":4766},{},[4767],{"type":49,"value":4768},"# Which tier is most likely to achieve the sweet spot?\n",{"type":43,"tag":4642,"props":4770,"children":4772},{"id":4771},"insights-analysis-mathtype-per-user-and-the-unit-of-analysis",[4773],{"type":49,"value":4774},"Insights Analysis: MathType, Per-User, and the Unit of Analysis",{"type":43,"tag":52,"props":4776,"children":4777},{},[4778,4783,4785,4790,4792,4798,4800,4806,4808,4814,4816,4822,4824,4830,4831,4837,4839,4844,4845,4851,4852,4857,4859,4864,4866,4871],{"type":43,"tag":357,"props":4779,"children":4780},{},[4781],{"type":49,"value":4782},"MathType is the most critical Insights parameter.",{"type":49,"value":4784}," It defines what you're counting — ",{"type":43,"tag":58,"props":4786,"children":4788},{"className":4787},[],[4789],{"type":49,"value":1494},{"type":49,"value":4791}," (event volume), ",{"type":43,"tag":58,"props":4793,"children":4795},{"className":4794},[],[4796],{"type":49,"value":4797},"unique",{"type":49,"value":4799}," (user reach), ",{"type":43,"tag":58,"props":4801,"children":4803},{"className":4802},[],[4804],{"type":49,"value":4805},"dau\u002Fwau\u002Fmau",{"type":49,"value":4807}," (time-bounded engagement), ",{"type":43,"tag":58,"props":4809,"children":4811},{"className":4810},[],[4812],{"type":49,"value":4813},"average\u002Fmedian\u002Fpercentile",{"type":49,"value":4815}," (property distributions), ",{"type":43,"tag":58,"props":4817,"children":4819},{"className":4818},[],[4820],{"type":49,"value":4821},"sum",{"type":49,"value":4823}," (revenue totals). Choosing the wrong MathType answers the wrong question silently. Match MathType to the business question: engagement → ",{"type":43,"tag":58,"props":4825,"children":4827},{"className":4826},[],[4828],{"type":49,"value":4829},"dau",{"type":49,"value":614},{"type":43,"tag":58,"props":4832,"children":4834},{"className":4833},[],[4835],{"type":49,"value":4836},"wau",{"type":49,"value":4838},"; revenue → ",{"type":43,"tag":58,"props":4840,"children":4842},{"className":4841},[],[4843],{"type":49,"value":4821},{"type":49,"value":614},{"type":43,"tag":58,"props":4846,"children":4848},{"className":4847},[],[4849],{"type":49,"value":4850},"average",{"type":49,"value":1517},{"type":43,"tag":58,"props":4853,"children":4855},{"className":4854},[],[4856],{"type":49,"value":620},{"type":49,"value":4858},"; adoption → ",{"type":43,"tag":58,"props":4860,"children":4862},{"className":4861},[],[4863],{"type":49,"value":4797},{"type":49,"value":4865},"; intensity → ",{"type":43,"tag":58,"props":4867,"children":4869},{"className":4868},[],[4870],{"type":49,"value":1494},{"type":49,"value":1916},{"type":43,"tag":52,"props":4873,"children":4874},{},[4875,4880,4882,4888,4889,4894],{"type":43,"tag":357,"props":4876,"children":4877},{},[4878],{"type":49,"value":4879},"Per-user aggregation is a two-stage process",{"type":49,"value":4881}," that fundamentally changes the unit of analysis. ",{"type":43,"tag":58,"props":4883,"children":4885},{"className":4884},[],[4886],{"type":49,"value":4887},"per_user='average'",{"type":49,"value":1517},{"type":43,"tag":58,"props":4890,"children":4892},{"className":4891},[],[4893],{"type":49,"value":1508},{"type":49,"value":4895}," first computes each user's average, then averages across users. This is NOT the same as a global average — a power user with 1000 events and a casual user with 2 events contribute equally. This is often the right choice (prevents power users from dominating) but it changes the story dramatically:",{"type":43,"tag":91,"props":4897,"children":4899},{"className":93,"code":4898,"language":95,"meta":96,"style":96},"# Sweep MathTypes to understand an event from multiple angles\nevent = 'Purchase'  # use a real event name\nprop = 'order_total'  # use a real numeric property\n\nfor mt in ['total', 'unique', 'dau', 'average', 'median', 'sum']:\n    kwargs = {'math': mt, 'last': 30, 'mode': 'total'}\n    if mt in ('average', 'median', 'sum'):\n        kwargs['math_property'] = prop\n    result = ws.query(event, **kwargs)\n    print(f\"{mt:>10}: {result.df['count'].iloc[0]:>12,.2f}\")\n# total = event volume, unique = user reach, dau = daily engagement,\n# average\u002Fmedian = typical transaction, sum = total revenue\n\n# Per-user aggregation: compare global average vs per-user average\nglobal_avg = ws.query(event, math='average', math_property=prop, last=30, mode='total')\nper_user_avg = ws.query(event, math='average', math_property=prop,\n                         per_user='average', last=30, mode='total')\nprint(f\"Global avg: {global_avg.df['count'].iloc[0]:.2f}\")\nprint(f\"Per-user avg: {per_user_avg.df['count'].iloc[0]:.2f}\")\n# If these differ significantly, power users are skewing the global average\n",[4900],{"type":43,"tag":58,"props":4901,"children":4902},{"__ignoreMap":96},[4903,4911,4919,4927,4934,4942,4950,4958,4966,4974,4982,4990,4998,5005,5013,5021,5029,5037,5045,5053],{"type":43,"tag":102,"props":4904,"children":4905},{"class":104,"line":105},[4906],{"type":43,"tag":102,"props":4907,"children":4908},{},[4909],{"type":49,"value":4910},"# Sweep MathTypes to understand an event from multiple angles\n",{"type":43,"tag":102,"props":4912,"children":4913},{"class":104,"line":114},[4914],{"type":43,"tag":102,"props":4915,"children":4916},{},[4917],{"type":49,"value":4918},"event = 'Purchase'  # use a real event name\n",{"type":43,"tag":102,"props":4920,"children":4921},{"class":104,"line":123},[4922],{"type":43,"tag":102,"props":4923,"children":4924},{},[4925],{"type":49,"value":4926},"prop = 'order_total'  # use a real numeric property\n",{"type":43,"tag":102,"props":4928,"children":4929},{"class":104,"line":132},[4930],{"type":43,"tag":102,"props":4931,"children":4932},{"emptyLinePlaceholder":444},[4933],{"type":49,"value":447},{"type":43,"tag":102,"props":4935,"children":4936},{"class":104,"line":450},[4937],{"type":43,"tag":102,"props":4938,"children":4939},{},[4940],{"type":49,"value":4941},"for mt in ['total', 'unique', 'dau', 'average', 'median', 'sum']:\n",{"type":43,"tag":102,"props":4943,"children":4944},{"class":104,"line":459},[4945],{"type":43,"tag":102,"props":4946,"children":4947},{},[4948],{"type":49,"value":4949},"    kwargs = {'math': mt, 'last': 30, 'mode': 'total'}\n",{"type":43,"tag":102,"props":4951,"children":4952},{"class":104,"line":468},[4953],{"type":43,"tag":102,"props":4954,"children":4955},{},[4956],{"type":49,"value":4957},"    if mt in ('average', 'median', 'sum'):\n",{"type":43,"tag":102,"props":4959,"children":4960},{"class":104,"line":477},[4961],{"type":43,"tag":102,"props":4962,"children":4963},{},[4964],{"type":49,"value":4965},"        kwargs['math_property'] = prop\n",{"type":43,"tag":102,"props":4967,"children":4968},{"class":104,"line":486},[4969],{"type":43,"tag":102,"props":4970,"children":4971},{},[4972],{"type":49,"value":4973},"    result = ws.query(event, **kwargs)\n",{"type":43,"tag":102,"props":4975,"children":4976},{"class":104,"line":495},[4977],{"type":43,"tag":102,"props":4978,"children":4979},{},[4980],{"type":49,"value":4981},"    print(f\"{mt:>10}: {result.df['count'].iloc[0]:>12,.2f}\")\n",{"type":43,"tag":102,"props":4983,"children":4984},{"class":104,"line":503},[4985],{"type":43,"tag":102,"props":4986,"children":4987},{},[4988],{"type":49,"value":4989},"# total = event volume, unique = user reach, dau = daily engagement,\n",{"type":43,"tag":102,"props":4991,"children":4992},{"class":104,"line":512},[4993],{"type":43,"tag":102,"props":4994,"children":4995},{},[4996],{"type":49,"value":4997},"# average\u002Fmedian = typical transaction, sum = total revenue\n",{"type":43,"tag":102,"props":4999,"children":5000},{"class":104,"line":521},[5001],{"type":43,"tag":102,"props":5002,"children":5003},{"emptyLinePlaceholder":444},[5004],{"type":49,"value":447},{"type":43,"tag":102,"props":5006,"children":5007},{"class":104,"line":530},[5008],{"type":43,"tag":102,"props":5009,"children":5010},{},[5011],{"type":49,"value":5012},"# Per-user aggregation: compare global average vs per-user average\n",{"type":43,"tag":102,"props":5014,"children":5015},{"class":104,"line":538},[5016],{"type":43,"tag":102,"props":5017,"children":5018},{},[5019],{"type":49,"value":5020},"global_avg = ws.query(event, math='average', math_property=prop, last=30, mode='total')\n",{"type":43,"tag":102,"props":5022,"children":5023},{"class":104,"line":547},[5024],{"type":43,"tag":102,"props":5025,"children":5026},{},[5027],{"type":49,"value":5028},"per_user_avg = ws.query(event, math='average', math_property=prop,\n",{"type":43,"tag":102,"props":5030,"children":5031},{"class":104,"line":556},[5032],{"type":43,"tag":102,"props":5033,"children":5034},{},[5035],{"type":49,"value":5036},"                         per_user='average', last=30, mode='total')\n",{"type":43,"tag":102,"props":5038,"children":5039},{"class":104,"line":948},[5040],{"type":43,"tag":102,"props":5041,"children":5042},{},[5043],{"type":49,"value":5044},"print(f\"Global avg: {global_avg.df['count'].iloc[0]:.2f}\")\n",{"type":43,"tag":102,"props":5046,"children":5047},{"class":104,"line":956},[5048],{"type":43,"tag":102,"props":5049,"children":5050},{},[5051],{"type":49,"value":5052},"print(f\"Per-user avg: {per_user_avg.df['count'].iloc[0]:.2f}\")\n",{"type":43,"tag":102,"props":5054,"children":5055},{"class":104,"line":965},[5056],{"type":43,"tag":102,"props":5057,"children":5058},{},[5059],{"type":49,"value":5060},"# If these differ significantly, power users are skewing the global average\n",{"type":43,"tag":52,"props":5062,"children":5063},{},[5064,5069,5071,5076,5077,5082,5084,5090,5091,5097],{"type":43,"tag":357,"props":5065,"children":5066},{},[5067],{"type":49,"value":5068},"Prefer medians over averages for property distributions",{"type":49,"value":5070}," — same principle as funnel time-to-convert. Use ",{"type":43,"tag":58,"props":5072,"children":5074},{"className":5073},[],[5075],{"type":49,"value":4564},{"type":49,"value":2182},{"type":43,"tag":58,"props":5078,"children":5080},{"className":5079},[],[5081],{"type":49,"value":1508},{"type":49,"value":5083},", or ",{"type":43,"tag":58,"props":5085,"children":5087},{"className":5086},[],[5088],{"type":49,"value":5089},"math='percentile'",{"type":49,"value":1517},{"type":43,"tag":58,"props":5092,"children":5094},{"className":5093},[],[5095],{"type":49,"value":5096},"percentile_value=50",{"type":49,"value":5098},". Averages include outliers; medians reveal what's typical.",{"type":43,"tag":52,"props":5100,"children":5101},{},[5102,5107,5108,5113,5115,5120,5122,5127,5129,5135,5137,5143,5145,5151],{"type":43,"tag":357,"props":5103,"children":5104},{},[5105],{"type":49,"value":5106},"Silent traps:",{"type":49,"value":1926},{"type":43,"tag":58,"props":5109,"children":5111},{"className":5110},[],[5112],{"type":49,"value":620},{"type":49,"value":5114}," is silently ignored with non-property MathType (e.g., ",{"type":43,"tag":58,"props":5116,"children":5118},{"className":5117},[],[5119],{"type":49,"value":4615},{"type":49,"value":5121}," discards ",{"type":43,"tag":58,"props":5123,"children":5125},{"className":5124},[],[5126],{"type":49,"value":620},{"type":49,"value":5128},"). ",{"type":43,"tag":58,"props":5130,"children":5132},{"className":5131},[],[5133],{"type":49,"value":5134},"rolling",{"type":49,"value":5136}," reduces data point count without warning (a 30-day rolling window over 59 days produces ~29 points, not 59). ",{"type":43,"tag":58,"props":5138,"children":5140},{"className":5139},[],[5141],{"type":49,"value":5142},"unit",{"type":49,"value":5144}," is silently ignored in ",{"type":43,"tag":58,"props":5146,"children":5148},{"className":5147},[],[5149],{"type":49,"value":5150},"mode='total'",{"type":49,"value":1916},{"type":43,"tag":4642,"props":5153,"children":5155},{"id":5154},"funnel-analysis-windows-modes-and-time",[5156],{"type":49,"value":5157},"Funnel Analysis: Windows, Modes, and Time",{"type":43,"tag":52,"props":5159,"children":5160},{},[5161,5163,5169,5170,5176],{"type":49,"value":5162},"Funnel queries return time data in step metadata columns (",{"type":43,"tag":58,"props":5164,"children":5166},{"className":5165},[],[5167],{"type":49,"value":5168},"avg_time",{"type":49,"value":1451},{"type":43,"tag":58,"props":5171,"children":5173},{"className":5172},[],[5174],{"type":49,"value":5175},"avg_time_from_start",{"type":49,"value":5177},") alongside conversion rates.",{"type":43,"tag":52,"props":5179,"children":5180},{},[5181,5186],{"type":43,"tag":357,"props":5182,"children":5183},{},[5184],{"type":49,"value":5185},"Conversion window is the most critical funnel parameter.",{"type":49,"value":5187}," It defines the maximum time a user has to complete the funnel from their first step. It affects every other metric — conversion rate, time-to-convert, and segment comparisons all shift dramatically with window size.",{"type":43,"tag":52,"props":5189,"children":5190},{},[5191,5196],{"type":43,"tag":357,"props":5192,"children":5193},{},[5194],{"type":49,"value":5195},"Choosing a window:",{"type":49,"value":5197}," Match it to the user journey being measured. Short funnels (ordering food, adding to cart) need tight windows — hours, not days. Long funnels (onboarding, subscription purchase) need wider windows — days or weeks. When unsure, experiment:",{"type":43,"tag":91,"props":5199,"children":5201},{"className":93,"code":5200,"language":95,"meta":96,"style":96},"# Try progressively tighter windows to find where signal emerges\nfor window, unit in [(14, 'day'), (7, 'day'), (1, 'day'), (12, 'hour'), (6, 'hour')]:\n    result = ws.query_funnel(steps, last=90,\n        conversion_window=window, conversion_window_unit=unit)\n    final = result.df[result.df['step'] == result.df['step'].max()].iloc[0]\n    print(f\"{window}{unit}: conv={final['overall_conv_ratio']:.3f} \"\n          f\"time={final['avg_time_from_start']\u002F3600:.1f}h\")\n# Look for: conversion stabilizing, time differences appearing at tighter windows\n",[5202],{"type":43,"tag":58,"props":5203,"children":5204},{"__ignoreMap":96},[5205,5213,5221,5229,5237,5245,5253,5261],{"type":43,"tag":102,"props":5206,"children":5207},{"class":104,"line":105},[5208],{"type":43,"tag":102,"props":5209,"children":5210},{},[5211],{"type":49,"value":5212},"# Try progressively tighter windows to find where signal emerges\n",{"type":43,"tag":102,"props":5214,"children":5215},{"class":104,"line":114},[5216],{"type":43,"tag":102,"props":5217,"children":5218},{},[5219],{"type":49,"value":5220},"for window, unit in [(14, 'day'), (7, 'day'), (1, 'day'), (12, 'hour'), (6, 'hour')]:\n",{"type":43,"tag":102,"props":5222,"children":5223},{"class":104,"line":123},[5224],{"type":43,"tag":102,"props":5225,"children":5226},{},[5227],{"type":49,"value":5228},"    result = ws.query_funnel(steps, last=90,\n",{"type":43,"tag":102,"props":5230,"children":5231},{"class":104,"line":132},[5232],{"type":43,"tag":102,"props":5233,"children":5234},{},[5235],{"type":49,"value":5236},"        conversion_window=window, conversion_window_unit=unit)\n",{"type":43,"tag":102,"props":5238,"children":5239},{"class":104,"line":450},[5240],{"type":43,"tag":102,"props":5241,"children":5242},{},[5243],{"type":49,"value":5244},"    final = result.df[result.df['step'] == result.df['step'].max()].iloc[0]\n",{"type":43,"tag":102,"props":5246,"children":5247},{"class":104,"line":459},[5248],{"type":43,"tag":102,"props":5249,"children":5250},{},[5251],{"type":49,"value":5252},"    print(f\"{window}{unit}: conv={final['overall_conv_ratio']:.3f} \"\n",{"type":43,"tag":102,"props":5254,"children":5255},{"class":104,"line":468},[5256],{"type":43,"tag":102,"props":5257,"children":5258},{},[5259],{"type":49,"value":5260},"          f\"time={final['avg_time_from_start']\u002F3600:.1f}h\")\n",{"type":43,"tag":102,"props":5262,"children":5263},{"class":104,"line":477},[5264],{"type":43,"tag":102,"props":5265,"children":5266},{},[5267],{"type":49,"value":5268},"# Look for: conversion stabilizing, time differences appearing at tighter windows\n",{"type":43,"tag":52,"props":5270,"children":5271},{},[5272,5277],{"type":43,"tag":357,"props":5273,"children":5274},{},[5275],{"type":49,"value":5276},"Conversion counting modes",{"type":49,"value":5278}," change what \"conversion\" means:",{"type":43,"tag":1404,"props":5280,"children":5281},{},[5282,5293,5304],{"type":43,"tag":1408,"props":5283,"children":5284},{},[5285,5291],{"type":43,"tag":58,"props":5286,"children":5288},{"className":5287},[],[5289],{"type":49,"value":5290},"conversion_rate_unique",{"type":49,"value":5292}," (default): unique users who completed. No re-entry — first attempt in the window or out.",{"type":43,"tag":1408,"props":5294,"children":5295},{},[5296,5302],{"type":43,"tag":58,"props":5297,"children":5299},{"className":5298},[],[5300],{"type":49,"value":5301},"conversion_rate_total",{"type":49,"value":5303},": total completions. One user can count multiple times.",{"type":43,"tag":1408,"props":5305,"children":5306},{},[5307,5309,5315,5316,5322],{"type":49,"value":5308},"Combine with ",{"type":43,"tag":58,"props":5310,"children":5312},{"className":5311},[],[5313],{"type":49,"value":5314},"reentry_mode='basic'",{"type":49,"value":614},{"type":43,"tag":58,"props":5317,"children":5319},{"className":5318},[],[5320],{"type":49,"value":5321},"reentry_mode='optimized'",{"type":49,"value":5323}," for multiple attempts. Optimized re-entry picks the best completion path.",{"type":43,"tag":52,"props":5325,"children":5326},{},[5327,5332],{"type":43,"tag":357,"props":5328,"children":5329},{},[5330],{"type":49,"value":5331},"Time-to-convert: prefer medians over averages.",{"type":49,"value":5333}," Average time includes outliers — one slow user inflates the average; one fast user pulls it down. Use median or percentiles for true speed trends:",{"type":43,"tag":91,"props":5335,"children":5337},{"className":93,"code":5336,"language":95,"meta":96,"style":96},"# Median time via funnel math\nresult = ws.query_funnel(steps, last=90, math='median')\n\n# Compare segments with filtered funnels + tight window\nios = ws.query_funnel(steps, where=Filter.equals('platform', 'iOS'),\n    last=90, conversion_window=6, conversion_window_unit='hour')\nandroid = ws.query_funnel(steps, where=Filter.equals('platform', 'Android'),\n    last=90, conversion_window=6, conversion_window_unit='hour')\n# Compare avg_time_from_start on matching steps\n",[5338],{"type":43,"tag":58,"props":5339,"children":5340},{"__ignoreMap":96},[5341,5349,5357,5364,5372,5380,5388,5396,5403],{"type":43,"tag":102,"props":5342,"children":5343},{"class":104,"line":105},[5344],{"type":43,"tag":102,"props":5345,"children":5346},{},[5347],{"type":49,"value":5348},"# Median time via funnel math\n",{"type":43,"tag":102,"props":5350,"children":5351},{"class":104,"line":114},[5352],{"type":43,"tag":102,"props":5353,"children":5354},{},[5355],{"type":49,"value":5356},"result = ws.query_funnel(steps, last=90, math='median')\n",{"type":43,"tag":102,"props":5358,"children":5359},{"class":104,"line":123},[5360],{"type":43,"tag":102,"props":5361,"children":5362},{"emptyLinePlaceholder":444},[5363],{"type":49,"value":447},{"type":43,"tag":102,"props":5365,"children":5366},{"class":104,"line":132},[5367],{"type":43,"tag":102,"props":5368,"children":5369},{},[5370],{"type":49,"value":5371},"# Compare segments with filtered funnels + tight window\n",{"type":43,"tag":102,"props":5373,"children":5374},{"class":104,"line":450},[5375],{"type":43,"tag":102,"props":5376,"children":5377},{},[5378],{"type":49,"value":5379},"ios = ws.query_funnel(steps, where=Filter.equals('platform', 'iOS'),\n",{"type":43,"tag":102,"props":5381,"children":5382},{"class":104,"line":459},[5383],{"type":43,"tag":102,"props":5384,"children":5385},{},[5386],{"type":49,"value":5387},"    last=90, conversion_window=6, conversion_window_unit='hour')\n",{"type":43,"tag":102,"props":5389,"children":5390},{"class":104,"line":468},[5391],{"type":43,"tag":102,"props":5392,"children":5393},{},[5394],{"type":49,"value":5395},"android = ws.query_funnel(steps, where=Filter.equals('platform', 'Android'),\n",{"type":43,"tag":102,"props":5397,"children":5398},{"class":104,"line":477},[5399],{"type":43,"tag":102,"props":5400,"children":5401},{},[5402],{"type":49,"value":5387},{"type":43,"tag":102,"props":5404,"children":5405},{"class":104,"line":486},[5406],{"type":43,"tag":102,"props":5407,"children":5408},{},[5409],{"type":49,"value":5410},"# Compare avg_time_from_start on matching steps\n",{"type":43,"tag":52,"props":5412,"children":5413},{},[5414,5419],{"type":43,"tag":357,"props":5415,"children":5416},{},[5417],{"type":49,"value":5418},"When comparing segments across funnels:",{"type":49,"value":5420}," always try at least 2-3 conversion windows. A difference invisible at 14 days may be stark at 6 hours. This is especially true for speed comparisons — tighter windows filter out noise and reveal which segment completes faster.",{"type":43,"tag":52,"props":5422,"children":5423},{},[5424,5435,5436,5442,5444,5450],{"type":43,"tag":357,"props":5425,"children":5426},{},[5427,5433],{"type":43,"tag":58,"props":5428,"children":5430},{"className":5429},[],[5431],{"type":49,"value":5432},"order",{"type":49,"value":5434}," changes what \"conversion\" means.",{"type":49,"value":1926},{"type":43,"tag":58,"props":5437,"children":5439},{"className":5438},[],[5440],{"type":49,"value":5441},"'loose'",{"type":49,"value":5443}," (default) requires steps in sequence but allows other events between them. ",{"type":43,"tag":58,"props":5445,"children":5447},{"className":5446},[],[5448],{"type":49,"value":5449},"'any'",{"type":49,"value":5451}," requires all steps in any order — a user who does C→B→A counts as converting. The difference is dramatic: loose funnels measure sequential workflows; any-order funnels measure feature adoption breadth. When unsure, run both and compare:",{"type":43,"tag":91,"props":5453,"children":5455},{"className":93,"code":5454,"language":95,"meta":96,"style":96},"# order='loose' vs 'any' — same steps, fundamentally different questions\nfor ord in ['loose', 'any']:\n    result = ws.query_funnel(steps, last=90, order=ord)\n    print(f\"order={ord}: {result.overall_conversion_rate:.3f}\")\n# If 'any' >> 'loose', users are completing all steps but not in the expected order\n# This often reveals UX issues — users accomplish the goal but not via the designed path\n",[5456],{"type":43,"tag":58,"props":5457,"children":5458},{"__ignoreMap":96},[5459,5467,5475,5483,5491,5499],{"type":43,"tag":102,"props":5460,"children":5461},{"class":104,"line":105},[5462],{"type":43,"tag":102,"props":5463,"children":5464},{},[5465],{"type":49,"value":5466},"# order='loose' vs 'any' — same steps, fundamentally different questions\n",{"type":43,"tag":102,"props":5468,"children":5469},{"class":104,"line":114},[5470],{"type":43,"tag":102,"props":5471,"children":5472},{},[5473],{"type":49,"value":5474},"for ord in ['loose', 'any']:\n",{"type":43,"tag":102,"props":5476,"children":5477},{"class":104,"line":123},[5478],{"type":43,"tag":102,"props":5479,"children":5480},{},[5481],{"type":49,"value":5482},"    result = ws.query_funnel(steps, last=90, order=ord)\n",{"type":43,"tag":102,"props":5484,"children":5485},{"class":104,"line":132},[5486],{"type":43,"tag":102,"props":5487,"children":5488},{},[5489],{"type":49,"value":5490},"    print(f\"order={ord}: {result.overall_conversion_rate:.3f}\")\n",{"type":43,"tag":102,"props":5492,"children":5493},{"class":104,"line":450},[5494],{"type":43,"tag":102,"props":5495,"children":5496},{},[5497],{"type":49,"value":5498},"# If 'any' >> 'loose', users are completing all steps but not in the expected order\n",{"type":43,"tag":102,"props":5500,"children":5501},{"class":104,"line":459},[5502],{"type":43,"tag":102,"props":5503,"children":5504},{},[5505],{"type":49,"value":5506},"# This often reveals UX issues — users accomplish the goal but not via the designed path\n",{"type":43,"tag":52,"props":5508,"children":5509},{},[5510,5521,5523,5529,5530,5536],{"type":43,"tag":357,"props":5511,"children":5512},{},[5513,5519],{"type":43,"tag":58,"props":5514,"children":5516},{"className":5515},[],[5517],{"type":49,"value":5518},"holding_constant",{"type":49,"value":5520}," isolates cross-step consistency.",{"type":49,"value":5522}," Hold a property like ",{"type":43,"tag":58,"props":5524,"children":5526},{"className":5525},[],[5527],{"type":49,"value":5528},"'platform'",{"type":49,"value":614},{"type":43,"tag":58,"props":5531,"children":5533},{"className":5532},[],[5534],{"type":49,"value":5535},"'device_id'",{"type":49,"value":5537}," constant and users who change values between steps (e.g., sign up on iOS, purchase on Android) are excluded. This reveals single-device vs cross-device conversion and is essential for understanding journeys that span platforms. Maximum 3 properties.",{"type":43,"tag":52,"props":5539,"children":5540},{},[5541,5546,5547,5553,5555,5561,5563,5569],{"type":43,"tag":357,"props":5542,"children":5543},{},[5544],{"type":49,"value":5545},"Exclusions disqualify tainted journeys.",{"type":49,"value":1926},{"type":43,"tag":58,"props":5548,"children":5550},{"className":5549},[],[5551],{"type":49,"value":5552},"exclusions=[\"Logout\"]",{"type":49,"value":5554}," removes users who logged out between funnel steps — unlike flow ",{"type":43,"tag":58,"props":5556,"children":5558},{"className":5557},[],[5559],{"type":49,"value":5560},"hidden_events",{"type":49,"value":5562},", exclusions completely remove users from the funnel. Use for support escalation events, churn signals, or any action that taints the conversion path. Control which steps the exclusion applies to with ",{"type":43,"tag":58,"props":5564,"children":5566},{"className":5565},[],[5567],{"type":49,"value":5568},"Exclusion(\"Logout\", from_step=0, to_step=2)",{"type":49,"value":5570}," (0-indexed).",{"type":43,"tag":52,"props":5572,"children":5573},{},[5574,5579,5580,5586,5588,5594,5596,5601],{"type":43,"tag":357,"props":5575,"children":5576},{},[5577],{"type":49,"value":5578},"Per-step filters narrow individual steps without affecting others.",{"type":49,"value":1926},{"type":43,"tag":58,"props":5581,"children":5583},{"className":5582},[],[5584],{"type":49,"value":5585},"FunnelStep(\"Purchase\", filters=[Filter.greater_than(\"amount\", 50)])",{"type":49,"value":5587}," restricts which Purchase events count, but doesn't filter Signup events. Global ",{"type":43,"tag":58,"props":5589,"children":5591},{"className":5590},[],[5592],{"type":49,"value":5593},"where",{"type":49,"value":5595}," filters ALL steps. This distinction is subtle but powerful: filter the population with ",{"type":43,"tag":58,"props":5597,"children":5599},{"className":5598},[],[5600],{"type":49,"value":5593},{"type":49,"value":5602},", filter the definition of a step with per-step filters.",{"type":43,"tag":52,"props":5604,"children":5605},{},[5606,5611,5612,5618,5620,5626,5628,5633],{"type":43,"tag":357,"props":5607,"children":5608},{},[5609],{"type":49,"value":5610},"Session windows are a distinct paradigm.",{"type":49,"value":1926},{"type":43,"tag":58,"props":5613,"children":5615},{"className":5614},[],[5616],{"type":49,"value":5617},"conversion_window_unit='session'",{"type":49,"value":5619}," constrains the entire funnel to a single engagement session — no multi-session hops. This reveals true in-session conversion behavior, separate from users who spread a journey across days. The third counting mode, ",{"type":43,"tag":58,"props":5621,"children":5623},{"className":5622},[],[5624],{"type":49,"value":5625},"math='conversion_rate_session'",{"type":49,"value":5627},", counts sessions rather than users or events (requires ",{"type":43,"tag":58,"props":5629,"children":5631},{"className":5630},[],[5632],{"type":49,"value":5617},{"type":49,"value":5634},").",{"type":43,"tag":4642,"props":5636,"children":5638},{"id":5637},"retention-analysis-the-cohort-bucketing-triple",[5639],{"type":49,"value":5640},"Retention Analysis: The Cohort Bucketing Triple",{"type":43,"tag":52,"props":5642,"children":5643},{},[5644,5670,5672,5677,5679,5684,5686,5692,5694,5700,5702,5707],{"type":43,"tag":357,"props":5645,"children":5646},{},[5647,5653,5655,5661,5662,5668],{"type":43,"tag":58,"props":5648,"children":5650},{"className":5649},[],[5651],{"type":49,"value":5652},"retention_unit",{"type":49,"value":5654}," + ",{"type":43,"tag":58,"props":5656,"children":5658},{"className":5657},[],[5659],{"type":49,"value":5660},"alignment",{"type":49,"value":5654},{"type":43,"tag":58,"props":5663,"children":5665},{"className":5664},[],[5666],{"type":49,"value":5667},"bucket_sizes",{"type":49,"value":5669}," define your entire retention model",{"type":49,"value":5671}," — retention's equivalent of the funnel conversion window. ",{"type":43,"tag":58,"props":5673,"children":5675},{"className":5674},[],[5676],{"type":49,"value":5652},{"type":49,"value":5678}," groups users into cohorts (day\u002Fweek\u002Fmonth). ",{"type":43,"tag":58,"props":5680,"children":5682},{"className":5681},[],[5683],{"type":49,"value":5660},{"type":49,"value":5685}," anchors cohorts (",{"type":43,"tag":58,"props":5687,"children":5689},{"className":5688},[],[5690],{"type":49,"value":5691},"birth",{"type":49,"value":5693}," = each user's clock starts from their event; ",{"type":43,"tag":58,"props":5695,"children":5697},{"className":5696},[],[5698],{"type":49,"value":5699},"interval_start",{"type":49,"value":5701}," = snap to calendar boundaries). ",{"type":43,"tag":58,"props":5703,"children":5705},{"className":5704},[],[5706],{"type":49,"value":5667},{"type":49,"value":5708}," sets measurement points. Changing any one reshapes all downstream metrics.",{"type":43,"tag":52,"props":5710,"children":5711},{},[5712,5724,5726,5732,5734,5740,5742,5748],{"type":43,"tag":357,"props":5713,"children":5714},{},[5715,5717,5722],{"type":49,"value":5716},"Match ",{"type":43,"tag":58,"props":5718,"children":5720},{"className":5719},[],[5721],{"type":49,"value":5652},{"type":49,"value":5723}," to your product's natural usage cadence.",{"type":49,"value":5725}," Daily products (social, messaging) need ",{"type":43,"tag":58,"props":5727,"children":5729},{"className":5728},[],[5730],{"type":49,"value":5731},"retention_unit='day'",{"type":49,"value":5733},". Weekly products (task management, fitness) need ",{"type":43,"tag":58,"props":5735,"children":5737},{"className":5736},[],[5738],{"type":49,"value":5739},"'week'",{"type":49,"value":5741},". Monthly products (subscriptions, B2B SaaS) need ",{"type":43,"tag":58,"props":5743,"children":5745},{"className":5744},[],[5746],{"type":49,"value":5747},"'month'",{"type":49,"value":5749},". When unsure, experiment:",{"type":43,"tag":91,"props":5751,"children":5753},{"className":93,"code":5752,"language":95,"meta":96,"style":96},"# Sweep retention_unit to find natural product cadence\nborn, ret = 'Signup', 'Login'  # use real event names\nfor ru in ['day', 'week', 'month']:\n    result = ws.query_retention(born, ret, retention_unit=ru, last=90)\n    avg = result.average\n    if avg is not None and len(avg) > 1:\n        bucket_1_rate = avg.iloc[1]['rate'] if 'rate' in avg.columns else None\n        print(f\"{ru:>6} retention: bucket 1 = {bucket_1_rate}\")\n# The unit where bucket-1 retention is highest reveals natural usage cadence\n\n# Custom buckets for milestone-based retention (days 1, 3, 7, 14, 30)\nresult = ws.query_retention(born, ret, retention_unit='week',\n    bucket_sizes=[1, 3, 7, 14, 30], unit='day', last=90)\nprint(result.df[result.df['cohort_date'] == '$overall'])\n# Day 1 = activation, Day 7 = habit formation, Day 30 = long-term retention\n\n# Compare alignment modes — can shift results dramatically\nfor align in ['birth', 'interval_start']:\n    result = ws.query_retention(born, ret, retention_unit='week',\n        alignment=align, last=90)\n    print(f\"\\nalignment={align}:\")\n    print(result.average.head() if result.average is not None else \"No data\")\n",[5754],{"type":43,"tag":58,"props":5755,"children":5756},{"__ignoreMap":96},[5757,5765,5773,5781,5789,5797,5805,5813,5821,5829,5836,5844,5852,5860,5868,5876,5883,5891,5899,5907,5915,5923],{"type":43,"tag":102,"props":5758,"children":5759},{"class":104,"line":105},[5760],{"type":43,"tag":102,"props":5761,"children":5762},{},[5763],{"type":49,"value":5764},"# Sweep retention_unit to find natural product cadence\n",{"type":43,"tag":102,"props":5766,"children":5767},{"class":104,"line":114},[5768],{"type":43,"tag":102,"props":5769,"children":5770},{},[5771],{"type":49,"value":5772},"born, ret = 'Signup', 'Login'  # use real event names\n",{"type":43,"tag":102,"props":5774,"children":5775},{"class":104,"line":123},[5776],{"type":43,"tag":102,"props":5777,"children":5778},{},[5779],{"type":49,"value":5780},"for ru in ['day', 'week', 'month']:\n",{"type":43,"tag":102,"props":5782,"children":5783},{"class":104,"line":132},[5784],{"type":43,"tag":102,"props":5785,"children":5786},{},[5787],{"type":49,"value":5788},"    result = ws.query_retention(born, ret, retention_unit=ru, last=90)\n",{"type":43,"tag":102,"props":5790,"children":5791},{"class":104,"line":450},[5792],{"type":43,"tag":102,"props":5793,"children":5794},{},[5795],{"type":49,"value":5796},"    avg = result.average\n",{"type":43,"tag":102,"props":5798,"children":5799},{"class":104,"line":459},[5800],{"type":43,"tag":102,"props":5801,"children":5802},{},[5803],{"type":49,"value":5804},"    if avg is not None and len(avg) > 1:\n",{"type":43,"tag":102,"props":5806,"children":5807},{"class":104,"line":468},[5808],{"type":43,"tag":102,"props":5809,"children":5810},{},[5811],{"type":49,"value":5812},"        bucket_1_rate = avg.iloc[1]['rate'] if 'rate' in avg.columns else None\n",{"type":43,"tag":102,"props":5814,"children":5815},{"class":104,"line":477},[5816],{"type":43,"tag":102,"props":5817,"children":5818},{},[5819],{"type":49,"value":5820},"        print(f\"{ru:>6} retention: bucket 1 = {bucket_1_rate}\")\n",{"type":43,"tag":102,"props":5822,"children":5823},{"class":104,"line":486},[5824],{"type":43,"tag":102,"props":5825,"children":5826},{},[5827],{"type":49,"value":5828},"# The unit where bucket-1 retention is highest reveals natural usage cadence\n",{"type":43,"tag":102,"props":5830,"children":5831},{"class":104,"line":495},[5832],{"type":43,"tag":102,"props":5833,"children":5834},{"emptyLinePlaceholder":444},[5835],{"type":49,"value":447},{"type":43,"tag":102,"props":5837,"children":5838},{"class":104,"line":503},[5839],{"type":43,"tag":102,"props":5840,"children":5841},{},[5842],{"type":49,"value":5843},"# Custom buckets for milestone-based retention (days 1, 3, 7, 14, 30)\n",{"type":43,"tag":102,"props":5845,"children":5846},{"class":104,"line":512},[5847],{"type":43,"tag":102,"props":5848,"children":5849},{},[5850],{"type":49,"value":5851},"result = ws.query_retention(born, ret, retention_unit='week',\n",{"type":43,"tag":102,"props":5853,"children":5854},{"class":104,"line":521},[5855],{"type":43,"tag":102,"props":5856,"children":5857},{},[5858],{"type":49,"value":5859},"    bucket_sizes=[1, 3, 7, 14, 30], unit='day', last=90)\n",{"type":43,"tag":102,"props":5861,"children":5862},{"class":104,"line":530},[5863],{"type":43,"tag":102,"props":5864,"children":5865},{},[5866],{"type":49,"value":5867},"print(result.df[result.df['cohort_date'] == '$overall'])\n",{"type":43,"tag":102,"props":5869,"children":5870},{"class":104,"line":538},[5871],{"type":43,"tag":102,"props":5872,"children":5873},{},[5874],{"type":49,"value":5875},"# Day 1 = activation, Day 7 = habit formation, Day 30 = long-term retention\n",{"type":43,"tag":102,"props":5877,"children":5878},{"class":104,"line":547},[5879],{"type":43,"tag":102,"props":5880,"children":5881},{"emptyLinePlaceholder":444},[5882],{"type":49,"value":447},{"type":43,"tag":102,"props":5884,"children":5885},{"class":104,"line":556},[5886],{"type":43,"tag":102,"props":5887,"children":5888},{},[5889],{"type":49,"value":5890},"# Compare alignment modes — can shift results dramatically\n",{"type":43,"tag":102,"props":5892,"children":5893},{"class":104,"line":948},[5894],{"type":43,"tag":102,"props":5895,"children":5896},{},[5897],{"type":49,"value":5898},"for align in ['birth', 'interval_start']:\n",{"type":43,"tag":102,"props":5900,"children":5901},{"class":104,"line":956},[5902],{"type":43,"tag":102,"props":5903,"children":5904},{},[5905],{"type":49,"value":5906},"    result = ws.query_retention(born, ret, retention_unit='week',\n",{"type":43,"tag":102,"props":5908,"children":5909},{"class":104,"line":965},[5910],{"type":43,"tag":102,"props":5911,"children":5912},{},[5913],{"type":49,"value":5914},"        alignment=align, last=90)\n",{"type":43,"tag":102,"props":5916,"children":5917},{"class":104,"line":991},[5918],{"type":43,"tag":102,"props":5919,"children":5920},{},[5921],{"type":49,"value":5922},"    print(f\"\\nalignment={align}:\")\n",{"type":43,"tag":102,"props":5924,"children":5925},{"class":104,"line":1202},[5926],{"type":43,"tag":102,"props":5927,"children":5928},{},[5929],{"type":49,"value":5930},"    print(result.average.head() if result.average is not None else \"No data\")\n",{"type":43,"tag":52,"props":5932,"children":5933},{},[5934,5939,5940,5945,5947,5953],{"type":43,"tag":357,"props":5935,"children":5936},{},[5937],{"type":49,"value":5938},"Be wary of unbounded modes — they inflate retention.",{"type":49,"value":1926},{"type":43,"tag":58,"props":5941,"children":5943},{"className":5942},[],[5944],{"type":49,"value":4623},{"type":49,"value":5946}," credits future returns to past buckets — a user who returns only on day 30 gets counted as retained in all buckets from 30 onward. ",{"type":43,"tag":58,"props":5948,"children":5950},{"className":5949},[],[5951],{"type":49,"value":5952},"carry_back",{"type":49,"value":5954}," inflates early buckets instead. Useful for \"did they ever engage?\" analysis but distorts standard retention curves.",{"type":43,"tag":52,"props":5956,"children":5957},{},[5958,5969],{"type":43,"tag":357,"props":5959,"children":5960},{},[5961,5967],{"type":43,"tag":58,"props":5962,"children":5964},{"className":5963},[],[5965],{"type":49,"value":5966},"retention_cumulative=True",{"type":49,"value":5968}," masks re-engagement gaps.",{"type":49,"value":5970}," Cumulative retention creates monotonically increasing curves where each bucket includes all prior buckets. This hides whether users who returned in week 1 ALSO returned in week 2. Standard (non-cumulative) retention reveals re-engagement patterns and true habit formation.",{"type":43,"tag":52,"props":5972,"children":5973},{},[5974,5979,5980,5986,5988,5993,5995,6001,6003,6008],{"type":43,"tag":357,"props":5975,"children":5976},{},[5977],{"type":49,"value":5978},"Counting methodology:",{"type":49,"value":1926},{"type":43,"tag":58,"props":5981,"children":5983},{"className":5982},[],[5984],{"type":49,"value":5985},"math='retention_rate'",{"type":49,"value":5987}," (% who returned — the default), ",{"type":43,"tag":58,"props":5989,"children":5991},{"className":5990},[],[5992],{"type":49,"value":4615},{"type":49,"value":5994}," (count who returned), ",{"type":43,"tag":58,"props":5996,"children":5998},{"className":5997},[],[5999],{"type":49,"value":6000},"math='total'",{"type":49,"value":6002}," (how many times they returned — events, not users). ",{"type":43,"tag":58,"props":6004,"children":6006},{"className":6005},[],[6007],{"type":49,"value":1494},{"type":49,"value":6009}," reveals engagement intensity; a user logging in 5 times in bucket 1 counts as 5, not 1. Like funnels, the counting choice changes the question.",{"type":43,"tag":4642,"props":6011,"children":6013},{"id":6012},"flow-analysis-windows-cardinality-and-signal-to-noise",[6014],{"type":49,"value":6015},"Flow Analysis: Windows, Cardinality, and Signal-to-Noise",{"type":43,"tag":52,"props":6017,"children":6018},{},[6019,6024],{"type":43,"tag":357,"props":6020,"children":6021},{},[6022],{"type":49,"value":6023},"Cardinality controls signal-to-noise",{"type":49,"value":6025}," — the most important flow-specific parameter. Low cardinality (2-3) reveals dominant paths — the main story. High cardinality (10+) reveals edge cases and niche journeys. Start low to find the narrative, then increase to find exceptions.",{"type":43,"tag":52,"props":6027,"children":6028},{},[6029,6040,6042,6047],{"type":43,"tag":357,"props":6030,"children":6031},{},[6032,6038],{"type":43,"tag":58,"props":6033,"children":6035},{"className":6034},[],[6036],{"type":49,"value":6037},"conversion_window",{"type":49,"value":6039}," matters for flows too",{"type":49,"value":6041}," — identical concept to funnels. Session-based windows (",{"type":43,"tag":58,"props":6043,"children":6045},{"className":6044},[],[6046],{"type":49,"value":5617},{"type":49,"value":6048},") reveal in-app behavior within a single engagement. Calendar windows reveal multi-day journeys. A tight window isolates intentional workflows; a wide window captures exploratory meandering:",{"type":43,"tag":91,"props":6050,"children":6052},{"className":93,"code":6051,"language":95,"meta":96,"style":96},"# Sweep cardinality to find signal-to-noise sweet spot\nevent = 'Login'  # use a real anchor event\nfor card in [2, 3, 5, 10]:\n    result = ws.query_flow(event, forward=3, cardinality=card, last=30)\n    transitions = result.top_transitions(5)\n    print(f\"\\ncardinality={card}: {len(transitions)} top transitions\")\n    for src, dst, count in transitions[:3]:\n        print(f\"  {src} → {dst}: {count}\")\n# Low cardinality = clear narrative; high cardinality = exhaustive but noisy\n\n# Compare count types (same principle as funnels)\nfor ct in ['unique', 'total', 'session']:\n    result = ws.query_flow(event, forward=3, count_type=ct, last=30)\n    dropoff = result.drop_off_summary()\n    print(f\"\\n{ct}: step 0 dropoff = {dropoff}\")\n# unique = how many people; total = how much activity; session = how many sessions\n\n# Compare collapse_repeated to separate intent from noise\nfor collapse in [False, True]:\n    result = ws.query_flow(event, forward=3, collapse_repeated=collapse,\n                            cardinality=5, last=30)\n    print(f\"\\ncollapse_repeated={collapse}:\")\n    for src, dst, count in result.top_transitions(3):\n        print(f\"  {src} → {dst}: {count}\")\n",[6053],{"type":43,"tag":58,"props":6054,"children":6055},{"__ignoreMap":96},[6056,6064,6072,6080,6088,6096,6104,6112,6120,6128,6135,6143,6151,6159,6167,6175,6183,6190,6198,6206,6214,6222,6230,6238],{"type":43,"tag":102,"props":6057,"children":6058},{"class":104,"line":105},[6059],{"type":43,"tag":102,"props":6060,"children":6061},{},[6062],{"type":49,"value":6063},"# Sweep cardinality to find signal-to-noise sweet spot\n",{"type":43,"tag":102,"props":6065,"children":6066},{"class":104,"line":114},[6067],{"type":43,"tag":102,"props":6068,"children":6069},{},[6070],{"type":49,"value":6071},"event = 'Login'  # use a real anchor event\n",{"type":43,"tag":102,"props":6073,"children":6074},{"class":104,"line":123},[6075],{"type":43,"tag":102,"props":6076,"children":6077},{},[6078],{"type":49,"value":6079},"for card in [2, 3, 5, 10]:\n",{"type":43,"tag":102,"props":6081,"children":6082},{"class":104,"line":132},[6083],{"type":43,"tag":102,"props":6084,"children":6085},{},[6086],{"type":49,"value":6087},"    result = ws.query_flow(event, forward=3, cardinality=card, last=30)\n",{"type":43,"tag":102,"props":6089,"children":6090},{"class":104,"line":450},[6091],{"type":43,"tag":102,"props":6092,"children":6093},{},[6094],{"type":49,"value":6095},"    transitions = result.top_transitions(5)\n",{"type":43,"tag":102,"props":6097,"children":6098},{"class":104,"line":459},[6099],{"type":43,"tag":102,"props":6100,"children":6101},{},[6102],{"type":49,"value":6103},"    print(f\"\\ncardinality={card}: {len(transitions)} top transitions\")\n",{"type":43,"tag":102,"props":6105,"children":6106},{"class":104,"line":468},[6107],{"type":43,"tag":102,"props":6108,"children":6109},{},[6110],{"type":49,"value":6111},"    for src, dst, count in transitions[:3]:\n",{"type":43,"tag":102,"props":6113,"children":6114},{"class":104,"line":477},[6115],{"type":43,"tag":102,"props":6116,"children":6117},{},[6118],{"type":49,"value":6119},"        print(f\"  {src} → {dst}: {count}\")\n",{"type":43,"tag":102,"props":6121,"children":6122},{"class":104,"line":486},[6123],{"type":43,"tag":102,"props":6124,"children":6125},{},[6126],{"type":49,"value":6127},"# Low cardinality = clear narrative; high cardinality = exhaustive but noisy\n",{"type":43,"tag":102,"props":6129,"children":6130},{"class":104,"line":495},[6131],{"type":43,"tag":102,"props":6132,"children":6133},{"emptyLinePlaceholder":444},[6134],{"type":49,"value":447},{"type":43,"tag":102,"props":6136,"children":6137},{"class":104,"line":503},[6138],{"type":43,"tag":102,"props":6139,"children":6140},{},[6141],{"type":49,"value":6142},"# Compare count types (same principle as funnels)\n",{"type":43,"tag":102,"props":6144,"children":6145},{"class":104,"line":512},[6146],{"type":43,"tag":102,"props":6147,"children":6148},{},[6149],{"type":49,"value":6150},"for ct in ['unique', 'total', 'session']:\n",{"type":43,"tag":102,"props":6152,"children":6153},{"class":104,"line":521},[6154],{"type":43,"tag":102,"props":6155,"children":6156},{},[6157],{"type":49,"value":6158},"    result = ws.query_flow(event, forward=3, count_type=ct, last=30)\n",{"type":43,"tag":102,"props":6160,"children":6161},{"class":104,"line":530},[6162],{"type":43,"tag":102,"props":6163,"children":6164},{},[6165],{"type":49,"value":6166},"    dropoff = result.drop_off_summary()\n",{"type":43,"tag":102,"props":6168,"children":6169},{"class":104,"line":538},[6170],{"type":43,"tag":102,"props":6171,"children":6172},{},[6173],{"type":49,"value":6174},"    print(f\"\\n{ct}: step 0 dropoff = {dropoff}\")\n",{"type":43,"tag":102,"props":6176,"children":6177},{"class":104,"line":547},[6178],{"type":43,"tag":102,"props":6179,"children":6180},{},[6181],{"type":49,"value":6182},"# unique = how many people; total = how much activity; session = how many sessions\n",{"type":43,"tag":102,"props":6184,"children":6185},{"class":104,"line":556},[6186],{"type":43,"tag":102,"props":6187,"children":6188},{"emptyLinePlaceholder":444},[6189],{"type":49,"value":447},{"type":43,"tag":102,"props":6191,"children":6192},{"class":104,"line":948},[6193],{"type":43,"tag":102,"props":6194,"children":6195},{},[6196],{"type":49,"value":6197},"# Compare collapse_repeated to separate intent from noise\n",{"type":43,"tag":102,"props":6199,"children":6200},{"class":104,"line":956},[6201],{"type":43,"tag":102,"props":6202,"children":6203},{},[6204],{"type":49,"value":6205},"for collapse in [False, True]:\n",{"type":43,"tag":102,"props":6207,"children":6208},{"class":104,"line":965},[6209],{"type":43,"tag":102,"props":6210,"children":6211},{},[6212],{"type":49,"value":6213},"    result = ws.query_flow(event, forward=3, collapse_repeated=collapse,\n",{"type":43,"tag":102,"props":6215,"children":6216},{"class":104,"line":991},[6217],{"type":43,"tag":102,"props":6218,"children":6219},{},[6220],{"type":49,"value":6221},"                            cardinality=5, last=30)\n",{"type":43,"tag":102,"props":6223,"children":6224},{"class":104,"line":1202},[6225],{"type":43,"tag":102,"props":6226,"children":6227},{},[6228],{"type":49,"value":6229},"    print(f\"\\ncollapse_repeated={collapse}:\")\n",{"type":43,"tag":102,"props":6231,"children":6232},{"class":104,"line":1211},[6233],{"type":43,"tag":102,"props":6234,"children":6235},{},[6236],{"type":49,"value":6237},"    for src, dst, count in result.top_transitions(3):\n",{"type":43,"tag":102,"props":6239,"children":6240},{"class":104,"line":1220},[6241],{"type":43,"tag":102,"props":6242,"children":6243},{},[6244],{"type":49,"value":6119},{"type":43,"tag":52,"props":6246,"children":6247},{},[6248,6259,6261,6267,6269,6275],{"type":43,"tag":357,"props":6249,"children":6250},{},[6251,6257],{"type":43,"tag":58,"props":6252,"children":6254},{"className":6253},[],[6255],{"type":49,"value":6256},"collapse_repeated",{"type":49,"value":6258}," changes what \"a path\" means.",{"type":49,"value":6260}," With ",{"type":43,"tag":58,"props":6262,"children":6264},{"className":6263},[],[6265],{"type":49,"value":6266},"False",{"type":49,"value":6268}," (default), A→A→A→B is a distinct path from A→B — repetitive clicks look like distinct journeys. With ",{"type":43,"tag":58,"props":6270,"children":6272},{"className":6271},[],[6273],{"type":49,"value":6274},"True",{"type":49,"value":6276},", consecutive duplicates merge, revealing intent over noise. Toggle this to see both the raw behavior and the simplified user intent.",{"type":43,"tag":52,"props":6278,"children":6279},{},[6280,6298,6299,6304,6306,6311,6313,6318,6320,6325],{"type":43,"tag":357,"props":6281,"children":6282},{},[6283,6288,6290,6296],{"type":43,"tag":58,"props":6284,"children":6286},{"className":6285},[],[6287],{"type":49,"value":5560},{"type":49,"value":6289}," vs ",{"type":43,"tag":58,"props":6291,"children":6293},{"className":6292},[],[6294],{"type":49,"value":6295},"exclusions",{"type":49,"value":6297}," — hiding vs disqualifying.",{"type":49,"value":1926},{"type":43,"tag":58,"props":6300,"children":6302},{"className":6301},[],[6303],{"type":49,"value":5560},{"type":49,"value":6305}," removes events from display but they still affect path structure and counts. ",{"type":43,"tag":58,"props":6307,"children":6309},{"className":6308},[],[6310],{"type":49,"value":6295},{"type":49,"value":6312}," disqualifies users who performed those events entirely — a much stronger operation. Use ",{"type":43,"tag":58,"props":6314,"children":6316},{"className":6315},[],[6317],{"type":49,"value":5560},{"type":49,"value":6319}," for decluttering (e.g., ubiquitous page views); use ",{"type":43,"tag":58,"props":6321,"children":6323},{"className":6322},[],[6324],{"type":49,"value":6295},{"type":49,"value":6326}," for removing tainted journeys (e.g., users who churned mid-flow).",{"type":43,"tag":52,"props":6328,"children":6329},{},[6330,6335,6336,6342,6344,6350,6352,6358],{"type":43,"tag":357,"props":6331,"children":6332},{},[6333],{"type":49,"value":6334},"Three modes reveal different stories.",{"type":49,"value":1926},{"type":43,"tag":58,"props":6337,"children":6339},{"className":6338},[],[6340],{"type":49,"value":6341},"sankey",{"type":49,"value":6343}," shows aggregate flow structure and bottlenecks (where do most users go?). ",{"type":43,"tag":58,"props":6345,"children":6347},{"className":6346},[],[6348],{"type":49,"value":6349},"paths",{"type":49,"value":6351}," shows exact user journeys in sequence (what are the top 5 complete paths?). ",{"type":43,"tag":58,"props":6353,"children":6355},{"className":6354},[],[6356],{"type":49,"value":6357},"tree",{"type":49,"value":6359}," shows branching decision points (where do users diverge?). Use all three on the same data to build a complete picture.",{"type":43,"tag":4642,"props":6361,"children":6363},{"id":6362},"user-profile-analysis-modes-aggregates-and-distribution-shape",[6364],{"type":49,"value":6365},"User Profile Analysis: Modes, Aggregates, and Distribution Shape",{"type":43,"tag":52,"props":6367,"children":6368},{},[6369,6380,6381,6387,6389,6395],{"type":43,"tag":357,"props":6370,"children":6371},{},[6372,6378],{"type":43,"tag":58,"props":6373,"children":6375},{"className":6374},[],[6376],{"type":49,"value":6377},"mode",{"type":49,"value":6379}," is the most critical user query parameter.",{"type":49,"value":1926},{"type":43,"tag":58,"props":6382,"children":6384},{"className":6383},[],[6385],{"type":49,"value":6386},"'profiles'",{"type":49,"value":6388}," returns individual user records (one row per user). ",{"type":43,"tag":58,"props":6390,"children":6392},{"className":6391},[],[6393],{"type":49,"value":6394},"'aggregate'",{"type":49,"value":6396}," returns a single statistic. These are fundamentally different operations — profiles is a data extraction, aggregate is a calculation. Aggregate is also dramatically faster (single API call vs paginated fetching).",{"type":43,"tag":52,"props":6398,"children":6399},{},[6400,6405,6407,6412,6414,6420,6422,6428,6430,6436],{"type":43,"tag":357,"props":6401,"children":6402},{},[6403],{"type":49,"value":6404},"Sweep aggregate functions to understand distribution shape",{"type":49,"value":6406}," before building expensive profile queries. ",{"type":43,"tag":58,"props":6408,"children":6410},{"className":6409},[],[6411],{"type":49,"value":1501},{"type":49,"value":6413}," tells you \"how many.\" ",{"type":43,"tag":58,"props":6415,"children":6417},{"className":6416},[],[6418],{"type":49,"value":6419},"extremes",{"type":49,"value":6421}," reveals range (min\u002Fmax). ",{"type":43,"tag":58,"props":6423,"children":6425},{"className":6424},[],[6426],{"type":49,"value":6427},"percentile",{"type":49,"value":6429}," at 50 gives median. ",{"type":43,"tag":58,"props":6431,"children":6433},{"className":6432},[],[6434],{"type":49,"value":6435},"numeric_summary",{"type":49,"value":6437}," gives mean, variance, and sum-of-squares:",{"type":43,"tag":91,"props":6439,"children":6441},{"className":93,"code":6440,"language":95,"meta":96,"style":96},"# Sweep aggregate functions to understand a property's distribution\nprop = 'lifetime_value'  # use a real numeric profile property\nfor agg in ['count', 'extremes', 'percentile', 'numeric_summary']:\n    kwargs = {'mode': 'aggregate', 'aggregate': agg}\n    if agg != 'count':\n        kwargs['aggregate_property'] = prop\n    if agg == 'percentile':\n        kwargs['percentile'] = 50  # median\n    result = ws.query_user(**kwargs)\n    print(f\"{agg:>16}: {result.aggregate_data}\")\n# count = population size, extremes = range, percentile@50 = median,\n# numeric_summary = full distribution stats\n# If mean (from numeric_summary) >> median (from percentile), distribution is right-skewed\n\n# Point-in-time comparison with as_of\ntoday_count = ws.query_user(mode='aggregate', aggregate='count',\n    where=Filter.equals('plan', 'premium'))\npast_count = ws.query_user(mode='aggregate', aggregate='count',\n    where=Filter.equals('plan', 'premium'), as_of='2025-01-01')\nprint(f\"Premium users: {past_count.value} (Jan 1) → {today_count.value} (today)\")\n",[6442],{"type":43,"tag":58,"props":6443,"children":6444},{"__ignoreMap":96},[6445,6453,6461,6469,6477,6485,6493,6501,6509,6517,6525,6533,6541,6549,6556,6564,6572,6580,6588,6596],{"type":43,"tag":102,"props":6446,"children":6447},{"class":104,"line":105},[6448],{"type":43,"tag":102,"props":6449,"children":6450},{},[6451],{"type":49,"value":6452},"# Sweep aggregate functions to understand a property's distribution\n",{"type":43,"tag":102,"props":6454,"children":6455},{"class":104,"line":114},[6456],{"type":43,"tag":102,"props":6457,"children":6458},{},[6459],{"type":49,"value":6460},"prop = 'lifetime_value'  # use a real numeric profile property\n",{"type":43,"tag":102,"props":6462,"children":6463},{"class":104,"line":123},[6464],{"type":43,"tag":102,"props":6465,"children":6466},{},[6467],{"type":49,"value":6468},"for agg in ['count', 'extremes', 'percentile', 'numeric_summary']:\n",{"type":43,"tag":102,"props":6470,"children":6471},{"class":104,"line":132},[6472],{"type":43,"tag":102,"props":6473,"children":6474},{},[6475],{"type":49,"value":6476},"    kwargs = {'mode': 'aggregate', 'aggregate': agg}\n",{"type":43,"tag":102,"props":6478,"children":6479},{"class":104,"line":450},[6480],{"type":43,"tag":102,"props":6481,"children":6482},{},[6483],{"type":49,"value":6484},"    if agg != 'count':\n",{"type":43,"tag":102,"props":6486,"children":6487},{"class":104,"line":459},[6488],{"type":43,"tag":102,"props":6489,"children":6490},{},[6491],{"type":49,"value":6492},"        kwargs['aggregate_property'] = prop\n",{"type":43,"tag":102,"props":6494,"children":6495},{"class":104,"line":468},[6496],{"type":43,"tag":102,"props":6497,"children":6498},{},[6499],{"type":49,"value":6500},"    if agg == 'percentile':\n",{"type":43,"tag":102,"props":6502,"children":6503},{"class":104,"line":477},[6504],{"type":43,"tag":102,"props":6505,"children":6506},{},[6507],{"type":49,"value":6508},"        kwargs['percentile'] = 50  # median\n",{"type":43,"tag":102,"props":6510,"children":6511},{"class":104,"line":486},[6512],{"type":43,"tag":102,"props":6513,"children":6514},{},[6515],{"type":49,"value":6516},"    result = ws.query_user(**kwargs)\n",{"type":43,"tag":102,"props":6518,"children":6519},{"class":104,"line":495},[6520],{"type":43,"tag":102,"props":6521,"children":6522},{},[6523],{"type":49,"value":6524},"    print(f\"{agg:>16}: {result.aggregate_data}\")\n",{"type":43,"tag":102,"props":6526,"children":6527},{"class":104,"line":503},[6528],{"type":43,"tag":102,"props":6529,"children":6530},{},[6531],{"type":49,"value":6532},"# count = population size, extremes = range, percentile@50 = median,\n",{"type":43,"tag":102,"props":6534,"children":6535},{"class":104,"line":512},[6536],{"type":43,"tag":102,"props":6537,"children":6538},{},[6539],{"type":49,"value":6540},"# numeric_summary = full distribution stats\n",{"type":43,"tag":102,"props":6542,"children":6543},{"class":104,"line":521},[6544],{"type":43,"tag":102,"props":6545,"children":6546},{},[6547],{"type":49,"value":6548},"# If mean (from numeric_summary) >> median (from percentile), distribution is right-skewed\n",{"type":43,"tag":102,"props":6550,"children":6551},{"class":104,"line":530},[6552],{"type":43,"tag":102,"props":6553,"children":6554},{"emptyLinePlaceholder":444},[6555],{"type":49,"value":447},{"type":43,"tag":102,"props":6557,"children":6558},{"class":104,"line":538},[6559],{"type":43,"tag":102,"props":6560,"children":6561},{},[6562],{"type":49,"value":6563},"# Point-in-time comparison with as_of\n",{"type":43,"tag":102,"props":6565,"children":6566},{"class":104,"line":547},[6567],{"type":43,"tag":102,"props":6568,"children":6569},{},[6570],{"type":49,"value":6571},"today_count = ws.query_user(mode='aggregate', aggregate='count',\n",{"type":43,"tag":102,"props":6573,"children":6574},{"class":104,"line":556},[6575],{"type":43,"tag":102,"props":6576,"children":6577},{},[6578],{"type":49,"value":6579},"    where=Filter.equals('plan', 'premium'))\n",{"type":43,"tag":102,"props":6581,"children":6582},{"class":104,"line":948},[6583],{"type":43,"tag":102,"props":6584,"children":6585},{},[6586],{"type":49,"value":6587},"past_count = ws.query_user(mode='aggregate', aggregate='count',\n",{"type":43,"tag":102,"props":6589,"children":6590},{"class":104,"line":956},[6591],{"type":43,"tag":102,"props":6592,"children":6593},{},[6594],{"type":49,"value":6595},"    where=Filter.equals('plan', 'premium'), as_of='2025-01-01')\n",{"type":43,"tag":102,"props":6597,"children":6598},{"class":104,"line":965},[6599],{"type":43,"tag":102,"props":6600,"children":6601},{},[6602],{"type":49,"value":6603},"print(f\"Premium users: {past_count.value} (Jan 1) → {today_count.value} (today)\")\n",{"type":43,"tag":52,"props":6605,"children":6606},{},[6607,6612,6614,6620,6622,6627],{"type":43,"tag":357,"props":6608,"children":6609},{},[6610],{"type":49,"value":6611},"Prefer medians over averages",{"type":49,"value":6613}," — same principle as funnels and Insights. ",{"type":43,"tag":58,"props":6615,"children":6617},{"className":6616},[],[6618],{"type":49,"value":6619},"aggregate='percentile', percentile=50",{"type":49,"value":6621}," gives median; ",{"type":43,"tag":58,"props":6623,"children":6625},{"className":6624},[],[6626],{"type":49,"value":6435},{"type":49,"value":6628}," gives mean. If they diverge significantly, the distribution is skewed and the mean is misleading.",{"type":43,"tag":52,"props":6630,"children":6631},{},[6632,6643,6645,6650],{"type":43,"tag":357,"props":6633,"children":6634},{},[6635,6641],{"type":43,"tag":58,"props":6636,"children":6638},{"className":6637},[],[6639],{"type":49,"value":6640},"as_of",{"type":49,"value":6642}," enables temporal analysis",{"type":49,"value":6644}," — query profiles as they existed at a past date. Compare population states over time: \"how many premium users existed on Jan 1 vs today?\" Without ",{"type":43,"tag":58,"props":6646,"children":6648},{"className":6647},[],[6649],{"type":49,"value":6640},{"type":49,"value":6651},", you always see current state, making growth and churn invisible.",{"type":43,"tag":52,"props":6653,"children":6654},{},[6655,6668,6670,6676],{"type":43,"tag":357,"props":6656,"children":6657},{},[6658,6660,6666],{"type":49,"value":6659},"Inline ",{"type":43,"tag":58,"props":6661,"children":6663},{"className":6662},[],[6664],{"type":49,"value":6665},"CohortDefinition",{"type":49,"value":6667}," vs saved cohorts.",{"type":49,"value":6669}," Inline cohorts (",{"type":43,"tag":58,"props":6671,"children":6673},{"className":6672},[],[6674],{"type":49,"value":6675},"cohort=CohortDefinition.all_of(...)",{"type":49,"value":6677},") let you define complex behavioral segments on-the-fly without roundtripping to save\u002Fdelete in Mixpanel. Much faster iteration for exploratory analysis. Use saved cohorts for production dashboards and monitoring.",{"type":43,"tag":4642,"props":6679,"children":6681},{"id":6680},"analytical-building-blocks-custom-properties-cohorts-and-frequency",[6682],{"type":49,"value":6683},"Analytical Building Blocks: Custom Properties, Cohorts, and Frequency",{"type":43,"tag":52,"props":6685,"children":6686},{},[6687],{"type":49,"value":6688},"Raw data is rarely analysis-ready. These three tools transform raw events and properties into analytically useful dimensions, populations, and segments. Recognize when to reach for each — they compose with every query engine.",{"type":43,"tag":52,"props":6690,"children":6691},{},[6692,6697,6699,6705],{"type":43,"tag":357,"props":6693,"children":6694},{},[6695],{"type":49,"value":6696},"Inline Custom Properties — transform data at query time.",{"type":49,"value":6698}," When property values are messy, need bucketing, or you need to derive new dimensions, create an ",{"type":43,"tag":58,"props":6700,"children":6702},{"className":6701},[],[6703],{"type":49,"value":6704},"InlineCustomProperty",{"type":49,"value":6706}," rather than querying raw values. Key patterns:",{"type":43,"tag":1404,"props":6708,"children":6709},{},[6710,6720,6730,6740],{"type":43,"tag":1408,"props":6711,"children":6712},{},[6713,6718],{"type":43,"tag":357,"props":6714,"children":6715},{},[6716],{"type":49,"value":6717},"Bucketing continuous values",{"type":49,"value":6719}," for breakdowns (revenue → Low\u002FMedium\u002FHigh)",{"type":43,"tag":1408,"props":6721,"children":6722},{},[6723,6728],{"type":43,"tag":357,"props":6724,"children":6725},{},[6726],{"type":49,"value":6727},"Cleaning messy strings",{"type":49,"value":6729}," with IFS\u002FREGEX_EXTRACT (campaign names, UTM parameters)",{"type":43,"tag":1408,"props":6731,"children":6732},{},[6733,6738],{"type":43,"tag":357,"props":6734,"children":6735},{},[6736],{"type":49,"value":6737},"Deriving new dimensions",{"type":49,"value":6739}," from arithmetic or date functions (profit margin, days since signup)",{"type":43,"tag":1408,"props":6741,"children":6742},{},[6743,6748],{"type":43,"tag":357,"props":6744,"children":6745},{},[6746],{"type":49,"value":6747},"Fallback chains",{"type":49,"value":6749}," across multiple properties (display_name → username → \"unknown\")",{"type":43,"tag":91,"props":6751,"children":6753},{"className":93,"code":6752,"language":95,"meta":96,"style":96},"from mixpanel_headless import InlineCustomProperty, PropertyInput, GroupBy, Filter, Metric\n\n# Bucket revenue into tiers for breakdown\nrevenue_tier = InlineCustomProperty(\n    formula='IFS(A \u003C 50, \"Low\", A \u003C 200, \"Medium\", TRUE, \"High\")',\n    inputs={\"A\": PropertyInput(\"revenue\", type=\"number\")},\n    property_type=\"string\",\n)\nresult = ws.query(\"Purchase\", group_by=GroupBy(property=revenue_tier), last=30, mode='total')\n\n# Derive profit margin for aggregation\nmargin = InlineCustomProperty.numeric(\"(A - B) \u002F A * 100\", A=\"revenue\", B=\"cost\")\nresult = ws.query(Metric(\"Purchase\", math=\"average\", property=margin), last=30)\n\n# Clean messy strings for segmentation\ndomain = InlineCustomProperty(\n    formula='REGEX_EXTRACT(A, \"@(.+)$\")',\n    inputs={\"A\": PropertyInput(\"email\", type=\"string\")},\n    property_type=\"string\",\n)\nresult = ws.query(\"Signup\", group_by=GroupBy(property=domain), last=30, mode='total')\n",[6754],{"type":43,"tag":58,"props":6755,"children":6756},{"__ignoreMap":96},[6757,6765,6772,6780,6788,6796,6804,6812,6819,6827,6834,6842,6850,6858,6865,6873,6881,6889,6897,6904,6911],{"type":43,"tag":102,"props":6758,"children":6759},{"class":104,"line":105},[6760],{"type":43,"tag":102,"props":6761,"children":6762},{},[6763],{"type":49,"value":6764},"from mixpanel_headless import InlineCustomProperty, PropertyInput, GroupBy, Filter, Metric\n",{"type":43,"tag":102,"props":6766,"children":6767},{"class":104,"line":114},[6768],{"type":43,"tag":102,"props":6769,"children":6770},{"emptyLinePlaceholder":444},[6771],{"type":49,"value":447},{"type":43,"tag":102,"props":6773,"children":6774},{"class":104,"line":123},[6775],{"type":43,"tag":102,"props":6776,"children":6777},{},[6778],{"type":49,"value":6779},"# Bucket revenue into tiers for breakdown\n",{"type":43,"tag":102,"props":6781,"children":6782},{"class":104,"line":132},[6783],{"type":43,"tag":102,"props":6784,"children":6785},{},[6786],{"type":49,"value":6787},"revenue_tier = InlineCustomProperty(\n",{"type":43,"tag":102,"props":6789,"children":6790},{"class":104,"line":450},[6791],{"type":43,"tag":102,"props":6792,"children":6793},{},[6794],{"type":49,"value":6795},"    formula='IFS(A \u003C 50, \"Low\", A \u003C 200, \"Medium\", TRUE, \"High\")',\n",{"type":43,"tag":102,"props":6797,"children":6798},{"class":104,"line":459},[6799],{"type":43,"tag":102,"props":6800,"children":6801},{},[6802],{"type":49,"value":6803},"    inputs={\"A\": PropertyInput(\"revenue\", type=\"number\")},\n",{"type":43,"tag":102,"props":6805,"children":6806},{"class":104,"line":468},[6807],{"type":43,"tag":102,"props":6808,"children":6809},{},[6810],{"type":49,"value":6811},"    property_type=\"string\",\n",{"type":43,"tag":102,"props":6813,"children":6814},{"class":104,"line":477},[6815],{"type":43,"tag":102,"props":6816,"children":6817},{},[6818],{"type":49,"value":2709},{"type":43,"tag":102,"props":6820,"children":6821},{"class":104,"line":486},[6822],{"type":43,"tag":102,"props":6823,"children":6824},{},[6825],{"type":49,"value":6826},"result = ws.query(\"Purchase\", group_by=GroupBy(property=revenue_tier), last=30, mode='total')\n",{"type":43,"tag":102,"props":6828,"children":6829},{"class":104,"line":495},[6830],{"type":43,"tag":102,"props":6831,"children":6832},{"emptyLinePlaceholder":444},[6833],{"type":49,"value":447},{"type":43,"tag":102,"props":6835,"children":6836},{"class":104,"line":503},[6837],{"type":43,"tag":102,"props":6838,"children":6839},{},[6840],{"type":49,"value":6841},"# Derive profit margin for aggregation\n",{"type":43,"tag":102,"props":6843,"children":6844},{"class":104,"line":512},[6845],{"type":43,"tag":102,"props":6846,"children":6847},{},[6848],{"type":49,"value":6849},"margin = InlineCustomProperty.numeric(\"(A - B) \u002F A * 100\", A=\"revenue\", B=\"cost\")\n",{"type":43,"tag":102,"props":6851,"children":6852},{"class":104,"line":521},[6853],{"type":43,"tag":102,"props":6854,"children":6855},{},[6856],{"type":49,"value":6857},"result = ws.query(Metric(\"Purchase\", math=\"average\", property=margin), last=30)\n",{"type":43,"tag":102,"props":6859,"children":6860},{"class":104,"line":530},[6861],{"type":43,"tag":102,"props":6862,"children":6863},{"emptyLinePlaceholder":444},[6864],{"type":49,"value":447},{"type":43,"tag":102,"props":6866,"children":6867},{"class":104,"line":538},[6868],{"type":43,"tag":102,"props":6869,"children":6870},{},[6871],{"type":49,"value":6872},"# Clean messy strings for segmentation\n",{"type":43,"tag":102,"props":6874,"children":6875},{"class":104,"line":547},[6876],{"type":43,"tag":102,"props":6877,"children":6878},{},[6879],{"type":49,"value":6880},"domain = InlineCustomProperty(\n",{"type":43,"tag":102,"props":6882,"children":6883},{"class":104,"line":556},[6884],{"type":43,"tag":102,"props":6885,"children":6886},{},[6887],{"type":49,"value":6888},"    formula='REGEX_EXTRACT(A, \"@(.+)$\")',\n",{"type":43,"tag":102,"props":6890,"children":6891},{"class":104,"line":948},[6892],{"type":43,"tag":102,"props":6893,"children":6894},{},[6895],{"type":49,"value":6896},"    inputs={\"A\": PropertyInput(\"email\", type=\"string\")},\n",{"type":43,"tag":102,"props":6898,"children":6899},{"class":104,"line":956},[6900],{"type":43,"tag":102,"props":6901,"children":6902},{},[6903],{"type":49,"value":6811},{"type":43,"tag":102,"props":6905,"children":6906},{"class":104,"line":965},[6907],{"type":43,"tag":102,"props":6908,"children":6909},{},[6910],{"type":49,"value":2709},{"type":43,"tag":102,"props":6912,"children":6913},{"class":104,"line":991},[6914],{"type":43,"tag":102,"props":6915,"children":6916},{},[6917],{"type":49,"value":6918},"result = ws.query(\"Signup\", group_by=GroupBy(property=domain), last=30, mode='total')\n",{"type":43,"tag":52,"props":6920,"children":6921},{},[6922,6924,6929,6931,6937,6939,6945],{"type":49,"value":6923},"Use ",{"type":43,"tag":58,"props":6925,"children":6927},{"className":6926},[],[6928],{"type":49,"value":6704},{"type":49,"value":6930}," for ad-hoc exploration. When a formula proves valuable, persist it with ",{"type":43,"tag":58,"props":6932,"children":6934},{"className":6933},[],[6935],{"type":49,"value":6936},"ws.create_custom_property()",{"type":49,"value":6938}," and reference it via ",{"type":43,"tag":58,"props":6940,"children":6942},{"className":6941},[],[6943],{"type":49,"value":6944},"CustomPropertyRef(id)",{"type":49,"value":6946}," across reports.",{"type":43,"tag":52,"props":6948,"children":6949},{},[6950,6955,6957,6963],{"type":43,"tag":357,"props":6951,"children":6952},{},[6953],{"type":49,"value":6954},"Inline Cohorts — define complex populations on-the-fly.",{"type":49,"value":6956}," Every analytical question starts with \"among WHICH users?\" Simple property filters (",{"type":43,"tag":58,"props":6958,"children":6960},{"className":6959},[],[6961],{"type":49,"value":6962},"where=Filter.equals(...)",{"type":49,"value":6964},") answer \"users with attribute X.\" Inline cohorts answer harder questions: \"users who did X at least N times in the last D days AND did NOT do Y AND have property Z.\" Compose criteria with AND\u002FOR logic:",{"type":43,"tag":91,"props":6966,"children":6968},{"className":93,"code":6967,"language":95,"meta":96,"style":96},"from mixpanel_headless import CohortDefinition, CohortCriteria, CohortBreakdown, CohortMetric\n\n# \"Power users\": purchased 5+ times in 30 days, never contacted support\npower_users = CohortDefinition.all_of(\n    CohortCriteria.did_event(\"Purchase\", at_least=5, within_days=30),\n    CohortCriteria.did_not_do_event(\"Support Ticket\", within_days=90),\n)\n\n# Use inline cohort as a breakdown — no need to save first\nresult = ws.query(\"Login\", group_by=CohortBreakdown(power_users, \"Power Users\"), last=30)\n\n# Use inline cohort as a filter in user queries\nresult = ws.query_user(cohort=power_users, mode='aggregate', aggregate='count')\n\n# Track saved cohort size over time alongside event metrics\nresult = ws.query(\n    [Metric(\"Login\", math=\"unique\"), CohortMetric(saved_cohort_id, \"Power Users\")],\n    formula=\"(B \u002F A) * 100\", formula_label=\"% Power Users Active\", last=90,\n)\n",[6969],{"type":43,"tag":58,"props":6970,"children":6971},{"__ignoreMap":96},[6972,6980,6987,6995,7003,7011,7019,7026,7033,7041,7049,7056,7064,7072,7079,7087,7095,7103,7111],{"type":43,"tag":102,"props":6973,"children":6974},{"class":104,"line":105},[6975],{"type":43,"tag":102,"props":6976,"children":6977},{},[6978],{"type":49,"value":6979},"from mixpanel_headless import CohortDefinition, CohortCriteria, CohortBreakdown, CohortMetric\n",{"type":43,"tag":102,"props":6981,"children":6982},{"class":104,"line":114},[6983],{"type":43,"tag":102,"props":6984,"children":6985},{"emptyLinePlaceholder":444},[6986],{"type":49,"value":447},{"type":43,"tag":102,"props":6988,"children":6989},{"class":104,"line":123},[6990],{"type":43,"tag":102,"props":6991,"children":6992},{},[6993],{"type":49,"value":6994},"# \"Power users\": purchased 5+ times in 30 days, never contacted support\n",{"type":43,"tag":102,"props":6996,"children":6997},{"class":104,"line":132},[6998],{"type":43,"tag":102,"props":6999,"children":7000},{},[7001],{"type":49,"value":7002},"power_users = CohortDefinition.all_of(\n",{"type":43,"tag":102,"props":7004,"children":7005},{"class":104,"line":450},[7006],{"type":43,"tag":102,"props":7007,"children":7008},{},[7009],{"type":49,"value":7010},"    CohortCriteria.did_event(\"Purchase\", at_least=5, within_days=30),\n",{"type":43,"tag":102,"props":7012,"children":7013},{"class":104,"line":459},[7014],{"type":43,"tag":102,"props":7015,"children":7016},{},[7017],{"type":49,"value":7018},"    CohortCriteria.did_not_do_event(\"Support Ticket\", within_days=90),\n",{"type":43,"tag":102,"props":7020,"children":7021},{"class":104,"line":468},[7022],{"type":43,"tag":102,"props":7023,"children":7024},{},[7025],{"type":49,"value":2709},{"type":43,"tag":102,"props":7027,"children":7028},{"class":104,"line":477},[7029],{"type":43,"tag":102,"props":7030,"children":7031},{"emptyLinePlaceholder":444},[7032],{"type":49,"value":447},{"type":43,"tag":102,"props":7034,"children":7035},{"class":104,"line":486},[7036],{"type":43,"tag":102,"props":7037,"children":7038},{},[7039],{"type":49,"value":7040},"# Use inline cohort as a breakdown — no need to save first\n",{"type":43,"tag":102,"props":7042,"children":7043},{"class":104,"line":495},[7044],{"type":43,"tag":102,"props":7045,"children":7046},{},[7047],{"type":49,"value":7048},"result = ws.query(\"Login\", group_by=CohortBreakdown(power_users, \"Power Users\"), last=30)\n",{"type":43,"tag":102,"props":7050,"children":7051},{"class":104,"line":503},[7052],{"type":43,"tag":102,"props":7053,"children":7054},{"emptyLinePlaceholder":444},[7055],{"type":49,"value":447},{"type":43,"tag":102,"props":7057,"children":7058},{"class":104,"line":512},[7059],{"type":43,"tag":102,"props":7060,"children":7061},{},[7062],{"type":49,"value":7063},"# Use inline cohort as a filter in user queries\n",{"type":43,"tag":102,"props":7065,"children":7066},{"class":104,"line":521},[7067],{"type":43,"tag":102,"props":7068,"children":7069},{},[7070],{"type":49,"value":7071},"result = ws.query_user(cohort=power_users, mode='aggregate', aggregate='count')\n",{"type":43,"tag":102,"props":7073,"children":7074},{"class":104,"line":530},[7075],{"type":43,"tag":102,"props":7076,"children":7077},{"emptyLinePlaceholder":444},[7078],{"type":49,"value":447},{"type":43,"tag":102,"props":7080,"children":7081},{"class":104,"line":538},[7082],{"type":43,"tag":102,"props":7083,"children":7084},{},[7085],{"type":49,"value":7086},"# Track saved cohort size over time alongside event metrics\n",{"type":43,"tag":102,"props":7088,"children":7089},{"class":104,"line":547},[7090],{"type":43,"tag":102,"props":7091,"children":7092},{},[7093],{"type":49,"value":7094},"result = ws.query(\n",{"type":43,"tag":102,"props":7096,"children":7097},{"class":104,"line":556},[7098],{"type":43,"tag":102,"props":7099,"children":7100},{},[7101],{"type":49,"value":7102},"    [Metric(\"Login\", math=\"unique\"), CohortMetric(saved_cohort_id, \"Power Users\")],\n",{"type":43,"tag":102,"props":7104,"children":7105},{"class":104,"line":948},[7106],{"type":43,"tag":102,"props":7107,"children":7108},{},[7109],{"type":49,"value":7110},"    formula=\"(B \u002F A) * 100\", formula_label=\"% Power Users Active\", last=90,\n",{"type":43,"tag":102,"props":7112,"children":7113},{"class":104,"line":956},[7114],{"type":43,"tag":102,"props":7115,"children":7116},{},[7117],{"type":49,"value":2709},{"type":43,"tag":52,"props":7119,"children":7120},{},[7121,7126,7127,7133,7135,7141],{"type":43,"tag":357,"props":7122,"children":7123},{},[7124],{"type":49,"value":7125},"Frequency Breakdown\u002FFilter — segment by behavioral intensity.",{"type":49,"value":1926},{"type":43,"tag":58,"props":7128,"children":7130},{"className":7129},[],[7131],{"type":49,"value":7132},"FrequencyBreakdown",{"type":49,"value":7134}," answers \"how do users who did X once differ from users who did X ten times?\" ",{"type":43,"tag":58,"props":7136,"children":7138},{"className":7137},[],[7139],{"type":49,"value":7140},"FrequencyFilter",{"type":49,"value":7142}," restricts queries to users meeting a frequency threshold. These bridge \"what users did\" with \"who users are\":",{"type":43,"tag":91,"props":7144,"children":7146},{"className":93,"code":7145,"language":95,"meta":96,"style":96},"from mixpanel_headless import FrequencyBreakdown, FrequencyFilter\n\n# Break down login behavior by purchase frequency\nresult = ws.query(\"Login\", math='unique',\n    group_by=FrequencyBreakdown(\"Purchase\", bucket_size=3, bucket_min=0, bucket_max=15),\n    last=30, mode='total')\n# Reveals: do frequent purchasers also log in more?\n\n# Filter to users who purchased 3+ times in 30 days, then analyze their flow\nresult = ws.query_flow(\"Login\", forward=3,\n    where=FrequencyFilter(\"Purchase\", value=3, date_range_value=30, date_range_unit=\"day\"),\n    last=30)\n# Reveals: what do repeat purchasers do after logging in?\n",[7147],{"type":43,"tag":58,"props":7148,"children":7149},{"__ignoreMap":96},[7150,7158,7165,7173,7181,7189,7197,7205,7212,7220,7228,7236,7244],{"type":43,"tag":102,"props":7151,"children":7152},{"class":104,"line":105},[7153],{"type":43,"tag":102,"props":7154,"children":7155},{},[7156],{"type":49,"value":7157},"from mixpanel_headless import FrequencyBreakdown, FrequencyFilter\n",{"type":43,"tag":102,"props":7159,"children":7160},{"class":104,"line":114},[7161],{"type":43,"tag":102,"props":7162,"children":7163},{"emptyLinePlaceholder":444},[7164],{"type":49,"value":447},{"type":43,"tag":102,"props":7166,"children":7167},{"class":104,"line":123},[7168],{"type":43,"tag":102,"props":7169,"children":7170},{},[7171],{"type":49,"value":7172},"# Break down login behavior by purchase frequency\n",{"type":43,"tag":102,"props":7174,"children":7175},{"class":104,"line":132},[7176],{"type":43,"tag":102,"props":7177,"children":7178},{},[7179],{"type":49,"value":7180},"result = ws.query(\"Login\", math='unique',\n",{"type":43,"tag":102,"props":7182,"children":7183},{"class":104,"line":450},[7184],{"type":43,"tag":102,"props":7185,"children":7186},{},[7187],{"type":49,"value":7188},"    group_by=FrequencyBreakdown(\"Purchase\", bucket_size=3, bucket_min=0, bucket_max=15),\n",{"type":43,"tag":102,"props":7190,"children":7191},{"class":104,"line":459},[7192],{"type":43,"tag":102,"props":7193,"children":7194},{},[7195],{"type":49,"value":7196},"    last=30, mode='total')\n",{"type":43,"tag":102,"props":7198,"children":7199},{"class":104,"line":468},[7200],{"type":43,"tag":102,"props":7201,"children":7202},{},[7203],{"type":49,"value":7204},"# Reveals: do frequent purchasers also log in more?\n",{"type":43,"tag":102,"props":7206,"children":7207},{"class":104,"line":477},[7208],{"type":43,"tag":102,"props":7209,"children":7210},{"emptyLinePlaceholder":444},[7211],{"type":49,"value":447},{"type":43,"tag":102,"props":7213,"children":7214},{"class":104,"line":486},[7215],{"type":43,"tag":102,"props":7216,"children":7217},{},[7218],{"type":49,"value":7219},"# Filter to users who purchased 3+ times in 30 days, then analyze their flow\n",{"type":43,"tag":102,"props":7221,"children":7222},{"class":104,"line":495},[7223],{"type":43,"tag":102,"props":7224,"children":7225},{},[7226],{"type":49,"value":7227},"result = ws.query_flow(\"Login\", forward=3,\n",{"type":43,"tag":102,"props":7229,"children":7230},{"class":104,"line":503},[7231],{"type":43,"tag":102,"props":7232,"children":7233},{},[7234],{"type":49,"value":7235},"    where=FrequencyFilter(\"Purchase\", value=3, date_range_value=30, date_range_unit=\"day\"),\n",{"type":43,"tag":102,"props":7237,"children":7238},{"class":104,"line":512},[7239],{"type":43,"tag":102,"props":7240,"children":7241},{},[7242],{"type":49,"value":7243},"    last=30)\n",{"type":43,"tag":102,"props":7245,"children":7246},{"class":104,"line":521},[7247],{"type":43,"tag":102,"props":7248,"children":7249},{},[7250],{"type":49,"value":7251},"# Reveals: what do repeat purchasers do after logging in?\n",{"type":43,"tag":52,"props":7253,"children":7254},{},[7255],{"type":43,"tag":357,"props":7256,"children":7257},{},[7258],{"type":49,"value":7259},"When to reach for each:",{"type":43,"tag":1404,"props":7261,"children":7262},{},[7263,7273,7283,7293,7310],{"type":43,"tag":1408,"props":7264,"children":7265},{},[7266,7268],{"type":49,"value":7267},"Property values are messy or need derivation → ",{"type":43,"tag":357,"props":7269,"children":7270},{},[7271],{"type":49,"value":7272},"Custom Property",{"type":43,"tag":1408,"props":7274,"children":7275},{},[7276,7278],{"type":49,"value":7277},"Population requires behavioral criteria (did X, didn't do Y, frequency thresholds) → ",{"type":43,"tag":357,"props":7279,"children":7280},{},[7281],{"type":49,"value":7282},"Inline Cohort",{"type":43,"tag":1408,"props":7284,"children":7285},{},[7286,7288],{"type":49,"value":7287},"You need to segment by event frequency (how often, not just whether) → ",{"type":43,"tag":357,"props":7289,"children":7290},{},[7291],{"type":49,"value":7292},"FrequencyBreakdown\u002FFilter",{"type":43,"tag":1408,"props":7294,"children":7295},{},[7296,7298,7303,7304],{"type":49,"value":7297},"You need to compare in-cohort vs out-of-cohort behavior → ",{"type":43,"tag":357,"props":7299,"children":7300},{},[7301],{"type":49,"value":7302},"CohortBreakdown",{"type":49,"value":1517},{"type":43,"tag":58,"props":7305,"children":7307},{"className":7306},[],[7308],{"type":49,"value":7309},"include_negated=True",{"type":43,"tag":1408,"props":7311,"children":7312},{},[7313,7315,7320],{"type":49,"value":7314},"You need to track a segment's size as a time series → ",{"type":43,"tag":357,"props":7316,"children":7317},{},[7318],{"type":49,"value":7319},"CohortMetric",{"type":49,"value":7321}," (saved cohorts only)",{"type":43,"tag":404,"props":7323,"children":7325},{"id":7324},"legacy-queries-counts",[7326],{"type":49,"value":7327},"Legacy Queries & Counts",{"type":43,"tag":52,"props":7329,"children":7330},{},[7331],{"type":49,"value":7332},"These use older APIs. Prefer the typed query methods above when possible.",{"type":43,"tag":91,"props":7334,"children":7336},{"className":93,"code":7335,"language":95,"meta":96,"style":96},"def segmentation(self, event: str, *, from_date: str, to_date: str, on: str | None = None, unit: Literal['day', 'week', 'month'] = 'day', where: str | None = None) -> SegmentationResult: ...\ndef funnel(self, funnel_id: int, *, from_date: str, to_date: str, unit: str | None = None, on: str | None = None) -> FunnelResult: ...\ndef retention(self, *, born_event: str, return_event: str, from_date: str, to_date: str, born_where: str | None = None, return_where: str | None = None, interval: int = 1, interval_count: int = 10, unit: Literal['day', 'week', 'month'] = 'day') -> RetentionResult: ...\ndef event_counts(self, events: list[str], *, from_date: str, to_date: str, type: Literal['general', 'unique', 'average'] = 'general', unit: Literal['day', 'week', 'month'] = 'day') -> EventCountsResult: ...\ndef property_counts(self, event: str, property_name: str, *, from_date: str, to_date: str, type: Literal['general', 'unique', 'average'] = 'general', unit: Literal['day', 'week', 'month'] = 'day', values: list[str] | None = None, limit: int | None = None) -> PropertyCountsResult: ...\ndef frequency(self, *, from_date: str, to_date: str, unit: Literal['day', 'week', 'month'] = 'day', addiction_unit: Literal['hour', 'day'] = 'hour', event: str | None = None, where: str | None = None) -> FrequencyResult: ...\ndef activity_feed(self, distinct_ids: list[str], *, from_date: str | None = None, to_date: str | None = None) -> ActivityFeedResult: ...\ndef query_saved_report(self, bookmark_id: int, *, bookmark_type: Literal['insights', 'funnels', 'retention', 'flows'] = 'insights', from_date: str | None = None, to_date: str | None = None) -> SavedReportResult: ...\ndef query_saved_flows(self, bookmark_id: int) -> FlowsResult: ...\ndef segmentation_numeric(self, event: str, *, from_date: str, to_date: str, on: str, unit: Literal['hour', 'day'] = 'day', where: str | None = None, type: Literal['general', 'unique', 'average'] = 'general') -> NumericBucketResult: ...\ndef segmentation_sum(self, event: str, *, from_date: str, to_date: str, on: str, unit: Literal['hour', 'day'] = 'day', where: str | None = None) -> NumericSumResult: ...\ndef segmentation_average(self, event: str, *, from_date: str, to_date: str, on: str, unit: Literal['hour', 'day'] = 'day', where: str | None = None) -> NumericAverageResult: ...\n",[7337],{"type":43,"tag":58,"props":7338,"children":7339},{"__ignoreMap":96},[7340,7348,7356,7364,7372,7380,7388,7396,7404,7412,7420,7428],{"type":43,"tag":102,"props":7341,"children":7342},{"class":104,"line":105},[7343],{"type":43,"tag":102,"props":7344,"children":7345},{},[7346],{"type":49,"value":7347},"def segmentation(self, event: str, *, from_date: str, to_date: str, on: str | None = None, unit: Literal['day', 'week', 'month'] = 'day', where: str | None = None) -> SegmentationResult: ...\n",{"type":43,"tag":102,"props":7349,"children":7350},{"class":104,"line":114},[7351],{"type":43,"tag":102,"props":7352,"children":7353},{},[7354],{"type":49,"value":7355},"def funnel(self, funnel_id: int, *, from_date: str, to_date: str, unit: str | None = None, on: str | None = None) -> FunnelResult: ...\n",{"type":43,"tag":102,"props":7357,"children":7358},{"class":104,"line":123},[7359],{"type":43,"tag":102,"props":7360,"children":7361},{},[7362],{"type":49,"value":7363},"def retention(self, *, born_event: str, return_event: str, from_date: str, to_date: str, born_where: str | None = None, return_where: str | None = None, interval: int = 1, interval_count: int = 10, unit: Literal['day', 'week', 'month'] = 'day') -> RetentionResult: ...\n",{"type":43,"tag":102,"props":7365,"children":7366},{"class":104,"line":132},[7367],{"type":43,"tag":102,"props":7368,"children":7369},{},[7370],{"type":49,"value":7371},"def event_counts(self, events: list[str], *, from_date: str, to_date: str, type: Literal['general', 'unique', 'average'] = 'general', unit: Literal['day', 'week', 'month'] = 'day') -> EventCountsResult: ...\n",{"type":43,"tag":102,"props":7373,"children":7374},{"class":104,"line":450},[7375],{"type":43,"tag":102,"props":7376,"children":7377},{},[7378],{"type":49,"value":7379},"def property_counts(self, event: str, property_name: str, *, from_date: str, to_date: str, type: Literal['general', 'unique', 'average'] = 'general', unit: Literal['day', 'week', 'month'] = 'day', values: list[str] | None = None, limit: int | None = None) -> PropertyCountsResult: ...\n",{"type":43,"tag":102,"props":7381,"children":7382},{"class":104,"line":459},[7383],{"type":43,"tag":102,"props":7384,"children":7385},{},[7386],{"type":49,"value":7387},"def frequency(self, *, from_date: str, to_date: str, unit: Literal['day', 'week', 'month'] = 'day', addiction_unit: Literal['hour', 'day'] = 'hour', event: str | None = None, where: str | None = None) -> FrequencyResult: ...\n",{"type":43,"tag":102,"props":7389,"children":7390},{"class":104,"line":468},[7391],{"type":43,"tag":102,"props":7392,"children":7393},{},[7394],{"type":49,"value":7395},"def activity_feed(self, distinct_ids: list[str], *, from_date: str | None = None, to_date: str | None = None) -> ActivityFeedResult: ...\n",{"type":43,"tag":102,"props":7397,"children":7398},{"class":104,"line":477},[7399],{"type":43,"tag":102,"props":7400,"children":7401},{},[7402],{"type":49,"value":7403},"def query_saved_report(self, bookmark_id: int, *, bookmark_type: Literal['insights', 'funnels', 'retention', 'flows'] = 'insights', from_date: str | None = None, to_date: str | None = None) -> SavedReportResult: ...\n",{"type":43,"tag":102,"props":7405,"children":7406},{"class":104,"line":486},[7407],{"type":43,"tag":102,"props":7408,"children":7409},{},[7410],{"type":49,"value":7411},"def query_saved_flows(self, bookmark_id: int) -> FlowsResult: ...\n",{"type":43,"tag":102,"props":7413,"children":7414},{"class":104,"line":495},[7415],{"type":43,"tag":102,"props":7416,"children":7417},{},[7418],{"type":49,"value":7419},"def segmentation_numeric(self, event: str, *, from_date: str, to_date: str, on: str, unit: Literal['hour', 'day'] = 'day', where: str | None = None, type: Literal['general', 'unique', 'average'] = 'general') -> NumericBucketResult: ...\n",{"type":43,"tag":102,"props":7421,"children":7422},{"class":104,"line":503},[7423],{"type":43,"tag":102,"props":7424,"children":7425},{},[7426],{"type":49,"value":7427},"def segmentation_sum(self, event: str, *, from_date: str, to_date: str, on: str, unit: Literal['hour', 'day'] = 'day', where: str | None = None) -> NumericSumResult: ...\n",{"type":43,"tag":102,"props":7429,"children":7430},{"class":104,"line":512},[7431],{"type":43,"tag":102,"props":7432,"children":7433},{},[7434],{"type":49,"value":7435},"def segmentation_average(self, event: str, *, from_date: str, to_date: str, on: str, unit: Literal['hour', 'day'] = 'day', where: str | None = None) -> NumericAverageResult: ...\n",{"type":43,"tag":404,"props":7437,"children":7439},{"id":7438},"entity-crud-app-api",[7440],{"type":49,"value":7441},"Entity CRUD (App API)",{"type":43,"tag":52,"props":7443,"children":7444},{},[7445,7447,7453,7455],{"type":49,"value":7446},"All entity methods require a workspace ID. Use ",{"type":43,"tag":58,"props":7448,"children":7450},{"className":7449},[],[7451],{"type":49,"value":7452},"python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py Workspace.\u003Cmethod>",{"type":49,"value":7454}," for full signatures and parameter types.\nUser Guide: ",{"type":43,"tag":58,"props":7456,"children":7458},{"className":7457},[],[7459],{"type":49,"value":7460},"WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fguide\u002Fentity-management\u002Findex.md\")",{"type":43,"tag":4642,"props":7462,"children":7464},{"id":7463},"dashboard-dashboard",[7465,7467,7473],{"type":49,"value":7466},"Dashboard (→ ",{"type":43,"tag":58,"props":7468,"children":7470},{"className":7469},[],[7471],{"type":49,"value":7472},"Dashboard",{"type":49,"value":2190},{"type":43,"tag":52,"props":7475,"children":7476},{},[7477,7483,7484,7490,7491,7497,7498,7504,7505,7511,7512,7518,7519,7525,7526,7532,7533,7539,7540,7546,7547,7553,7554,7560,7561,7567,7568],{"type":43,"tag":58,"props":7478,"children":7480},{"className":7479},[],[7481],{"type":49,"value":7482},"list_dashboards",{"type":49,"value":1451},{"type":43,"tag":58,"props":7485,"children":7487},{"className":7486},[],[7488],{"type":49,"value":7489},"create_dashboard",{"type":49,"value":1451},{"type":43,"tag":58,"props":7492,"children":7494},{"className":7493},[],[7495],{"type":49,"value":7496},"get_dashboard",{"type":49,"value":1451},{"type":43,"tag":58,"props":7499,"children":7501},{"className":7500},[],[7502],{"type":49,"value":7503},"update_dashboard",{"type":49,"value":1451},{"type":43,"tag":58,"props":7506,"children":7508},{"className":7507},[],[7509],{"type":49,"value":7510},"delete_dashboard",{"type":49,"value":1451},{"type":43,"tag":58,"props":7513,"children":7515},{"className":7514},[],[7516],{"type":49,"value":7517},"bulk_delete_dashboards",{"type":49,"value":1451},{"type":43,"tag":58,"props":7520,"children":7522},{"className":7521},[],[7523],{"type":49,"value":7524},"favorite_dashboard",{"type":49,"value":1451},{"type":43,"tag":58,"props":7527,"children":7529},{"className":7528},[],[7530],{"type":49,"value":7531},"unfavorite_dashboard",{"type":49,"value":1451},{"type":43,"tag":58,"props":7534,"children":7536},{"className":7535},[],[7537],{"type":49,"value":7538},"pin_dashboard",{"type":49,"value":1451},{"type":43,"tag":58,"props":7541,"children":7543},{"className":7542},[],[7544],{"type":49,"value":7545},"unpin_dashboard",{"type":49,"value":1451},{"type":43,"tag":58,"props":7548,"children":7550},{"className":7549},[],[7551],{"type":49,"value":7552},"add_report_to_dashboard",{"type":49,"value":1451},{"type":43,"tag":58,"props":7555,"children":7557},{"className":7556},[],[7558],{"type":49,"value":7559},"remove_report_from_dashboard",{"type":49,"value":1451},{"type":43,"tag":58,"props":7562,"children":7564},{"className":7563},[],[7565],{"type":49,"value":7566},"update_text_card",{"type":49,"value":1451},{"type":43,"tag":58,"props":7569,"children":7571},{"className":7570},[],[7572],{"type":49,"value":7573},"update_report_link",{"type":43,"tag":52,"props":7575,"children":7576},{},[7577,7582,7583,7589,7591,7597,7598,7604,7605,7611,7612,7618,7619,7625,7626],{"type":43,"tag":357,"props":7578,"children":7579},{},[7580],{"type":49,"value":7581},"Blueprints:",{"type":49,"value":1926},{"type":43,"tag":58,"props":7584,"children":7586},{"className":7585},[],[7587],{"type":49,"value":7588},"list_blueprint_templates",{"type":49,"value":7590}," → ",{"type":43,"tag":58,"props":7592,"children":7594},{"className":7593},[],[7595],{"type":49,"value":7596},"list[BlueprintTemplate]",{"type":49,"value":1451},{"type":43,"tag":58,"props":7599,"children":7601},{"className":7600},[],[7602],{"type":49,"value":7603},"create_blueprint",{"type":49,"value":1451},{"type":43,"tag":58,"props":7606,"children":7608},{"className":7607},[],[7609],{"type":49,"value":7610},"get_blueprint_config",{"type":49,"value":1451},{"type":43,"tag":58,"props":7613,"children":7615},{"className":7614},[],[7616],{"type":49,"value":7617},"update_blueprint_cohorts",{"type":49,"value":1451},{"type":43,"tag":58,"props":7620,"children":7622},{"className":7621},[],[7623],{"type":49,"value":7624},"finalize_blueprint",{"type":49,"value":1451},{"type":43,"tag":58,"props":7627,"children":7629},{"className":7628},[],[7630],{"type":49,"value":7631},"create_rca_dashboard",{"type":43,"tag":52,"props":7633,"children":7634},{},[7635,7640,7641,7647,7648,7654,7655,7661,7662],{"type":43,"tag":357,"props":7636,"children":7637},{},[7638],{"type":49,"value":7639},"Helpers:",{"type":49,"value":1926},{"type":43,"tag":58,"props":7642,"children":7644},{"className":7643},[],[7645],{"type":49,"value":7646},"get_bookmark_dashboard_ids",{"type":49,"value":7590},{"type":43,"tag":58,"props":7649,"children":7651},{"className":7650},[],[7652],{"type":49,"value":7653},"list[int]",{"type":49,"value":1451},{"type":43,"tag":58,"props":7656,"children":7658},{"className":7657},[],[7659],{"type":49,"value":7660},"get_dashboard_erf",{"type":49,"value":7590},{"type":43,"tag":58,"props":7663,"children":7665},{"className":7664},[],[7666],{"type":49,"value":7667},"dict",{"type":43,"tag":4642,"props":7669,"children":7671},{"id":7670},"bookmark-report-bookmark",[7672,7674,7680],{"type":49,"value":7673},"Bookmark \u002F Report (→ ",{"type":43,"tag":58,"props":7675,"children":7677},{"className":7676},[],[7678],{"type":49,"value":7679},"Bookmark",{"type":49,"value":2190},{"type":43,"tag":52,"props":7682,"children":7683},{},[7684,7690,7691,7697,7698,7704,7705,7711,7712,7718,7719,7725,7726,7732,7733,7739,7740,7745,7746,7752,7753],{"type":43,"tag":58,"props":7685,"children":7687},{"className":7686},[],[7688],{"type":49,"value":7689},"list_bookmarks_v2",{"type":49,"value":1451},{"type":43,"tag":58,"props":7692,"children":7694},{"className":7693},[],[7695],{"type":49,"value":7696},"create_bookmark",{"type":49,"value":1451},{"type":43,"tag":58,"props":7699,"children":7701},{"className":7700},[],[7702],{"type":49,"value":7703},"get_bookmark",{"type":49,"value":1451},{"type":43,"tag":58,"props":7706,"children":7708},{"className":7707},[],[7709],{"type":49,"value":7710},"update_bookmark",{"type":49,"value":1451},{"type":43,"tag":58,"props":7713,"children":7715},{"className":7714},[],[7716],{"type":49,"value":7717},"delete_bookmark",{"type":49,"value":1451},{"type":43,"tag":58,"props":7720,"children":7722},{"className":7721},[],[7723],{"type":49,"value":7724},"bulk_delete_bookmarks",{"type":49,"value":1451},{"type":43,"tag":58,"props":7727,"children":7729},{"className":7728},[],[7730],{"type":49,"value":7731},"bulk_update_bookmarks",{"type":49,"value":1451},{"type":43,"tag":58,"props":7734,"children":7736},{"className":7735},[],[7737],{"type":49,"value":7738},"bookmark_linked_dashboard_ids",{"type":49,"value":7590},{"type":43,"tag":58,"props":7741,"children":7743},{"className":7742},[],[7744],{"type":49,"value":7653},{"type":49,"value":1451},{"type":43,"tag":58,"props":7747,"children":7749},{"className":7748},[],[7750],{"type":49,"value":7751},"get_bookmark_history",{"type":49,"value":7590},{"type":43,"tag":58,"props":7754,"children":7756},{"className":7755},[],[7757],{"type":49,"value":7758},"BookmarkHistoryResponse",{"type":43,"tag":4642,"props":7760,"children":7762},{"id":7761},"cohort-cohort",[7763,7765,7771],{"type":49,"value":7764},"Cohort (→ ",{"type":43,"tag":58,"props":7766,"children":7768},{"className":7767},[],[7769],{"type":49,"value":7770},"Cohort",{"type":49,"value":2190},{"type":43,"tag":52,"props":7773,"children":7774},{},[7775,7781,7782,7788,7789,7795,7796,7802,7803,7809,7810,7816,7817],{"type":43,"tag":58,"props":7776,"children":7778},{"className":7777},[],[7779],{"type":49,"value":7780},"list_cohorts_full",{"type":49,"value":1451},{"type":43,"tag":58,"props":7783,"children":7785},{"className":7784},[],[7786],{"type":49,"value":7787},"get_cohort",{"type":49,"value":1451},{"type":43,"tag":58,"props":7790,"children":7792},{"className":7791},[],[7793],{"type":49,"value":7794},"create_cohort",{"type":49,"value":1451},{"type":43,"tag":58,"props":7797,"children":7799},{"className":7798},[],[7800],{"type":49,"value":7801},"update_cohort",{"type":49,"value":1451},{"type":43,"tag":58,"props":7804,"children":7806},{"className":7805},[],[7807],{"type":49,"value":7808},"delete_cohort",{"type":49,"value":1451},{"type":43,"tag":58,"props":7811,"children":7813},{"className":7812},[],[7814],{"type":49,"value":7815},"bulk_delete_cohorts",{"type":49,"value":1451},{"type":43,"tag":58,"props":7818,"children":7820},{"className":7819},[],[7821],{"type":49,"value":7822},"bulk_update_cohorts",{"type":43,"tag":4642,"props":7824,"children":7826},{"id":7825},"feature-flag-featureflag",[7827,7829,7835],{"type":49,"value":7828},"Feature Flag (→ ",{"type":43,"tag":58,"props":7830,"children":7832},{"className":7831},[],[7833],{"type":49,"value":7834},"FeatureFlag",{"type":49,"value":2190},{"type":43,"tag":52,"props":7837,"children":7838},{},[7839,7845,7846,7852,7853,7859,7860,7866,7867,7873,7874,7880,7881,7887,7888,7894,7895,7901,7902,7908,7909,7915,7916,7922,7923],{"type":43,"tag":58,"props":7840,"children":7842},{"className":7841},[],[7843],{"type":49,"value":7844},"list_feature_flags",{"type":49,"value":1451},{"type":43,"tag":58,"props":7847,"children":7849},{"className":7848},[],[7850],{"type":49,"value":7851},"create_feature_flag",{"type":49,"value":1451},{"type":43,"tag":58,"props":7854,"children":7856},{"className":7855},[],[7857],{"type":49,"value":7858},"get_feature_flag",{"type":49,"value":1451},{"type":43,"tag":58,"props":7861,"children":7863},{"className":7862},[],[7864],{"type":49,"value":7865},"update_feature_flag",{"type":49,"value":1451},{"type":43,"tag":58,"props":7868,"children":7870},{"className":7869},[],[7871],{"type":49,"value":7872},"delete_feature_flag",{"type":49,"value":1451},{"type":43,"tag":58,"props":7875,"children":7877},{"className":7876},[],[7878],{"type":49,"value":7879},"archive_feature_flag",{"type":49,"value":1451},{"type":43,"tag":58,"props":7882,"children":7884},{"className":7883},[],[7885],{"type":49,"value":7886},"restore_feature_flag",{"type":49,"value":1451},{"type":43,"tag":58,"props":7889,"children":7891},{"className":7890},[],[7892],{"type":49,"value":7893},"duplicate_feature_flag",{"type":49,"value":1451},{"type":43,"tag":58,"props":7896,"children":7898},{"className":7897},[],[7899],{"type":49,"value":7900},"set_flag_test_users",{"type":49,"value":1451},{"type":43,"tag":58,"props":7903,"children":7905},{"className":7904},[],[7906],{"type":49,"value":7907},"get_flag_history",{"type":49,"value":7590},{"type":43,"tag":58,"props":7910,"children":7912},{"className":7911},[],[7913],{"type":49,"value":7914},"FlagHistoryResponse",{"type":49,"value":1451},{"type":43,"tag":58,"props":7917,"children":7919},{"className":7918},[],[7920],{"type":49,"value":7921},"get_flag_limits",{"type":49,"value":7590},{"type":43,"tag":58,"props":7924,"children":7926},{"className":7925},[],[7927],{"type":49,"value":7928},"FlagLimitsResponse",{"type":43,"tag":4642,"props":7930,"children":7932},{"id":7931},"experiment-experiment",[7933,7935,7941],{"type":49,"value":7934},"Experiment (→ ",{"type":43,"tag":58,"props":7936,"children":7938},{"className":7937},[],[7939],{"type":49,"value":7940},"Experiment",{"type":49,"value":2190},{"type":43,"tag":52,"props":7943,"children":7944},{},[7945,7951,7952,7958,7959,7965,7966,7972,7973,7979,7980,7986,7987,7993,7994,8000,8001,8007,8008,8014,8015,8021,8022,8028,8029],{"type":43,"tag":58,"props":7946,"children":7948},{"className":7947},[],[7949],{"type":49,"value":7950},"list_experiments",{"type":49,"value":1451},{"type":43,"tag":58,"props":7953,"children":7955},{"className":7954},[],[7956],{"type":49,"value":7957},"create_experiment",{"type":49,"value":1451},{"type":43,"tag":58,"props":7960,"children":7962},{"className":7961},[],[7963],{"type":49,"value":7964},"get_experiment",{"type":49,"value":1451},{"type":43,"tag":58,"props":7967,"children":7969},{"className":7968},[],[7970],{"type":49,"value":7971},"update_experiment",{"type":49,"value":1451},{"type":43,"tag":58,"props":7974,"children":7976},{"className":7975},[],[7977],{"type":49,"value":7978},"delete_experiment",{"type":49,"value":1451},{"type":43,"tag":58,"props":7981,"children":7983},{"className":7982},[],[7984],{"type":49,"value":7985},"launch_experiment",{"type":49,"value":1451},{"type":43,"tag":58,"props":7988,"children":7990},{"className":7989},[],[7991],{"type":49,"value":7992},"conclude_experiment",{"type":49,"value":1451},{"type":43,"tag":58,"props":7995,"children":7997},{"className":7996},[],[7998],{"type":49,"value":7999},"decide_experiment",{"type":49,"value":1451},{"type":43,"tag":58,"props":8002,"children":8004},{"className":8003},[],[8005],{"type":49,"value":8006},"archive_experiment",{"type":49,"value":1451},{"type":43,"tag":58,"props":8009,"children":8011},{"className":8010},[],[8012],{"type":49,"value":8013},"restore_experiment",{"type":49,"value":1451},{"type":43,"tag":58,"props":8016,"children":8018},{"className":8017},[],[8019],{"type":49,"value":8020},"duplicate_experiment",{"type":49,"value":1451},{"type":43,"tag":58,"props":8023,"children":8025},{"className":8024},[],[8026],{"type":49,"value":8027},"list_erf_experiments",{"type":49,"value":7590},{"type":43,"tag":58,"props":8030,"children":8032},{"className":8031},[],[8033],{"type":49,"value":8034},"list[dict]",{"type":43,"tag":4642,"props":8036,"children":8038},{"id":8037},"alert-customalert",[8039,8041,8047],{"type":49,"value":8040},"Alert (→ ",{"type":43,"tag":58,"props":8042,"children":8044},{"className":8043},[],[8045],{"type":49,"value":8046},"CustomAlert",{"type":49,"value":2190},{"type":43,"tag":52,"props":8049,"children":8050},{},[8051,8057,8058,8064,8065,8071,8072,8078,8079,8085,8086,8092,8093,8099,8100,8106,8107,8113,8114,8120,8121,8127,8128,8134,8135],{"type":43,"tag":58,"props":8052,"children":8054},{"className":8053},[],[8055],{"type":49,"value":8056},"list_alerts",{"type":49,"value":1451},{"type":43,"tag":58,"props":8059,"children":8061},{"className":8060},[],[8062],{"type":49,"value":8063},"create_alert",{"type":49,"value":1451},{"type":43,"tag":58,"props":8066,"children":8068},{"className":8067},[],[8069],{"type":49,"value":8070},"get_alert",{"type":49,"value":1451},{"type":43,"tag":58,"props":8073,"children":8075},{"className":8074},[],[8076],{"type":49,"value":8077},"update_alert",{"type":49,"value":1451},{"type":43,"tag":58,"props":8080,"children":8082},{"className":8081},[],[8083],{"type":49,"value":8084},"delete_alert",{"type":49,"value":1451},{"type":43,"tag":58,"props":8087,"children":8089},{"className":8088},[],[8090],{"type":49,"value":8091},"bulk_delete_alerts",{"type":49,"value":1451},{"type":43,"tag":58,"props":8094,"children":8096},{"className":8095},[],[8097],{"type":49,"value":8098},"get_alert_count",{"type":49,"value":7590},{"type":43,"tag":58,"props":8101,"children":8103},{"className":8102},[],[8104],{"type":49,"value":8105},"AlertCount",{"type":49,"value":1451},{"type":43,"tag":58,"props":8108,"children":8110},{"className":8109},[],[8111],{"type":49,"value":8112},"get_alert_history",{"type":49,"value":7590},{"type":43,"tag":58,"props":8115,"children":8117},{"className":8116},[],[8118],{"type":49,"value":8119},"AlertHistoryResponse",{"type":49,"value":1451},{"type":43,"tag":58,"props":8122,"children":8124},{"className":8123},[],[8125],{"type":49,"value":8126},"test_alert",{"type":49,"value":1451},{"type":43,"tag":58,"props":8129,"children":8131},{"className":8130},[],[8132],{"type":49,"value":8133},"get_alert_screenshot_url",{"type":49,"value":1451},{"type":43,"tag":58,"props":8136,"children":8138},{"className":8137},[],[8139],{"type":49,"value":8140},"validate_alerts_for_bookmark",{"type":43,"tag":4642,"props":8142,"children":8144},{"id":8143},"annotation-annotation",[8145,8147,8153],{"type":49,"value":8146},"Annotation (→ ",{"type":43,"tag":58,"props":8148,"children":8150},{"className":8149},[],[8151],{"type":49,"value":8152},"Annotation",{"type":49,"value":2190},{"type":43,"tag":52,"props":8155,"children":8156},{},[8157,8163,8164,8170,8171,8177,8178,8184,8185,8191,8192,8198,8199,8205,8206],{"type":43,"tag":58,"props":8158,"children":8160},{"className":8159},[],[8161],{"type":49,"value":8162},"list_annotations",{"type":49,"value":1451},{"type":43,"tag":58,"props":8165,"children":8167},{"className":8166},[],[8168],{"type":49,"value":8169},"create_annotation",{"type":49,"value":1451},{"type":43,"tag":58,"props":8172,"children":8174},{"className":8173},[],[8175],{"type":49,"value":8176},"get_annotation",{"type":49,"value":1451},{"type":43,"tag":58,"props":8179,"children":8181},{"className":8180},[],[8182],{"type":49,"value":8183},"update_annotation",{"type":49,"value":1451},{"type":43,"tag":58,"props":8186,"children":8188},{"className":8187},[],[8189],{"type":49,"value":8190},"delete_annotation",{"type":49,"value":1451},{"type":43,"tag":58,"props":8193,"children":8195},{"className":8194},[],[8196],{"type":49,"value":8197},"list_annotation_tags",{"type":49,"value":7590},{"type":43,"tag":58,"props":8200,"children":8202},{"className":8201},[],[8203],{"type":49,"value":8204},"list[AnnotationTag]",{"type":49,"value":1451},{"type":43,"tag":58,"props":8207,"children":8209},{"className":8208},[],[8210],{"type":49,"value":8211},"create_annotation_tag",{"type":43,"tag":4642,"props":8213,"children":8215},{"id":8214},"webhook-projectwebhook",[8216,8218,8224],{"type":49,"value":8217},"Webhook (→ ",{"type":43,"tag":58,"props":8219,"children":8221},{"className":8220},[],[8222],{"type":49,"value":8223},"ProjectWebhook",{"type":49,"value":2190},{"type":43,"tag":52,"props":8226,"children":8227},{},[8228,8234,8235,8241,8242,8248,8249,8255,8256],{"type":43,"tag":58,"props":8229,"children":8231},{"className":8230},[],[8232],{"type":49,"value":8233},"list_webhooks",{"type":49,"value":1451},{"type":43,"tag":58,"props":8236,"children":8238},{"className":8237},[],[8239],{"type":49,"value":8240},"create_webhook",{"type":49,"value":1451},{"type":43,"tag":58,"props":8243,"children":8245},{"className":8244},[],[8246],{"type":49,"value":8247},"update_webhook",{"type":49,"value":1451},{"type":43,"tag":58,"props":8250,"children":8252},{"className":8251},[],[8253],{"type":49,"value":8254},"delete_webhook",{"type":49,"value":1451},{"type":43,"tag":58,"props":8257,"children":8259},{"className":8258},[],[8260],{"type":49,"value":8261},"test_webhook",{"type":43,"tag":4642,"props":8263,"children":8265},{"id":8264},"lexicon-data-governance",[8266],{"type":49,"value":8267},"Lexicon & Data Governance",{"type":43,"tag":52,"props":8269,"children":8270},{},[8271,8276,8277,8283,8284,8290,8291,8297,8298,8304,8305,8311,8312,8318,8319,8325,8326,8332,8333,8339,8340],{"type":43,"tag":357,"props":8272,"children":8273},{},[8274],{"type":49,"value":8275},"Event\u002FProperty Definitions:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8278,"children":8280},{"className":8279},[],[8281],{"type":49,"value":8282},"get_event_definitions",{"type":49,"value":1451},{"type":43,"tag":58,"props":8285,"children":8287},{"className":8286},[],[8288],{"type":49,"value":8289},"update_event_definition",{"type":49,"value":1451},{"type":43,"tag":58,"props":8292,"children":8294},{"className":8293},[],[8295],{"type":49,"value":8296},"delete_event_definition",{"type":49,"value":1451},{"type":43,"tag":58,"props":8299,"children":8301},{"className":8300},[],[8302],{"type":49,"value":8303},"bulk_update_event_definitions",{"type":49,"value":1451},{"type":43,"tag":58,"props":8306,"children":8308},{"className":8307},[],[8309],{"type":49,"value":8310},"get_property_definitions",{"type":49,"value":1451},{"type":43,"tag":58,"props":8313,"children":8315},{"className":8314},[],[8316],{"type":49,"value":8317},"update_property_definition",{"type":49,"value":1451},{"type":43,"tag":58,"props":8320,"children":8322},{"className":8321},[],[8323],{"type":49,"value":8324},"bulk_update_property_definitions",{"type":49,"value":1451},{"type":43,"tag":58,"props":8327,"children":8329},{"className":8328},[],[8330],{"type":49,"value":8331},"export_lexicon",{"type":49,"value":1451},{"type":43,"tag":58,"props":8334,"children":8336},{"className":8335},[],[8337],{"type":49,"value":8338},"get_event_history",{"type":49,"value":1451},{"type":43,"tag":58,"props":8341,"children":8343},{"className":8342},[],[8344],{"type":49,"value":8345},"get_property_history",{"type":43,"tag":52,"props":8347,"children":8348},{},[8349,8354,8355,8361,8362,8368,8369,8375,8376],{"type":43,"tag":357,"props":8350,"children":8351},{},[8352],{"type":49,"value":8353},"Tags:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8356,"children":8358},{"className":8357},[],[8359],{"type":49,"value":8360},"list_lexicon_tags",{"type":49,"value":1451},{"type":43,"tag":58,"props":8363,"children":8365},{"className":8364},[],[8366],{"type":49,"value":8367},"create_lexicon_tag",{"type":49,"value":1451},{"type":43,"tag":58,"props":8370,"children":8372},{"className":8371},[],[8373],{"type":49,"value":8374},"update_lexicon_tag",{"type":49,"value":1451},{"type":43,"tag":58,"props":8377,"children":8379},{"className":8378},[],[8380],{"type":49,"value":8381},"delete_lexicon_tag",{"type":43,"tag":52,"props":8383,"children":8384},{},[8385,8390,8391,8397,8398,8404,8405,8411,8412,8418,8419],{"type":43,"tag":357,"props":8386,"children":8387},{},[8388],{"type":49,"value":8389},"Drop Filters:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8392,"children":8394},{"className":8393},[],[8395],{"type":49,"value":8396},"list_drop_filters",{"type":49,"value":1451},{"type":43,"tag":58,"props":8399,"children":8401},{"className":8400},[],[8402],{"type":49,"value":8403},"create_drop_filter",{"type":49,"value":1451},{"type":43,"tag":58,"props":8406,"children":8408},{"className":8407},[],[8409],{"type":49,"value":8410},"update_drop_filter",{"type":49,"value":1451},{"type":43,"tag":58,"props":8413,"children":8415},{"className":8414},[],[8416],{"type":49,"value":8417},"delete_drop_filter",{"type":49,"value":1451},{"type":43,"tag":58,"props":8420,"children":8422},{"className":8421},[],[8423],{"type":49,"value":8424},"get_drop_filter_limits",{"type":43,"tag":52,"props":8426,"children":8427},{},[8428,8433,8434,8440,8441,8447,8448,8454,8455,8461,8462,8468,8469],{"type":43,"tag":357,"props":8429,"children":8430},{},[8431],{"type":49,"value":8432},"Custom Properties:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8435,"children":8437},{"className":8436},[],[8438],{"type":49,"value":8439},"list_custom_properties",{"type":49,"value":1451},{"type":43,"tag":58,"props":8442,"children":8444},{"className":8443},[],[8445],{"type":49,"value":8446},"create_custom_property",{"type":49,"value":1451},{"type":43,"tag":58,"props":8449,"children":8451},{"className":8450},[],[8452],{"type":49,"value":8453},"get_custom_property",{"type":49,"value":1451},{"type":43,"tag":58,"props":8456,"children":8458},{"className":8457},[],[8459],{"type":49,"value":8460},"update_custom_property",{"type":49,"value":1451},{"type":43,"tag":58,"props":8463,"children":8465},{"className":8464},[],[8466],{"type":49,"value":8467},"delete_custom_property",{"type":49,"value":1451},{"type":43,"tag":58,"props":8470,"children":8472},{"className":8471},[],[8473],{"type":49,"value":8474},"validate_custom_property",{"type":43,"tag":52,"props":8476,"children":8477},{},[8478,8483,8484,8490,8491,8497,8498],{"type":43,"tag":357,"props":8479,"children":8480},{},[8481],{"type":49,"value":8482},"Custom Events:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8485,"children":8487},{"className":8486},[],[8488],{"type":49,"value":8489},"list_custom_events",{"type":49,"value":1451},{"type":43,"tag":58,"props":8492,"children":8494},{"className":8493},[],[8495],{"type":49,"value":8496},"update_custom_event",{"type":49,"value":1451},{"type":43,"tag":58,"props":8499,"children":8501},{"className":8500},[],[8502],{"type":49,"value":8503},"delete_custom_event",{"type":43,"tag":52,"props":8505,"children":8506},{},[8507,8512,8513,8519,8520,8526,8527,8533,8534,8540,8541],{"type":43,"tag":357,"props":8508,"children":8509},{},[8510],{"type":49,"value":8511},"Lookup Tables:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8514,"children":8516},{"className":8515},[],[8517],{"type":49,"value":8518},"list_lookup_tables",{"type":49,"value":1451},{"type":43,"tag":58,"props":8521,"children":8523},{"className":8522},[],[8524],{"type":49,"value":8525},"upload_lookup_table",{"type":49,"value":1451},{"type":43,"tag":58,"props":8528,"children":8530},{"className":8529},[],[8531],{"type":49,"value":8532},"download_lookup_table",{"type":49,"value":1451},{"type":43,"tag":58,"props":8535,"children":8537},{"className":8536},[],[8538],{"type":49,"value":8539},"update_lookup_table",{"type":49,"value":1451},{"type":43,"tag":58,"props":8542,"children":8544},{"className":8543},[],[8545],{"type":49,"value":8546},"delete_lookup_tables",{"type":43,"tag":52,"props":8548,"children":8549},{},[8550,8555,8556,8562,8563,8569,8570,8576,8577,8583,8584,8590,8591],{"type":43,"tag":357,"props":8551,"children":8552},{},[8553],{"type":49,"value":8554},"Schema Registry:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8557,"children":8559},{"className":8558},[],[8560],{"type":49,"value":8561},"list_schema_registry",{"type":49,"value":1451},{"type":43,"tag":58,"props":8564,"children":8566},{"className":8565},[],[8567],{"type":49,"value":8568},"create_schema",{"type":49,"value":1451},{"type":43,"tag":58,"props":8571,"children":8573},{"className":8572},[],[8574],{"type":49,"value":8575},"update_schema",{"type":49,"value":1451},{"type":43,"tag":58,"props":8578,"children":8580},{"className":8579},[],[8581],{"type":49,"value":8582},"create_schemas_bulk",{"type":49,"value":1451},{"type":43,"tag":58,"props":8585,"children":8587},{"className":8586},[],[8588],{"type":49,"value":8589},"update_schemas_bulk",{"type":49,"value":1451},{"type":43,"tag":58,"props":8592,"children":8594},{"className":8593},[],[8595],{"type":49,"value":8596},"delete_schemas",{"type":43,"tag":52,"props":8598,"children":8599},{},[8600,8605,8606,8612,8613,8619,8620,8626,8627,8633,8634],{"type":43,"tag":357,"props":8601,"children":8602},{},[8603],{"type":49,"value":8604},"Schema Enforcement:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8607,"children":8609},{"className":8608},[],[8610],{"type":49,"value":8611},"get_schema_enforcement",{"type":49,"value":1451},{"type":43,"tag":58,"props":8614,"children":8616},{"className":8615},[],[8617],{"type":49,"value":8618},"init_schema_enforcement",{"type":49,"value":1451},{"type":43,"tag":58,"props":8621,"children":8623},{"className":8622},[],[8624],{"type":49,"value":8625},"update_schema_enforcement",{"type":49,"value":1451},{"type":43,"tag":58,"props":8628,"children":8630},{"className":8629},[],[8631],{"type":49,"value":8632},"replace_schema_enforcement",{"type":49,"value":1451},{"type":43,"tag":58,"props":8635,"children":8637},{"className":8636},[],[8638],{"type":49,"value":8639},"delete_schema_enforcement",{"type":43,"tag":52,"props":8641,"children":8642},{},[8643,8648,8649,8655,8656,8662,8663,8669,8670,8676,8677],{"type":43,"tag":357,"props":8644,"children":8645},{},[8646],{"type":49,"value":8647},"Audit & Monitoring:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8650,"children":8652},{"className":8651},[],[8653],{"type":49,"value":8654},"run_audit",{"type":49,"value":1451},{"type":43,"tag":58,"props":8657,"children":8659},{"className":8658},[],[8660],{"type":49,"value":8661},"run_audit_events_only",{"type":49,"value":1451},{"type":43,"tag":58,"props":8664,"children":8666},{"className":8665},[],[8667],{"type":49,"value":8668},"list_data_volume_anomalies",{"type":49,"value":1451},{"type":43,"tag":58,"props":8671,"children":8673},{"className":8672},[],[8674],{"type":49,"value":8675},"update_anomaly",{"type":49,"value":1451},{"type":43,"tag":58,"props":8678,"children":8680},{"className":8679},[],[8681],{"type":49,"value":8682},"bulk_update_anomalies",{"type":43,"tag":52,"props":8684,"children":8685},{},[8686,8691,8692,8698,8699,8705,8706,8712,8713],{"type":43,"tag":357,"props":8687,"children":8688},{},[8689],{"type":49,"value":8690},"Data Deletion:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8693,"children":8695},{"className":8694},[],[8696],{"type":49,"value":8697},"list_deletion_requests",{"type":49,"value":1451},{"type":43,"tag":58,"props":8700,"children":8702},{"className":8701},[],[8703],{"type":49,"value":8704},"create_deletion_request",{"type":49,"value":1451},{"type":43,"tag":58,"props":8707,"children":8709},{"className":8708},[],[8710],{"type":49,"value":8711},"cancel_deletion_request",{"type":49,"value":1451},{"type":43,"tag":58,"props":8714,"children":8716},{"className":8715},[],[8717],{"type":49,"value":8718},"preview_deletion_filters",{"type":43,"tag":52,"props":8720,"children":8721},{},[8722,8727,8728],{"type":43,"tag":357,"props":8723,"children":8724},{},[8725],{"type":49,"value":8726},"Other:",{"type":49,"value":1926},{"type":43,"tag":58,"props":8729,"children":8731},{"className":8730},[],[8732],{"type":49,"value":8733},"get_tracking_metadata",{"type":43,"tag":404,"props":8735,"children":8737},{"id":8736},"business-context",[8738],{"type":49,"value":8739},"Business Context",{"type":43,"tag":52,"props":8741,"children":8742},{},[8743],{"type":49,"value":8744},"Read and write the markdown documentation that grounds AI assistants in your organization's structure and goals, exposed as a typed Python API.",{"type":43,"tag":52,"props":8746,"children":8747},{},[8748,8750,8756,8758,8764,8766,8771,8773,8779,8781,8787,8789,8795],{"type":49,"value":8749},"Two scopes — ",{"type":43,"tag":58,"props":8751,"children":8753},{"className":8752},[],[8754],{"type":49,"value":8755},"level=\"organization\"",{"type":49,"value":8757}," (shared across the whole org) and ",{"type":43,"tag":58,"props":8759,"children":8761},{"className":8760},[],[8762],{"type":49,"value":8763},"level=\"project\"",{"type":49,"value":8765}," (per-project). 50,000-character cap enforced ",{"type":43,"tag":357,"props":8767,"children":8768},{},[8769],{"type":49,"value":8770},"client-side before any HTTP call",{"type":49,"value":8772}," so oversize input fails fast. Org-level operations auto-resolve ",{"type":43,"tag":58,"props":8774,"children":8776},{"className":8775},[],[8777],{"type":49,"value":8778},"organization_id",{"type":49,"value":8780}," from the cached ",{"type":43,"tag":58,"props":8782,"children":8784},{"className":8783},[],[8785],{"type":49,"value":8786},"\u002Fme",{"type":49,"value":8788}," response; pass ",{"type":43,"tag":58,"props":8790,"children":8792},{"className":8791},[],[8793],{"type":49,"value":8794},"organization_id=N",{"type":49,"value":8796}," to override.",{"type":43,"tag":52,"props":8798,"children":8799},{},[8800,8801,8807],{"type":49,"value":3413},{"type":43,"tag":58,"props":8802,"children":8804},{"className":8803},[],[8805],{"type":49,"value":8806},"python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py search business_context",{"type":49,"value":8808}," to see all four methods, two types, and one exception.",{"type":43,"tag":91,"props":8810,"children":8812},{"className":93,"code":8811,"language":95,"meta":96,"style":96},"from mixpanel_headless import BUSINESS_CONTEXT_MAX_CHARS  # 50_000\n\n# Read\nproject_ctx = ws.get_business_context(level=\"project\")\norg_ctx = ws.get_business_context(level=\"organization\")  # auto-resolves org_id\nexplicit = ws.get_business_context(level=\"organization\", organization_id=42)\n\n# Read both at once (single round-trip via \u002Fbusiness-context\u002Fchain)\nchain = ws.get_business_context_chain()\nprint(chain.organization.content)\nprint(chain.project.content)\n\n# Write (full-replace; pass \"\" to clear, or use clear_business_context())\nws.set_business_context(\"# About Acme\\n…\", level=\"project\")\nws.set_business_context(\"# Org-wide standards\", level=\"organization\")\nws.clear_business_context(level=\"project\")\n\n# All return BusinessContext with: level, content, organization_id, project_id\n# Plus convenience .is_empty and .character_count properties (Python only)\nprint(f\"{project_ctx.character_count}\u002F{BUSINESS_CONTEXT_MAX_CHARS} chars; \"\n      f\"empty={project_ctx.is_empty}\")\n",[8813],{"type":43,"tag":58,"props":8814,"children":8815},{"__ignoreMap":96},[8816,8824,8831,8839,8847,8855,8863,8870,8878,8886,8894,8902,8909,8917,8925,8933,8941,8948,8956,8964,8972],{"type":43,"tag":102,"props":8817,"children":8818},{"class":104,"line":105},[8819],{"type":43,"tag":102,"props":8820,"children":8821},{},[8822],{"type":49,"value":8823},"from mixpanel_headless import BUSINESS_CONTEXT_MAX_CHARS  # 50_000\n",{"type":43,"tag":102,"props":8825,"children":8826},{"class":104,"line":114},[8827],{"type":43,"tag":102,"props":8828,"children":8829},{"emptyLinePlaceholder":444},[8830],{"type":49,"value":447},{"type":43,"tag":102,"props":8832,"children":8833},{"class":104,"line":123},[8834],{"type":43,"tag":102,"props":8835,"children":8836},{},[8837],{"type":49,"value":8838},"# Read\n",{"type":43,"tag":102,"props":8840,"children":8841},{"class":104,"line":132},[8842],{"type":43,"tag":102,"props":8843,"children":8844},{},[8845],{"type":49,"value":8846},"project_ctx = ws.get_business_context(level=\"project\")\n",{"type":43,"tag":102,"props":8848,"children":8849},{"class":104,"line":450},[8850],{"type":43,"tag":102,"props":8851,"children":8852},{},[8853],{"type":49,"value":8854},"org_ctx = ws.get_business_context(level=\"organization\")  # auto-resolves org_id\n",{"type":43,"tag":102,"props":8856,"children":8857},{"class":104,"line":459},[8858],{"type":43,"tag":102,"props":8859,"children":8860},{},[8861],{"type":49,"value":8862},"explicit = ws.get_business_context(level=\"organization\", organization_id=42)\n",{"type":43,"tag":102,"props":8864,"children":8865},{"class":104,"line":468},[8866],{"type":43,"tag":102,"props":8867,"children":8868},{"emptyLinePlaceholder":444},[8869],{"type":49,"value":447},{"type":43,"tag":102,"props":8871,"children":8872},{"class":104,"line":477},[8873],{"type":43,"tag":102,"props":8874,"children":8875},{},[8876],{"type":49,"value":8877},"# Read both at once (single round-trip via \u002Fbusiness-context\u002Fchain)\n",{"type":43,"tag":102,"props":8879,"children":8880},{"class":104,"line":486},[8881],{"type":43,"tag":102,"props":8882,"children":8883},{},[8884],{"type":49,"value":8885},"chain = ws.get_business_context_chain()\n",{"type":43,"tag":102,"props":8887,"children":8888},{"class":104,"line":495},[8889],{"type":43,"tag":102,"props":8890,"children":8891},{},[8892],{"type":49,"value":8893},"print(chain.organization.content)\n",{"type":43,"tag":102,"props":8895,"children":8896},{"class":104,"line":503},[8897],{"type":43,"tag":102,"props":8898,"children":8899},{},[8900],{"type":49,"value":8901},"print(chain.project.content)\n",{"type":43,"tag":102,"props":8903,"children":8904},{"class":104,"line":512},[8905],{"type":43,"tag":102,"props":8906,"children":8907},{"emptyLinePlaceholder":444},[8908],{"type":49,"value":447},{"type":43,"tag":102,"props":8910,"children":8911},{"class":104,"line":521},[8912],{"type":43,"tag":102,"props":8913,"children":8914},{},[8915],{"type":49,"value":8916},"# Write (full-replace; pass \"\" to clear, or use clear_business_context())\n",{"type":43,"tag":102,"props":8918,"children":8919},{"class":104,"line":530},[8920],{"type":43,"tag":102,"props":8921,"children":8922},{},[8923],{"type":49,"value":8924},"ws.set_business_context(\"# About Acme\\n…\", level=\"project\")\n",{"type":43,"tag":102,"props":8926,"children":8927},{"class":104,"line":538},[8928],{"type":43,"tag":102,"props":8929,"children":8930},{},[8931],{"type":49,"value":8932},"ws.set_business_context(\"# Org-wide standards\", level=\"organization\")\n",{"type":43,"tag":102,"props":8934,"children":8935},{"class":104,"line":547},[8936],{"type":43,"tag":102,"props":8937,"children":8938},{},[8939],{"type":49,"value":8940},"ws.clear_business_context(level=\"project\")\n",{"type":43,"tag":102,"props":8942,"children":8943},{"class":104,"line":556},[8944],{"type":43,"tag":102,"props":8945,"children":8946},{"emptyLinePlaceholder":444},[8947],{"type":49,"value":447},{"type":43,"tag":102,"props":8949,"children":8950},{"class":104,"line":948},[8951],{"type":43,"tag":102,"props":8952,"children":8953},{},[8954],{"type":49,"value":8955},"# All return BusinessContext with: level, content, organization_id, project_id\n",{"type":43,"tag":102,"props":8957,"children":8958},{"class":104,"line":956},[8959],{"type":43,"tag":102,"props":8960,"children":8961},{},[8962],{"type":49,"value":8963},"# Plus convenience .is_empty and .character_count properties (Python only)\n",{"type":43,"tag":102,"props":8965,"children":8966},{"class":104,"line":965},[8967],{"type":43,"tag":102,"props":8968,"children":8969},{},[8970],{"type":49,"value":8971},"print(f\"{project_ctx.character_count}\u002F{BUSINESS_CONTEXT_MAX_CHARS} chars; \"\n",{"type":43,"tag":102,"props":8973,"children":8974},{"class":104,"line":991},[8975],{"type":43,"tag":102,"props":8976,"children":8977},{},[8978],{"type":49,"value":8979},"      f\"empty={project_ctx.is_empty}\")\n",{"type":43,"tag":52,"props":8981,"children":8982},{},[8983],{"type":43,"tag":357,"props":8984,"children":8985},{},[8986],{"type":49,"value":8987},"When to reach for this:",{"type":43,"tag":1404,"props":8989,"children":8990},{},[8991,9002,9023,9055],{"type":43,"tag":1408,"props":8992,"children":8993},{},[8994,8996],{"type":49,"value":8995},"User asks \"what's the business context for this project\u002Forg?\" → ",{"type":43,"tag":58,"props":8997,"children":8999},{"className":8998},[],[9000],{"type":49,"value":9001},"get_business_context_chain()",{"type":43,"tag":1408,"props":9003,"children":9004},{},[9005,9007,9013,9015,9021],{"type":49,"value":9006},"User wants to version-control project context as a ",{"type":43,"tag":58,"props":9008,"children":9010},{"className":9009},[],[9011],{"type":49,"value":9012},".md",{"type":49,"value":9014}," file → ",{"type":43,"tag":58,"props":9016,"children":9018},{"className":9017},[],[9019],{"type":49,"value":9020},"ws.set_business_context(Path(\"ctx.md\").read_text(), level=\"project\")",{"type":49,"value":9022}," in CI",{"type":43,"tag":1408,"props":9024,"children":9025},{},[9026,9028,9033,9034,9040,9041,9047,9049],{"type":49,"value":9027},"User asks to \"audit which projects have AI context configured\" → iterate ",{"type":43,"tag":58,"props":9029,"children":9031},{"className":9030},[],[9032],{"type":49,"value":3371},{"type":49,"value":5654},{"type":43,"tag":58,"props":9035,"children":9037},{"className":9036},[],[9038],{"type":49,"value":9039},"ws.use(project=...)",{"type":49,"value":5654},{"type":43,"tag":58,"props":9042,"children":9044},{"className":9043},[],[9045],{"type":49,"value":9046},"ws.get_business_context(level=\"project\")",{"type":49,"value":9048}," and check ",{"type":43,"tag":58,"props":9050,"children":9052},{"className":9051},[],[9053],{"type":49,"value":9054},".is_empty",{"type":43,"tag":1408,"props":9056,"children":9057},{},[9058,9060],{"type":49,"value":9059},"User asks to seed a new project from the org default → ",{"type":43,"tag":58,"props":9061,"children":9063},{"className":9062},[],[9064],{"type":49,"value":9065},"chain = ws.get_business_context_chain(); ws.set_business_context(chain.organization.content, level=\"project\")",{"type":43,"tag":52,"props":9067,"children":9068},{},[9069,9074,9076,9082,9084,9089,9091,9097],{"type":43,"tag":357,"props":9070,"children":9071},{},[9072],{"type":49,"value":9073},"Permissions:",{"type":49,"value":9075}," project-scope reads need any project access; project-scope writes need ",{"type":43,"tag":58,"props":9077,"children":9079},{"className":9078},[],[9080],{"type":49,"value":9081},"edit_project_info",{"type":49,"value":9083}," on the project. Org-scope writes need ",{"type":43,"tag":58,"props":9085,"children":9087},{"className":9086},[],[9088],{"type":49,"value":9081},{"type":49,"value":9090}," at the org level (typically OAuth, not service account). The ",{"type":43,"tag":58,"props":9092,"children":9094},{"className":9093},[],[9095],{"type":49,"value":9096},"BusinessContextValidationError",{"type":49,"value":9098}," exception is raised client-side BEFORE any HTTP call when content exceeds 50,000 chars, so use it to detect oversize input without burning a round-trip.",{"type":43,"tag":52,"props":9100,"children":9101},{},[9102,9104],{"type":49,"value":9103},"User Guide: ",{"type":43,"tag":58,"props":9105,"children":9107},{"className":9106},[],[9108],{"type":49,"value":9109},"WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fguide\u002Fbusiness-context\u002Findex.md\")",{"type":43,"tag":140,"props":9111,"children":9113},{"id":9112},"key-types",[9114],{"type":49,"value":9115},"Key Types",{"type":43,"tag":52,"props":9117,"children":9118},{},[9119,9120,9126,9128,9134,9136],{"type":49,"value":3413},{"type":43,"tag":58,"props":9121,"children":9123},{"className":9122},[],[9124],{"type":49,"value":9125},"python3 $SKILL_DIR\u002Fscripts\u002Fhelp.py types",{"type":49,"value":9127}," for the full list of all types. Use ",{"type":43,"tag":58,"props":9129,"children":9131},{"className":9130},[],[9132],{"type":49,"value":9133},"help.py \u003CTypeName>",{"type":49,"value":9135}," for fields, constructors, and enum values.\nFull reference: ",{"type":43,"tag":58,"props":9137,"children":9139},{"className":9138},[],[9140],{"type":49,"value":9141},"WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fapi\u002Ftypes\u002Findex.md\")",{"type":43,"tag":147,"props":9143,"children":9144},{},[9145,9161],{"type":43,"tag":151,"props":9146,"children":9147},{},[9148],{"type":43,"tag":155,"props":9149,"children":9150},{},[9151,9156],{"type":43,"tag":159,"props":9152,"children":9153},{},[9154],{"type":49,"value":9155},"Type",{"type":43,"tag":159,"props":9157,"children":9158},{},[9159],{"type":49,"value":9160},"Purpose",{"type":43,"tag":175,"props":9162,"children":9163},{},[9164,9203,9220,9237,9254,9270,9287,9304,9321,9338,9355,9386,9402,9418,9434,9450,9467,9484],{"type":43,"tag":155,"props":9165,"children":9166},{},[9167,9176],{"type":43,"tag":182,"props":9168,"children":9169},{},[9170],{"type":43,"tag":58,"props":9171,"children":9173},{"className":9172},[],[9174],{"type":49,"value":9175},"Filter",{"type":43,"tag":182,"props":9177,"children":9178},{},[9179,9181,9187,9188,9194,9195,9201],{"type":49,"value":9180},"Property filter conditions (",{"type":43,"tag":58,"props":9182,"children":9184},{"className":9183},[],[9185],{"type":49,"value":9186},".equals()",{"type":49,"value":1451},{"type":43,"tag":58,"props":9189,"children":9191},{"className":9190},[],[9192],{"type":49,"value":9193},".contains()",{"type":49,"value":1451},{"type":43,"tag":58,"props":9196,"children":9198},{"className":9197},[],[9199],{"type":49,"value":9200},".in_cohort()",{"type":49,"value":9202},", etc.)",{"type":43,"tag":155,"props":9204,"children":9205},{},[9206,9215],{"type":43,"tag":182,"props":9207,"children":9208},{},[9209],{"type":43,"tag":58,"props":9210,"children":9212},{"className":9211},[],[9213],{"type":49,"value":9214},"GroupBy",{"type":43,"tag":182,"props":9216,"children":9217},{},[9218],{"type":49,"value":9219},"Property breakdown with optional bucketing",{"type":43,"tag":155,"props":9221,"children":9222},{},[9223,9232],{"type":43,"tag":182,"props":9224,"children":9225},{},[9226],{"type":43,"tag":58,"props":9227,"children":9229},{"className":9228},[],[9230],{"type":49,"value":9231},"Formula",{"type":43,"tag":182,"props":9233,"children":9234},{},[9235],{"type":49,"value":9236},"Calculated metric expression referencing events by position (A, B, C...)",{"type":43,"tag":155,"props":9238,"children":9239},{},[9240,9249],{"type":43,"tag":182,"props":9241,"children":9242},{},[9243],{"type":43,"tag":58,"props":9244,"children":9246},{"className":9245},[],[9247],{"type":49,"value":9248},"Metric",{"type":43,"tag":182,"props":9250,"children":9251},{},[9252],{"type":49,"value":9253},"Event with per-event math\u002Faggregation settings",{"type":43,"tag":155,"props":9255,"children":9256},{},[9257,9265],{"type":43,"tag":182,"props":9258,"children":9259},{},[9260],{"type":43,"tag":58,"props":9261,"children":9263},{"className":9262},[],[9264],{"type":49,"value":7319},{"type":43,"tag":182,"props":9266,"children":9267},{},[9268],{"type":49,"value":9269},"Track cohort size over time as an event metric",{"type":43,"tag":155,"props":9271,"children":9272},{},[9273,9282],{"type":43,"tag":182,"props":9274,"children":9275},{},[9276],{"type":43,"tag":58,"props":9277,"children":9279},{"className":9278},[],[9280],{"type":49,"value":9281},"FunnelStep",{"type":43,"tag":182,"props":9283,"children":9284},{},[9285],{"type":49,"value":9286},"Funnel step with per-step filters, labels, ordering",{"type":43,"tag":155,"props":9288,"children":9289},{},[9290,9299],{"type":43,"tag":182,"props":9291,"children":9292},{},[9293],{"type":43,"tag":58,"props":9294,"children":9296},{"className":9295},[],[9297],{"type":49,"value":9298},"Exclusion",{"type":43,"tag":182,"props":9300,"children":9301},{},[9302],{"type":49,"value":9303},"Event to exclude between funnel steps",{"type":43,"tag":155,"props":9305,"children":9306},{},[9307,9316],{"type":43,"tag":182,"props":9308,"children":9309},{},[9310],{"type":43,"tag":58,"props":9311,"children":9313},{"className":9312},[],[9314],{"type":49,"value":9315},"HoldingConstant",{"type":43,"tag":182,"props":9317,"children":9318},{},[9319],{"type":49,"value":9320},"Property to hold constant across funnel steps",{"type":43,"tag":155,"props":9322,"children":9323},{},[9324,9333],{"type":43,"tag":182,"props":9325,"children":9326},{},[9327],{"type":43,"tag":58,"props":9328,"children":9330},{"className":9329},[],[9331],{"type":49,"value":9332},"RetentionEvent",{"type":43,"tag":182,"props":9334,"children":9335},{},[9336],{"type":49,"value":9337},"Retention event with per-event filters",{"type":43,"tag":155,"props":9339,"children":9340},{},[9341,9350],{"type":43,"tag":182,"props":9342,"children":9343},{},[9344],{"type":43,"tag":58,"props":9345,"children":9347},{"className":9346},[],[9348],{"type":49,"value":9349},"FlowStep",{"type":43,"tag":182,"props":9351,"children":9352},{},[9353],{"type":49,"value":9354},"Flow anchor event with per-step forward\u002Freverse configuration",{"type":43,"tag":155,"props":9356,"children":9357},{},[9358,9367],{"type":43,"tag":182,"props":9359,"children":9360},{},[9361],{"type":43,"tag":58,"props":9362,"children":9364},{"className":9363},[],[9365],{"type":49,"value":9366},"TimeComparison",{"type":43,"tag":182,"props":9368,"children":9369},{},[9370,9372,9378,9379,9385],{"type":49,"value":9371},"Period-over-period comparison (",{"type":43,"tag":58,"props":9373,"children":9375},{"className":9374},[],[9376],{"type":49,"value":9377},".relative(\"month\")",{"type":49,"value":1451},{"type":43,"tag":58,"props":9380,"children":9382},{"className":9381},[],[9383],{"type":49,"value":9384},".absolute_start(...)",{"type":49,"value":2190},{"type":43,"tag":155,"props":9387,"children":9388},{},[9389,9397],{"type":43,"tag":182,"props":9390,"children":9391},{},[9392],{"type":43,"tag":58,"props":9393,"children":9395},{"className":9394},[],[9396],{"type":49,"value":7132},{"type":43,"tag":182,"props":9398,"children":9399},{},[9400],{"type":49,"value":9401},"Break down by how often users performed an event",{"type":43,"tag":155,"props":9403,"children":9404},{},[9405,9413],{"type":43,"tag":182,"props":9406,"children":9407},{},[9408],{"type":43,"tag":58,"props":9409,"children":9411},{"className":9410},[],[9412],{"type":49,"value":7140},{"type":43,"tag":182,"props":9414,"children":9415},{},[9416],{"type":49,"value":9417},"Filter by how often users performed an event",{"type":43,"tag":155,"props":9419,"children":9420},{},[9421,9429],{"type":43,"tag":182,"props":9422,"children":9423},{},[9424],{"type":43,"tag":58,"props":9425,"children":9427},{"className":9426},[],[9428],{"type":49,"value":7302},{"type":43,"tag":182,"props":9430,"children":9431},{},[9432],{"type":49,"value":9433},"Break down results by cohort membership",{"type":43,"tag":155,"props":9435,"children":9436},{},[9437,9445],{"type":43,"tag":182,"props":9438,"children":9439},{},[9440],{"type":43,"tag":58,"props":9441,"children":9443},{"className":9442},[],[9444],{"type":49,"value":6665},{"type":43,"tag":182,"props":9446,"children":9447},{},[9448],{"type":49,"value":9449},"Inline cohort definition for user queries",{"type":43,"tag":155,"props":9451,"children":9452},{},[9453,9462],{"type":43,"tag":182,"props":9454,"children":9455},{},[9456],{"type":43,"tag":58,"props":9457,"children":9459},{"className":9458},[],[9460],{"type":49,"value":9461},"CohortCriteria",{"type":43,"tag":182,"props":9463,"children":9464},{},[9465],{"type":49,"value":9466},"Atomic condition for cohort membership",{"type":43,"tag":155,"props":9468,"children":9469},{},[9470,9479],{"type":43,"tag":182,"props":9471,"children":9472},{},[9473],{"type":43,"tag":58,"props":9474,"children":9476},{"className":9475},[],[9477],{"type":49,"value":9478},"CustomPropertyRef",{"type":43,"tag":182,"props":9480,"children":9481},{},[9482],{"type":49,"value":9483},"Reference to a persisted custom property by ID",{"type":43,"tag":155,"props":9485,"children":9486},{},[9487,9495],{"type":43,"tag":182,"props":9488,"children":9489},{},[9490],{"type":43,"tag":58,"props":9491,"children":9493},{"className":9492},[],[9494],{"type":49,"value":6704},{"type":43,"tag":182,"props":9496,"children":9497},{},[9498],{"type":49,"value":9499},"Ephemeral computed property defined by formula",{"type":43,"tag":52,"props":9501,"children":9502},{},[9503,9508,9510,9516],{"type":43,"tag":357,"props":9504,"children":9505},{},[9506],{"type":49,"value":9507},"Aggregation enums",{"type":49,"value":9509}," (use ",{"type":43,"tag":58,"props":9511,"children":9513},{"className":9512},[],[9514],{"type":49,"value":9515},"help.py \u003CEnumName>",{"type":49,"value":9517}," to see all values):",{"type":43,"tag":147,"props":9519,"children":9520},{},[9521,9542],{"type":43,"tag":151,"props":9522,"children":9523},{},[9524],{"type":43,"tag":155,"props":9525,"children":9526},{},[9527,9532,9537],{"type":43,"tag":159,"props":9528,"children":9529},{},[9530],{"type":49,"value":9531},"Enum",{"type":43,"tag":159,"props":9533,"children":9534},{},[9535],{"type":49,"value":9536},"Used by",{"type":43,"tag":159,"props":9538,"children":9539},{},[9540],{"type":49,"value":9541},"Common values",{"type":43,"tag":175,"props":9543,"children":9544},{},[9545,9571,9597],{"type":43,"tag":155,"props":9546,"children":9547},{},[9548,9557,9566],{"type":43,"tag":182,"props":9549,"children":9550},{},[9551],{"type":43,"tag":58,"props":9552,"children":9554},{"className":9553},[],[9555],{"type":49,"value":9556},"MathType",{"type":43,"tag":182,"props":9558,"children":9559},{},[9560],{"type":43,"tag":58,"props":9561,"children":9563},{"className":9562},[],[9564],{"type":49,"value":9565},"query()",{"type":43,"tag":182,"props":9567,"children":9568},{},[9569],{"type":49,"value":9570},"total, unique, dau, average, sum, min, max, percentile, sessions",{"type":43,"tag":155,"props":9572,"children":9573},{},[9574,9583,9592],{"type":43,"tag":182,"props":9575,"children":9576},{},[9577],{"type":43,"tag":58,"props":9578,"children":9580},{"className":9579},[],[9581],{"type":49,"value":9582},"FunnelMathType",{"type":43,"tag":182,"props":9584,"children":9585},{},[9586],{"type":43,"tag":58,"props":9587,"children":9589},{"className":9588},[],[9590],{"type":49,"value":9591},"query_funnel()",{"type":43,"tag":182,"props":9593,"children":9594},{},[9595],{"type":49,"value":9596},"conversion_rate_unique, conversion_rate_total, average, median",{"type":43,"tag":155,"props":9598,"children":9599},{},[9600,9609,9618],{"type":43,"tag":182,"props":9601,"children":9602},{},[9603],{"type":43,"tag":58,"props":9604,"children":9606},{"className":9605},[],[9607],{"type":49,"value":9608},"RetentionMathType",{"type":43,"tag":182,"props":9610,"children":9611},{},[9612],{"type":43,"tag":58,"props":9613,"children":9615},{"className":9614},[],[9616],{"type":49,"value":9617},"query_retention()",{"type":43,"tag":182,"props":9619,"children":9620},{},[9621],{"type":49,"value":9622},"retention_rate, retention_count",{"type":43,"tag":140,"props":9624,"children":9626},{"id":9625},"statistical-analysis-numpy-scipy",[9627],{"type":49,"value":9628},"Statistical Analysis — numpy, scipy",{"type":43,"tag":52,"props":9630,"children":9631},{},[9632],{"type":49,"value":9633},"All query results produce pandas DataFrames, which integrate directly with numpy and scipy:",{"type":43,"tag":91,"props":9635,"children":9637},{"className":93,"code":9636,"language":95,"meta":96,"style":96},"import numpy as np\nfrom scipy import stats\n\n# Compare two segments\na = result.df[result.df[\"platform\"] == \"iOS\"][\"count\"]\nb = result.df[result.df[\"platform\"] == \"Android\"][\"count\"]\nt_stat, p_value = stats.ttest_ind(a, b)\ncohens_d = (a.mean() - b.mean()) \u002F np.sqrt((a.std()**2 + b.std()**2) \u002F 2)\n\n# Useful scipy.stats tests: ttest_ind, mannwhitneyu, chi2_contingency, pearsonr, spearmanr\n# Useful numpy: np.percentile, np.corrcoef, np.polyfit (trend lines)\n",[9638],{"type":43,"tag":58,"props":9639,"children":9640},{"__ignoreMap":96},[9641,9649,9657,9664,9672,9680,9688,9696,9704,9711,9719],{"type":43,"tag":102,"props":9642,"children":9643},{"class":104,"line":105},[9644],{"type":43,"tag":102,"props":9645,"children":9646},{},[9647],{"type":49,"value":9648},"import numpy as np\n",{"type":43,"tag":102,"props":9650,"children":9651},{"class":104,"line":114},[9652],{"type":43,"tag":102,"props":9653,"children":9654},{},[9655],{"type":49,"value":9656},"from scipy import stats\n",{"type":43,"tag":102,"props":9658,"children":9659},{"class":104,"line":123},[9660],{"type":43,"tag":102,"props":9661,"children":9662},{"emptyLinePlaceholder":444},[9663],{"type":49,"value":447},{"type":43,"tag":102,"props":9665,"children":9666},{"class":104,"line":132},[9667],{"type":43,"tag":102,"props":9668,"children":9669},{},[9670],{"type":49,"value":9671},"# Compare two segments\n",{"type":43,"tag":102,"props":9673,"children":9674},{"class":104,"line":450},[9675],{"type":43,"tag":102,"props":9676,"children":9677},{},[9678],{"type":49,"value":9679},"a = result.df[result.df[\"platform\"] == \"iOS\"][\"count\"]\n",{"type":43,"tag":102,"props":9681,"children":9682},{"class":104,"line":459},[9683],{"type":43,"tag":102,"props":9684,"children":9685},{},[9686],{"type":49,"value":9687},"b = result.df[result.df[\"platform\"] == \"Android\"][\"count\"]\n",{"type":43,"tag":102,"props":9689,"children":9690},{"class":104,"line":468},[9691],{"type":43,"tag":102,"props":9692,"children":9693},{},[9694],{"type":49,"value":9695},"t_stat, p_value = stats.ttest_ind(a, b)\n",{"type":43,"tag":102,"props":9697,"children":9698},{"class":104,"line":477},[9699],{"type":43,"tag":102,"props":9700,"children":9701},{},[9702],{"type":49,"value":9703},"cohens_d = (a.mean() - b.mean()) \u002F np.sqrt((a.std()**2 + b.std()**2) \u002F 2)\n",{"type":43,"tag":102,"props":9705,"children":9706},{"class":104,"line":486},[9707],{"type":43,"tag":102,"props":9708,"children":9709},{"emptyLinePlaceholder":444},[9710],{"type":49,"value":447},{"type":43,"tag":102,"props":9712,"children":9713},{"class":104,"line":495},[9714],{"type":43,"tag":102,"props":9715,"children":9716},{},[9717],{"type":49,"value":9718},"# Useful scipy.stats tests: ttest_ind, mannwhitneyu, chi2_contingency, pearsonr, spearmanr\n",{"type":43,"tag":102,"props":9720,"children":9721},{"class":104,"line":503},[9722],{"type":43,"tag":102,"props":9723,"children":9724},{},[9725],{"type":49,"value":9726},"# Useful numpy: np.percentile, np.corrcoef, np.polyfit (trend lines)\n",{"type":43,"tag":140,"props":9728,"children":9730},{"id":9729},"visualization-matplotlib-seaborn",[9731],{"type":49,"value":9732},"Visualization — matplotlib, seaborn",{"type":43,"tag":52,"props":9734,"children":9735},{},[9736],{"type":49,"value":9737},"Save charts to files for the user. Always use a non-interactive backend:",{"type":43,"tag":91,"props":9739,"children":9741},{"className":93,"code":9740,"language":95,"meta":96,"style":96},"import matplotlib\nmatplotlib.use(\"Agg\")\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nfig, ax = plt.subplots(figsize=(10, 5))\nresult.df.plot(x=\"date\", y=\"count\", ax=ax)\nax.set_title(\"Daily Logins\")\nfig.savefig(\"chart.png\", dpi=150, bbox_inches=\"tight\")\nplt.close(fig)\n\n# seaborn: sns.lineplot, sns.barplot, sns.heatmap (for retention matrices)\n# Multi-panel: fig, axes = plt.subplots(2, 2) for dashboard-style layouts\n",[9742],{"type":43,"tag":58,"props":9743,"children":9744},{"__ignoreMap":96},[9745,9753,9761,9769,9777,9784,9792,9800,9808,9816,9824,9831,9839],{"type":43,"tag":102,"props":9746,"children":9747},{"class":104,"line":105},[9748],{"type":43,"tag":102,"props":9749,"children":9750},{},[9751],{"type":49,"value":9752},"import matplotlib\n",{"type":43,"tag":102,"props":9754,"children":9755},{"class":104,"line":114},[9756],{"type":43,"tag":102,"props":9757,"children":9758},{},[9759],{"type":49,"value":9760},"matplotlib.use(\"Agg\")\n",{"type":43,"tag":102,"props":9762,"children":9763},{"class":104,"line":123},[9764],{"type":43,"tag":102,"props":9765,"children":9766},{},[9767],{"type":49,"value":9768},"import matplotlib.pyplot as plt\n",{"type":43,"tag":102,"props":9770,"children":9771},{"class":104,"line":132},[9772],{"type":43,"tag":102,"props":9773,"children":9774},{},[9775],{"type":49,"value":9776},"import seaborn as sns\n",{"type":43,"tag":102,"props":9778,"children":9779},{"class":104,"line":450},[9780],{"type":43,"tag":102,"props":9781,"children":9782},{"emptyLinePlaceholder":444},[9783],{"type":49,"value":447},{"type":43,"tag":102,"props":9785,"children":9786},{"class":104,"line":459},[9787],{"type":43,"tag":102,"props":9788,"children":9789},{},[9790],{"type":49,"value":9791},"fig, ax = plt.subplots(figsize=(10, 5))\n",{"type":43,"tag":102,"props":9793,"children":9794},{"class":104,"line":468},[9795],{"type":43,"tag":102,"props":9796,"children":9797},{},[9798],{"type":49,"value":9799},"result.df.plot(x=\"date\", y=\"count\", ax=ax)\n",{"type":43,"tag":102,"props":9801,"children":9802},{"class":104,"line":477},[9803],{"type":43,"tag":102,"props":9804,"children":9805},{},[9806],{"type":49,"value":9807},"ax.set_title(\"Daily Logins\")\n",{"type":43,"tag":102,"props":9809,"children":9810},{"class":104,"line":486},[9811],{"type":43,"tag":102,"props":9812,"children":9813},{},[9814],{"type":49,"value":9815},"fig.savefig(\"chart.png\", dpi=150, bbox_inches=\"tight\")\n",{"type":43,"tag":102,"props":9817,"children":9818},{"class":104,"line":495},[9819],{"type":43,"tag":102,"props":9820,"children":9821},{},[9822],{"type":49,"value":9823},"plt.close(fig)\n",{"type":43,"tag":102,"props":9825,"children":9826},{"class":104,"line":503},[9827],{"type":43,"tag":102,"props":9828,"children":9829},{"emptyLinePlaceholder":444},[9830],{"type":49,"value":447},{"type":43,"tag":102,"props":9832,"children":9833},{"class":104,"line":512},[9834],{"type":43,"tag":102,"props":9835,"children":9836},{},[9837],{"type":49,"value":9838},"# seaborn: sns.lineplot, sns.barplot, sns.heatmap (for retention matrices)\n",{"type":43,"tag":102,"props":9840,"children":9841},{"class":104,"line":521},[9842],{"type":43,"tag":102,"props":9843,"children":9844},{},[9845],{"type":49,"value":9846},"# Multi-panel: fig, axes = plt.subplots(2, 2) for dashboard-style layouts\n",{"type":43,"tag":140,"props":9848,"children":9850},{"id":9849},"exceptions",[9851],{"type":49,"value":9852},"Exceptions",{"type":43,"tag":52,"props":9854,"children":9855},{},[9856,9858],{"type":49,"value":9857},"Full reference: ",{"type":43,"tag":58,"props":9859,"children":9861},{"className":9860},[],[9862],{"type":49,"value":9863},"WebFetch(url=\"https:\u002F\u002Fmixpanel.github.io\u002Fmixpanel-headless\u002Fapi\u002Fexceptions\u002Findex.md\")",{"type":43,"tag":147,"props":9865,"children":9866},{},[9867,9883],{"type":43,"tag":151,"props":9868,"children":9869},{},[9870],{"type":43,"tag":155,"props":9871,"children":9872},{},[9873,9878],{"type":43,"tag":159,"props":9874,"children":9875},{},[9876],{"type":49,"value":9877},"Exception",{"type":43,"tag":159,"props":9879,"children":9880},{},[9881],{"type":49,"value":9882},"When",{"type":43,"tag":175,"props":9884,"children":9885},{},[9886,9903,9920,9937,9954,9971,9988,10005,10022,10046,10063,10080],{"type":43,"tag":155,"props":9887,"children":9888},{},[9889,9898],{"type":43,"tag":182,"props":9890,"children":9891},{},[9892],{"type":43,"tag":58,"props":9893,"children":9895},{"className":9894},[],[9896],{"type":49,"value":9897},"MixpanelHeadlessError",{"type":43,"tag":182,"props":9899,"children":9900},{},[9901],{"type":49,"value":9902},"Base for all errors",{"type":43,"tag":155,"props":9904,"children":9905},{},[9906,9915],{"type":43,"tag":182,"props":9907,"children":9908},{},[9909],{"type":43,"tag":58,"props":9910,"children":9912},{"className":9911},[],[9913],{"type":49,"value":9914},"ConfigError",{"type":43,"tag":182,"props":9916,"children":9917},{},[9918],{"type":49,"value":9919},"No credentials resolved",{"type":43,"tag":155,"props":9921,"children":9922},{},[9923,9932],{"type":43,"tag":182,"props":9924,"children":9925},{},[9926],{"type":43,"tag":58,"props":9927,"children":9929},{"className":9928},[],[9930],{"type":49,"value":9931},"AccountNotFoundError",{"type":43,"tag":182,"props":9933,"children":9934},{},[9935],{"type":49,"value":9936},"Named account doesn't exist",{"type":43,"tag":155,"props":9938,"children":9939},{},[9940,9949],{"type":43,"tag":182,"props":9941,"children":9942},{},[9943],{"type":43,"tag":58,"props":9944,"children":9946},{"className":9945},[],[9947],{"type":49,"value":9948},"AuthenticationError",{"type":43,"tag":182,"props":9950,"children":9951},{},[9952],{"type":49,"value":9953},"Invalid credentials (401)",{"type":43,"tag":155,"props":9955,"children":9956},{},[9957,9966],{"type":43,"tag":182,"props":9958,"children":9959},{},[9960],{"type":43,"tag":58,"props":9961,"children":9963},{"className":9962},[],[9964],{"type":49,"value":9965},"QueryError",{"type":43,"tag":182,"props":9967,"children":9968},{},[9969],{"type":49,"value":9970},"Invalid query parameters (400)",{"type":43,"tag":155,"props":9972,"children":9973},{},[9974,9983],{"type":43,"tag":182,"props":9975,"children":9976},{},[9977],{"type":43,"tag":58,"props":9978,"children":9980},{"className":9979},[],[9981],{"type":49,"value":9982},"BookmarkValidationError",{"type":43,"tag":182,"props":9984,"children":9985},{},[9986],{"type":49,"value":9987},"Params failed validation",{"type":43,"tag":155,"props":9989,"children":9990},{},[9991,10000],{"type":43,"tag":182,"props":9992,"children":9993},{},[9994],{"type":43,"tag":58,"props":9995,"children":9997},{"className":9996},[],[9998],{"type":49,"value":9999},"RateLimitError",{"type":43,"tag":182,"props":10001,"children":10002},{},[10003],{"type":49,"value":10004},"Rate limit exceeded (429)",{"type":43,"tag":155,"props":10006,"children":10007},{},[10008,10017],{"type":43,"tag":182,"props":10009,"children":10010},{},[10011],{"type":43,"tag":58,"props":10012,"children":10014},{"className":10013},[],[10015],{"type":49,"value":10016},"ServerError",{"type":43,"tag":182,"props":10018,"children":10019},{},[10020],{"type":49,"value":10021},"Mixpanel server error (5xx)",{"type":43,"tag":155,"props":10023,"children":10024},{},[10025,10034],{"type":43,"tag":182,"props":10026,"children":10027},{},[10028],{"type":43,"tag":58,"props":10029,"children":10031},{"className":10030},[],[10032],{"type":49,"value":10033},"WorkspaceScopeError",{"type":43,"tag":182,"props":10035,"children":10036},{},[10037,10039,10044],{"type":49,"value":10038},"Workspace resolution error (also raised when org_id can't be auto-resolved for ",{"type":43,"tag":58,"props":10040,"children":10042},{"className":10041},[],[10043],{"type":49,"value":8755},{"type":49,"value":10045}," business-context calls)",{"type":43,"tag":155,"props":10047,"children":10048},{},[10049,10058],{"type":43,"tag":182,"props":10050,"children":10051},{},[10052],{"type":43,"tag":58,"props":10053,"children":10055},{"className":10054},[],[10056],{"type":49,"value":10057},"DateRangeTooLargeError",{"type":43,"tag":182,"props":10059,"children":10060},{},[10061],{"type":49,"value":10062},"Date range exceeds API maximum",{"type":43,"tag":155,"props":10064,"children":10065},{},[10066,10075],{"type":43,"tag":182,"props":10067,"children":10068},{},[10069],{"type":43,"tag":58,"props":10070,"children":10072},{"className":10071},[],[10073],{"type":49,"value":10074},"OAuthError",{"type":43,"tag":182,"props":10076,"children":10077},{},[10078],{"type":49,"value":10079},"OAuth flow error",{"type":43,"tag":155,"props":10081,"children":10082},{},[10083,10091],{"type":43,"tag":182,"props":10084,"children":10085},{},[10086],{"type":43,"tag":58,"props":10087,"children":10089},{"className":10088},[],[10090],{"type":49,"value":9096},{"type":43,"tag":182,"props":10092,"children":10093},{},[10094],{"type":49,"value":10095},"Business context content exceeds 50,000 chars (client-side, before HTTP)",{"type":43,"tag":10097,"props":10098,"children":10099},"style",{},[10100],{"type":49,"value":10101},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":10103,"total":10308},[10104,10125,10148,10165,10181,10200,10219,10235,10251,10265,10277,10292],{"slug":10105,"name":10105,"fn":10106,"description":10107,"org":10108,"tags":10109,"stars":10122,"repoUrl":10123,"updatedAt":10124},"prior-auth-packet-builder","build healthcare prior authorization packets","Build a concise prior authorization packet from local case files and payer policy docs.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10110,10113,10116,10119],{"name":10111,"slug":10112,"type":15},"Documents","documents",{"name":10114,"slug":10115,"type":15},"Healthcare","healthcare",{"name":10117,"slug":10118,"type":15},"Insurance","insurance",{"name":10120,"slug":10121,"type":15},"Regulatory Compliance","regulatory-compliance",28169,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fopenai-agents-python","2026-04-16T05:11:39.180399",{"slug":10126,"name":10126,"fn":10127,"description":10128,"org":10129,"tags":10130,"stars":10145,"repoUrl":10146,"updatedAt":10147},"aspnet-core","build ASP.NET Core web applications","Build, review, refactor, or architect ASP.NET Core web applications using current official guidance for .NET web development. Use when working on Blazor Web Apps, Razor Pages, MVC, Minimal APIs, controller-based Web APIs, SignalR, gRPC, middleware, dependency injection, configuration, authentication, authorization, testing, performance, deployment, or ASP.NET Core upgrades.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10131,10134,10136,10139,10142],{"name":10132,"slug":10133,"type":15},".NET","dotnet",{"name":10135,"slug":10126,"type":15},"ASP.NET Core",{"name":10137,"slug":10138,"type":15},"Blazor","blazor",{"name":10140,"slug":10141,"type":15},"C#","csharp",{"name":10143,"slug":10144,"type":15},"Web Development","web-development",23787,"https:\u002F\u002Fgithub.com\u002Fopenai\u002Fskills","2026-04-12T05:07:02.819491",{"slug":10149,"name":10149,"fn":10150,"description":10151,"org":10152,"tags":10153,"stars":10145,"repoUrl":10146,"updatedAt":10164},"chatgpt-apps","build ChatGPT Apps SDK applications","Build, scaffold, refactor, and troubleshoot ChatGPT Apps SDK applications that combine an MCP server and widget UI. Use when Codex needs to design tools, register UI resources, wire the MCP Apps bridge or ChatGPT compatibility APIs, apply Apps SDK metadata or CSP or domain settings, or produce a docs-aligned project scaffold. Prefer a docs-first workflow by invoking the openai-docs skill or OpenAI developer docs MCP tools before generating code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10154,10157,10160,10163],{"name":10155,"slug":10156,"type":15},"Apps SDK","apps-sdk",{"name":10158,"slug":10159,"type":15},"ChatGPT","chatgpt",{"name":10161,"slug":10162,"type":15},"MCP","mcp",{"name":9,"slug":8,"type":15},"2026-04-12T05:07:05.468097",{"slug":10166,"name":10166,"fn":10167,"description":10168,"org":10169,"tags":10170,"stars":10145,"repoUrl":10146,"updatedAt":10180},"cli-creator","build CLIs from API docs","Build a composable CLI for Codex from API docs, an OpenAPI spec, existing curl examples, an SDK, a web app, an admin tool, or a local script. Use when the user wants Codex to create a command-line tool that can run from any repo, expose composable read\u002Fwrite commands, return stable JSON, manage auth, and pair with a companion skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10171,10174,10177],{"name":10172,"slug":10173,"type":15},"API Development","api-development",{"name":10175,"slug":10176,"type":15},"CLI","cli",{"name":10178,"slug":10179,"type":15},"Codex","codex","2026-04-12T05:07:04.132762",{"slug":10182,"name":10182,"fn":10183,"description":10184,"org":10185,"tags":10186,"stars":10145,"repoUrl":10146,"updatedAt":10199},"cloudflare-deploy","deploy projects to Cloudflare","Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10187,10190,10193,10196],{"name":10188,"slug":10189,"type":15},"Cloudflare","cloudflare",{"name":10191,"slug":10192,"type":15},"Cloudflare Pages","cloudflare-pages",{"name":10194,"slug":10195,"type":15},"Cloudflare Workers","cloudflare-workers",{"name":10197,"slug":10198,"type":15},"Deployment","deployment","2026-04-12T05:07:14.275118",{"slug":10201,"name":10201,"fn":10202,"description":10203,"org":10204,"tags":10205,"stars":10145,"repoUrl":10146,"updatedAt":10218},"define-goal","define and set measurable project goals","Help the user define a concrete, measurable goal before starting work, especially when they ask to use the goal tool, create a goal, set an objective, clarify success criteria, or turn a fuzzy intention into a quantitative outcome. Use this skill for goal creation and goal refinement only; it does not manage durable snapshots, decision logs, or long-running execution artifacts.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10206,10209,10212,10215],{"name":10207,"slug":10208,"type":15},"Productivity","productivity",{"name":10210,"slug":10211,"type":15},"Project Management","project-management",{"name":10213,"slug":10214,"type":15},"Strategy","strategy",{"name":10216,"slug":10217,"type":15},"Task Management","task-management","2026-05-23T06:17:16.870838",{"slug":10220,"name":10220,"fn":10221,"description":10222,"org":10223,"tags":10224,"stars":10145,"repoUrl":10146,"updatedAt":10234},"figma","translate Figma designs into code","Use the Figma MCP server to fetch design context, screenshots, variables, and assets from Figma, and to translate Figma nodes into production code. Trigger when a task involves Figma URLs, node IDs, design-to-code implementation, or Figma MCP setup and troubleshooting.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10225,10228,10230,10233],{"name":10226,"slug":10227,"type":15},"Design","design",{"name":10229,"slug":10220,"type":15},"Figma",{"name":10231,"slug":10232,"type":15},"Frontend","frontend",{"name":10161,"slug":10162,"type":15},"2026-04-12T05:06:47.939943",{"slug":10236,"name":10236,"fn":10237,"description":10238,"org":10239,"tags":10240,"stars":10145,"repoUrl":10146,"updatedAt":10250},"figma-code-connect-components","connect Figma designs to code components","Connects Figma design components to code components using Code Connect mapping tools. Use when user says \"code connect\", \"connect this component to code\", \"map this component\", \"link component to code\", \"create code connect mapping\", or wants to establish mappings between Figma designs and code implementations. For canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10241,10242,10245,10246,10247],{"name":10226,"slug":10227,"type":15},{"name":10243,"slug":10244,"type":15},"Design System","design-system",{"name":10229,"slug":10220,"type":15},{"name":10231,"slug":10232,"type":15},{"name":10248,"slug":10249,"type":15},"UI Components","ui-components","2026-05-10T05:59:52.971881",{"slug":10252,"name":10252,"fn":10253,"description":10254,"org":10255,"tags":10256,"stars":10145,"repoUrl":10146,"updatedAt":10264},"figma-create-design-system-rules","generate design system rules from Figma","Generates custom design system rules for the user's codebase. Use when user says \"create design system rules\", \"generate rules for my project\", \"set up design rules\", \"customize design system guidelines\", or wants to establish project-specific conventions for Figma-to-code workflows. Requires Figma MCP server connection.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10257,10258,10259,10262,10263],{"name":10226,"slug":10227,"type":15},{"name":10243,"slug":10244,"type":15},{"name":10260,"slug":10261,"type":15},"Documentation","documentation",{"name":10229,"slug":10220,"type":15},{"name":10231,"slug":10232,"type":15},"2026-05-16T06:07:47.821474",{"slug":10266,"name":10266,"fn":10267,"description":10268,"org":10269,"tags":10270,"stars":10145,"repoUrl":10146,"updatedAt":10276},"figma-implement-design","translate Figma designs into application code","Translates Figma designs into production-ready application code with 1:1 visual fidelity. Use when implementing UI code from Figma files, when user mentions \"implement design\", \"generate code\", \"implement component\", provides Figma URLs, or asks to build components matching Figma specs. For Figma canvas writes via `use_figma`, use `figma-use`.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10271,10272,10273,10274,10275],{"name":10226,"slug":10227,"type":15},{"name":10229,"slug":10220,"type":15},{"name":10231,"slug":10232,"type":15},{"name":10248,"slug":10249,"type":15},{"name":10143,"slug":10144,"type":15},"2026-05-16T06:07:40.583615",{"slug":10278,"name":10278,"fn":10279,"description":10280,"org":10281,"tags":10282,"stars":10145,"repoUrl":10146,"updatedAt":10291},"hatch-pet","create animated pets for Codex","Create, repair, validate, visually QA, and package Codex-compatible animated pets and pet spritesheets from character art, generated images, company or prospect brand cues, or visual references. Use when a user wants a lightweight-worker Codex pet workflow, a non-pixel custom pet style, a prospect or company mascot pet, or a full 8x9 animated pet atlas with transparent unused cells, QA contact sheets, and pet.json packaging. This skill composes the installed $imagegen system skill for visual generation and uses bundled scripts for deterministic spritesheet assembly.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10283,10286,10287,10290],{"name":10284,"slug":10285,"type":15},"Animation","animation",{"name":10178,"slug":10179,"type":15},{"name":10288,"slug":10289,"type":15},"Creative","creative",{"name":10226,"slug":10227,"type":15},"2026-05-02T05:31:48.48485",{"slug":10293,"name":10293,"fn":10294,"description":10295,"org":10296,"tags":10297,"stars":10145,"repoUrl":10146,"updatedAt":10307},"imagegen","generate and edit raster images","Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output should be a bitmap asset rather than repo-native code or vector. Do not use when the task is better handled by editing existing SVG\u002Fvector\u002Fcode-native assets, extending an established icon or logo system, or building the visual directly in HTML\u002FCSS\u002Fcanvas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10298,10299,10300,10303,10306],{"name":10288,"slug":10289,"type":15},{"name":10226,"slug":10227,"type":15},{"name":10301,"slug":10302,"type":15},"Image Generation","image-generation",{"name":10304,"slug":10305,"type":15},"Images","images",{"name":9,"slug":8,"type":15},"2026-05-15T06:23:24.312127",675,{"items":10310,"total":10423},[10311,10327,10343,10355,10373,10391,10411],{"slug":10312,"name":10312,"fn":10313,"description":10314,"org":10315,"tags":10316,"stars":25,"repoUrl":26,"updatedAt":27},"accessibility-and-inclusive-visualization","make data visualizations accessible","Make data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10317,10320,10323,10326],{"name":10318,"slug":10319,"type":15},"Accessibility","accessibility",{"name":10321,"slug":10322,"type":15},"Charts","charts",{"name":10324,"slug":10325,"type":15},"Data Visualization","data-visualization",{"name":10226,"slug":10227,"type":15},{"slug":10328,"name":10328,"fn":10329,"description":10330,"org":10331,"tags":10332,"stars":25,"repoUrl":26,"updatedAt":10342},"agent-browser","automate browser interactions for agents","Browser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10333,10336,10339],{"name":10334,"slug":10335,"type":15},"Agents","agents",{"name":10337,"slug":10338,"type":15},"Browser Automation","browser-automation",{"name":10340,"slug":10341,"type":15},"Testing","testing","2026-04-06T18:41:03.44016",{"slug":10344,"name":10344,"fn":10345,"description":10346,"org":10347,"tags":10348,"stars":25,"repoUrl":26,"updatedAt":10354},"agent-browser-verify","verify dev server output with automated browser","Automated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass\u002Ffail before continuing.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10349,10350,10353],{"name":10337,"slug":10338,"type":15},{"name":10351,"slug":10352,"type":15},"Local Development","local-development",{"name":10340,"slug":10341,"type":15},"2026-04-06T18:41:17.526867",{"slug":10356,"name":10356,"fn":10357,"description":10358,"org":10359,"tags":10360,"stars":25,"repoUrl":26,"updatedAt":10372},"agents-sdk","build AI agents on Cloudflare Workers","Build AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10361,10362,10363,10366,10369],{"name":10334,"slug":10335,"type":15},{"name":10194,"slug":10195,"type":15},{"name":10364,"slug":10365,"type":15},"SDK","sdk",{"name":10367,"slug":10368,"type":15},"Serverless","serverless",{"name":10370,"slug":10371,"type":15},"WebSockets","websockets","2026-04-06T18:39:51.717063",{"slug":10374,"name":10374,"fn":10375,"description":10376,"org":10377,"tags":10378,"stars":25,"repoUrl":26,"updatedAt":10390},"ai-elements","build chat UIs with AI Elements","AI Elements component library guidance — pre-built React components for AI interfaces built on shadcn\u002Fui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10379,10380,10383,10386,10387],{"name":10231,"slug":10232,"type":15},{"name":10381,"slug":10382,"type":15},"React","react",{"name":10384,"slug":10385,"type":15},"shadcn\u002Fui","shadcn-ui",{"name":10248,"slug":10249,"type":15},{"name":10388,"slug":10389,"type":15},"Vercel","vercel","2026-04-06T18:40:59.619419",{"slug":10392,"name":10392,"fn":10393,"description":10394,"org":10395,"tags":10396,"stars":25,"repoUrl":26,"updatedAt":10410},"ai-gateway","configure Vercel AI Gateway","Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10397,10400,10403,10406,10409],{"name":10398,"slug":10399,"type":15},"AI Infrastructure","ai-infrastructure",{"name":10401,"slug":10402,"type":15},"Cost Optimization","cost-optimization",{"name":10404,"slug":10405,"type":15},"LLM","llm",{"name":10407,"slug":10408,"type":15},"Performance","performance",{"name":10388,"slug":10389,"type":15},"2026-04-06T18:40:44.377464",{"slug":10412,"name":10412,"fn":10413,"description":10414,"org":10415,"tags":10416,"stars":25,"repoUrl":26,"updatedAt":10422},"ai-generation-persistence","implement persistence patterns for AI generations","AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[10417,10418,10421],{"name":10401,"slug":10402,"type":15},{"name":10419,"slug":10420,"type":15},"Database","database",{"name":10404,"slug":10405,"type":15},"2026-04-06T18:41:08.513425",600]