Configuring Experiment Analytics
PostHogOfficialPublished by PostHog
- Skill
- Tool integration
- Data and AI
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured workflow for configuring the analytics layer of PostHog experiments. It guides users through defining exposure criteria, selecting and configuring primary and secondary metrics (mean, funnel, ratio, or retention), and managing multivariate user handling. It emphasizes the importance of reusing shared metrics to maintain data consistency and requires verifying event availability via the project schema before creating new inline metrics.
What it does
- Configures exposure criteria using default or custom events.
- Manages multivariate user handling strategies like exclusion or first-seen assignment.
- Facilitates the discovery and reuse of existing shared metrics to prevent data fragmentation.
- Guides the creation of inline metrics including mean, funnel, ratio, and retention types.
- Ensures metric definitions are validated against the project's actual event schema.
- Provides a framework for interpreting experiment results and making data-driven decisions.
When to use it
- When adding or editing primary or secondary metrics for an experiment.
- When setting up complex metric types like ratios or retention windows.
- When configuring custom exposure events to control who enters the analysis.
- When deciding how to handle users exposed to multiple experiment variants.
- When you need to determine if an experiment is winning or ready to ship.
Advantages
- Prevents metric duplication by prioritizing shared, reusable definitions.
- Ensures data integrity by validating event names against the project schema.
- Provides clear guidance on handling bias in multivariate experiments.
- Standardizes the process for setting up different metric types like funnels and retention.
- Promotes statistically sound decision-making by linking to interpretation best practices.
Usage examples
- “Add a secondary metric tracking 'downloaded_file' per user for the checkout experiment.”
- The agent will first resolve the experiment ID, check the schema for the 'downloaded_file' event, search for existing shared metrics, and then update the experiment with the new metric.
- “How do I measure the revenue ratio for my experiment?”
- The agent will guide you through setting up a ratio metric using 'sum' math on the revenue property, ensuring the correct numerator and denominator are configured.
- “Should I ship the checkout experiment?”
- The agent will analyze the current experiment results, check for statistical significance, review secondary guardrail metrics, and provide a recommendation based on the decision framework.
- “Who is included in my experiment analysis?”
- The agent will explain your current exposure criteria settings, whether you are using the default or a custom event, and how your multivariate handling affects the included user set.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/posthog/configuring-experiment-analytics/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip configuring-experiment-analytics.zip -d .agents/skills
Documentation by PostHog
Configuring experiment analytics
This skill answers: Who is included in the analysis? and How to measure impact?
Exposure criteria
Exposure criteria determine which users are counted in the experiment analysis.
Exposure event
Two options:
Default exposure event — users are included when the experiment's default exposure event fires for the experiment's flag:
$feature_flag_called, or$experiment_exposurefor newer experiments. Which one applies is resolved server-side — readresolved_exposure_eventfromexperiment-getrather than assuming either name (both events carry the same properties). When it is$feature_flag_called, also read$experiment_exposure(event IN ('$feature_flag_called', '$experiment_exposure')), and count persons, not rows. This is the standard approach — it means a user is included only when they actually encounter the feature flag in your code.Custom exposure event — users are included when a specific custom event fires. Use this when you want tighter control over who enters the analysis (e.g., only users who actually visit the page where the experiment runs).
Filters on the exposure event remove individual events, not users.
A user still counts as long as one of their exposure events passes the filters.
To keep users out of the experiment, exclude them in the flag's release conditions before launch (see configuring-experiment-rollout).
Multiple variant handling
When a user is exposed to multiple variants (e.g., due to flag changes or race conditions):
Exclude from analysis — removes these users from the analysis entirely. Cleaner data, smaller sample.
Use first seen variant — assigns users to the first variant they were exposed to. Keeps all users in the analysis. Note that "first seen" can introduce other biases as behavior cannot be clearly attributed to a single variant and is not recommended unless necessary.
Bias risk on uneven splits. "Exclude from analysis" combined with an uneven variant split can introduce bias — multi-variant users are dropped asymmetrically and the smaller variant loses a larger fraction of its assignments. If those users behave differently from the rest, the smaller variant's metrics will be skewed.
The right mitigation depends on experiment state:
Not yet launched, or only exposed to a few users so far — switch to an even variant split and use the overall rollout percentage to limit test-variant exposure. This removes the bias and preserves statistical power. See
configuring-experiment-rollout.Live experiment with significant exposures — changing the split mid-run reassigns users across variants, which is bad for user experience and data quality. Switch this setting to "Use first seen variant" instead — it keeps already-assigned users in their original variant (no reassignment) and removes the asymmetric exclusion.
Filter test accounts
exposure_criteria.filterTestAccounts (default: true) — excludes internal/test users from the analysis.
Resolving experiments
Metric changes require an experiment ID. If the user refers to an experiment by name
or description (e.g. "add metrics to the checkout test"), load the finding-experiments
skill to resolve it to a concrete ID before proceeding.
Metrics
A metric reaches an experiment one of two ways, both via experiment-update:
Inline metric — defined directly on the experiment. Sent in the
metricsarray, which replaces the entire inline list, so always get the current experiment first viaexperiment-getto preserve existing metrics.Shared (saved) metric — a reusable metric object that can be attached to many experiments. Attached by ID via
saved_metrics_ids(this list also replaces the experiment's existing saved-metric links, so resend the full set — see Step 1).
Prefer reusing a shared metric over duplicating it inline. Build a new inline metric only when no suitable shared metric already exists.
Step 1: Check for an existing shared metric (REQUIRED — match by definition, not name)
Before building any new inline metric, you MUST check whether the project already has a shared (saved) metric that measures the same thing, and reuse it. Duplicating a metric that already exists as a shared metric fragments measurement and is exactly what we want to avoid.
Reuse is decided by the metric definition — the event or action plus the metric type — not the
name. Saved metrics are named by each team's own conventions, which you cannot guess, so you must
compare on what each metric measures (its query), never on its title.
Workflow:
Know what you're about to build first. Settle the target event(s)/action(s) and metric type (mean / funnel / ratio / retention) before searching — see Step 2 to confirm the event exists via
read-data-schema. You can only recognize a duplicate once you know the concrete event/action, so this check runs after you've pinned down the event, not before.Search by the event, then compare each candidate's
query. Callexperiment-saved-metrics-listwith?event=<the event you're measuring>to find metrics that reference it — matched directly (anEventsNode) or via the step events of any action a metric references, so action-based metrics are found by the event their action fires on. Then for each returned row, inspect itsquery(not thename/description): a saved metric is a reuse match when itsquerymeasures the same event or action with the samemetric_type(and compatiblemath) as the metric you'd otherwise build, even if its name is different.Match on the event, not the action's name. An action-based metric is discoverable by the event the action fires on — pass that event, not the action's label.
Do not use
searchfor this.searchmatches only the metric's ownname/description/ tags — never the underlying event or action — so it cannot find a definition match. Usesearchonly when the user names a specific saved metric to attach (name resolution, not a definition match).
If a saved metric matches the definition — confirm the match with the user by name/description, then attach it instead of building a new one:
Call
experiment-getto read the experiment's currentsaved_metrics.Call
experiment-updatewithsaved_metrics_idsset to the full desired set — it replaces existing links, so include the already-attached ones plus the new entry. Each entry has shape{ "id": <saved-metric id>, "metadata": { "type": "primary" } }— settypeto"primary"or"secondary".metadatais optional and defaults to primary.Watch the id when rebuilding the set: each item in the
saved_metricsyou just read has a top-levelid(the link id) AND asaved_metricfield (the metric id).saved_metrics_idswants thesaved_metricvalue, not the linkid— sending the linkidattaches the wrong metric or fails validation.You do not need to build the inline metric — the shared metric already encodes its events.
If nothing in the library measures the same event/action + type — build an inline metric (Step 2+). When that inline metric is likely to be reused across experiments, offer to create it as a shared metric instead, via
experiment-saved-metrics-create, then attach it as above, so the next experiment can reuse it.
Step 2: Discover available events (REQUIRED before building an inline metric)
Before suggesting or building any new inline metric, you MUST call read-data-schema to discover
what events actually exist in the project. Do NOT skip this step. Do NOT suggest event names
based on what you think the project might track — only use events you have confirmed exist.
(Attaching an existing shared metric from Step 1 does not need this — it already encodes its events.)
This applies even when:
The user provides event names — look them up to confirm they exist and are spelled correctly
The user asks "what metrics do you suggest?" — look up events first, then suggest from real data
The context makes certain events seem obvious — they may not exist or may be named differently
Workflow:
Call
read-data-schemato get the project's eventsPresent relevant events to the user based on the experiment's hypothesis
User picks which events to use for metrics
Configure metrics with those confirmed event names
Legitimate exception — allow_unknown_events: true:
Pass this on experiment-create / experiment-update only when the user is intentionally instrumenting an event that hasn't been ingested yet (e.g. setting up the experiment before the code change ships). Confirm this with the user — never use it as a workaround for "the event lookup didn't return what I expected".
Example:
User: "Let's add some metrics for the checkout experiment"
WRONG: "I'd suggest using purchase_completed as the primary metric..."
(hallucinated event name — never seen the project's actual events)
RIGHT: *calls read-data-schema* → "Here are the events in your project
related to checkout: `checkout_step_completed`, `payment_processed`,
`order_confirmed`. Which of these represents a successful checkout?"Step 3: Choose metric type
Start from a template in references/metric-templates.md: it maps common requests ("more revenue", "people come back") to a metric type and the defaults to set with it (window units, winsorization, goal).
There are four metric types. Each has kind: "ExperimentMetric":
| metric_type | When to use | Required fields |
|---|---|---|
"mean" | Average of a numeric property per user (revenue, session duration, pageviews per user) | source |
"funnel" | Conversion rate from exposure through one or more ordered actions | series (1 or more steps) |
"ratio" | Rate of one event relative to another | numerator, denominator — set math: "sum" + math_property on a side to aggregate a property; filters never aggregate |
"retention" | Do users come back after exposure? | start_event, completion_event, retention_window_start, retention_window_end, retention_window_unit, start_handling |
Funnel metrics and the implicit exposure step
Funnel metrics automatically prepend the experiment's exposure event as step_0.
So a funnel with 1 step in series is a valid 2-step funnel: exposure → action.
This is the correct choice for measuring "what percentage of exposed users did X?"
Examples:
"What % of exposed users reached /login?" → funnel with 1 step (
$pageviewfiltered to /login)"What % of exposed users completed checkout?" → funnel with 1 step (
checkout_completed)"What % of exposed users went cart → checkout → purchase?" → funnel with 3 steps
Mean vs funnel for the same event
Mean measures average count/value per user (e.g. "pageviews per user", "revenue per user").
Funnel measures conversion rate (e.g. "% of exposed users who purchased").
Both can reference the same event — the difference is whether you care about count/magnitude (mean) or yes/no conversion (funnel).
Retention: same vs different start/completion event
The retention window is measured from the start event, so the events you pick decide what's measured: The start occurrence never counts as its own completion (only a distinct later event does), so both shapes are valid:
Different start and completion events → conversion-style retention ("did they reach the target action within the window?").
Same event → repeat retention ("did they fire it again?").
From 0counts a repeat from the same period onward (same-day repeats included);From ≥ 1requires an occurrence later. Usestart_handling: "first_seen". When a user says "retention of<event>" they usually mean repeat retention.
See references/metric-configuration.md for the full rendered ExperimentMetric schema (all four metric types, with required fields per type) plus WRONG/RIGHT JSON pairs for the failure modes that come up most often (ratio with is_set filter instead of math: "sum" + math_property; retention without retention_window_start / start_handling). Read it before assembling a ratio or retention payload — the required fields are authoritative.
Step 4: Primary vs secondary
Primary metrics — the main success criteria for the experiment. These drive the ship/end decision.
Secondary metrics — additional measurements for context. Useful for guardrail metrics (e.g., ensuring a conversion improvement doesn't increase error rates).
Interpreting results
See references/interpreting-results.md for guidance on reading experiment results, statistical significance, and when to ship vs end.
Related skills
configuring-experiment-rollout— the rollout side: variant splits and traffic percentagediagnosing-experiment-health— when results look biased, empty, or strangeanalyzing-experiment-session-replays— qualitative complement — watch what each variant's users actually did
Files
- ATTRIBUTION.mdAdded by AutoGineer883 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md14.8 KiB
- references/interpreting-results.md2.2 KiB
- references/metric-configuration.md119.0 KiB
- references/metric-templates.md7.8 KiB
references/metric-configuration.md
Metric configuration
All metrics use kind: "ExperimentMetric". Legacy kinds (ExperimentTrendsQuery, ExperimentFunnelsQuery) are rejected.
The full Pydantic schema below is rendered from posthog/schema.py at build
time — if a field is missing here, fix the model. It is the ExperimentMetric
discriminated union: pick the variant matching your metric_type (mean,
funnel, ratio, retention) under $defs, and read that variant's
required array for the mandatory fields. The shared event-source building
blocks (EventsNode, ActionsNode, ExperimentDataWarehouseNode) and the
property-filter types are defined once under $defs and referenced by $ref.
The schema is authoritative; the prose and examples below are guidance.
Contents
Schema
Mean metric
Funnel metric
Ratio metric
Retention metric
Adding metrics to an experiment
Property filters
Schema
{
"$defs": {
"AccountCustomPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "account_custom_property",
"default": "account_custom_property",
"description": "Customer analytics account custom property \u2014 the key is the property definition id",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "AccountCustomPropertyFilter",
"type": "object"
},
"ActionsNode": {
"additionalProperties": false,
"properties": {
"custom_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Custom Name"
},
"fixedProperties": {
"anyOf": [
{
"items": {
"oneOf": [
{
"$ref": "#/$defs/EventPropertyFilter"
},
{
"$ref": "#/$defs/PersonPropertyFilter"
},
{
"$ref": "#/$defs/PersonMetadataPropertyFilter"
},
{
"$ref": "#/$defs/ElementPropertyFilter"
},
{
"$ref": "#/$defs/EventMetadataPropertyFilter"
},
{
"$ref": "#/$defs/SessionPropertyFilter"
},
{
"$ref": "#/$defs/CohortPropertyFilter"
},
{
"$ref": "#/$defs/RecordingPropertyFilter"
},
{
"$ref": "#/$defs/LogEntryPropertyFilter"
},
{
"$ref": "#/$defs/GroupPropertyFilter"
},
{
"$ref": "#/$defs/FeaturePropertyFilter"
},
{
"$ref": "#/$defs/FlagPropertyFilter"
},
{
"$ref": "#/$defs/HogQLPropertyFilter"
},
{
"$ref": "#/$defs/EmptyPropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePersonPropertyFilter"
},
{
"$ref": "#/$defs/ErrorTrackingIssueFilter"
},
{
"$ref": "#/$defs/LogPropertyFilter"
},
{
"$ref": "#/$defs/MetricPropertyFilter"
},
{
"$ref": "#/$defs/SpanPropertyFilter"
},
{
"$ref": "#/$defs/RevenueAnalyticsPropertyFilter"
},
{
"$ref": "#/$defs/AccountCustomPropertyFilter"
},
{
"$ref": "#/$defs/WorkflowVariablePropertyFilter"
},
{
"$ref": "#/$defs/BehavioralPropertyFilter"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person)",
"title": "Fixedproperties"
},
"id": {
"title": "Id",
"type": "integer"
},
"kind": {
"const": "ActionsNode",
"default": "ActionsNode",
"title": "Kind",
"type": "string"
},
"math": {
"anyOf": [
{
"$ref": "#/$defs/BaseMathType"
},
{
"$ref": "#/$defs/FunnelMathType"
},
{
"$ref": "#/$defs/PropertyMathType"
},
{
"$ref": "#/$defs/CountPerActorMathType"
},
{
"$ref": "#/$defs/GroupMathType"
},
{
"$ref": "#/$defs/ExperimentMetricMathType"
},
{
"$ref": "#/$defs/CalendarHeatmapMathType"
},
{
"const": "hogql",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math"
},
"math_group_type_index": {
"anyOf": [
{
"$ref": "#/$defs/MathGroupTypeIndex"
},
{
"type": "null"
}
],
"default": null
},
"math_hogql": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Hogql"
},
"math_multiplier": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Multiplier"
},
"math_property": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Property"
},
"math_property_revenue_currency": {
"anyOf": [
{
"$ref": "#/$defs/RevenueCurrencyPropertyConfig"
},
{
"type": "null"
}
],
"default": null
},
"math_property_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Property Type"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"optionalInFunnel": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Optionalinfunnel"
},
"properties": {
"anyOf": [
{
"items": {
"oneOf": [
{
"$ref": "#/$defs/EventPropertyFilter"
},
{
"$ref": "#/$defs/PersonPropertyFilter"
},
{
"$ref": "#/$defs/PersonMetadataPropertyFilter"
},
{
"$ref": "#/$defs/ElementPropertyFilter"
},
{
"$ref": "#/$defs/EventMetadataPropertyFilter"
},
{
"$ref": "#/$defs/SessionPropertyFilter"
},
{
"$ref": "#/$defs/CohortPropertyFilter"
},
{
"$ref": "#/$defs/RecordingPropertyFilter"
},
{
"$ref": "#/$defs/LogEntryPropertyFilter"
},
{
"$ref": "#/$defs/GroupPropertyFilter"
},
{
"$ref": "#/$defs/FeaturePropertyFilter"
},
{
"$ref": "#/$defs/FlagPropertyFilter"
},
{
"$ref": "#/$defs/HogQLPropertyFilter"
},
{
"$ref": "#/$defs/EmptyPropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePersonPropertyFilter"
},
{
"$ref": "#/$defs/ErrorTrackingIssueFilter"
},
{
"$ref": "#/$defs/LogPropertyFilter"
},
{
"$ref": "#/$defs/MetricPropertyFilter"
},
{
"$ref": "#/$defs/SpanPropertyFilter"
},
{
"$ref": "#/$defs/RevenueAnalyticsPropertyFilter"
},
{
"$ref": "#/$defs/AccountCustomPropertyFilter"
},
{
"$ref": "#/$defs/WorkflowVariablePropertyFilter"
},
{
"$ref": "#/$defs/BehavioralPropertyFilter"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Properties configurable in the interface",
"title": "Properties"
},
"response": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Response"
},
"version": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "version of the node, used for schema migrations",
"title": "Version"
}
},
"required": [
"id"
],
"title": "ActionsNode",
"type": "object"
},
"BaseMathType": {
"enum": [
"total",
"dau",
"weekly_active",
"monthly_active",
"unique_session",
"first_time_for_user",
"first_matching_event_for_user"
],
"title": "BaseMathType",
"type": "string"
},
"BehavioralEventSource": {
"enum": [
"events",
"actions"
],
"title": "BehavioralEventSource",
"type": "string"
},
"BehavioralPropertyFilter": {
"additionalProperties": false,
"properties": {
"event_filters": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/EventPropertyFilter"
},
{
"$ref": "#/$defs/PersonPropertyFilter"
},
{
"$ref": "#/$defs/ElementPropertyFilter"
},
{
"$ref": "#/$defs/FeaturePropertyFilter"
},
{
"$ref": "#/$defs/HogQLPropertyFilter"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Extra property filters the matching events must satisfy. Deliberately excludes nested behavioral/cohort filters and groups",
"title": "Event Filters"
},
"event_type": {
"$ref": "#/$defs/BehavioralEventSource"
},
"explicit_datetime": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Absolute or relative (e.g. -30d) lower date bound \u2014 alternative to time_value/time_interval",
"title": "Explicit Datetime"
},
"explicit_datetime_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Explicit Datetime To"
},
"key": {
"description": "Event name, or action id when event_type is 'actions'",
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"negation": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Match persons who did NOT satisfy the criterion. Not the same as a low count \u2014 zero-occurrence persons never match count operators",
"title": "Negation"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/PropertyOperator"
},
{
"type": "null"
}
],
"default": null,
"description": "Count comparison for performed_event_multiple, defaults to exact"
},
"operator_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Count threshold for performed_event_multiple",
"title": "Operator Value"
},
"time_interval": {
"anyOf": [
{
"$ref": "#/$defs/TimeUnitType"
},
{
"type": "null"
}
],
"default": null
},
"time_value": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Relative time window size, paired with time_interval",
"title": "Time Value"
},
"type": {
"const": "behavioral",
"default": "behavioral",
"description": "Person performed (or didn't perform) an event in a time window. ClickHouse-only \u2014 not evaluable by flags or CDP",
"title": "Type",
"type": "string"
},
"value": {
"$ref": "#/$defs/InlineBehavioralType"
}
},
"required": [
"event_type",
"key",
"value"
],
"title": "BehavioralPropertyFilter",
"type": "object"
},
"Breakdown": {
"additionalProperties": false,
"properties": {
"group_type_index": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Group Type Index"
},
"histogram_bin_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Histogram Bin Count"
},
"normalize_url": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Normalize Url"
},
"property": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
],
"title": "Property"
},
"type": {
"anyOf": [
{
"$ref": "#/$defs/MultipleBreakdownType"
},
{
"type": "null"
}
],
"default": null
}
},
"required": [
"property"
],
"title": "Breakdown",
"type": "object"
},
"BreakdownAttributionType": {
"enum": [
"first_touch",
"last_touch",
"all_events",
"step"
],
"title": "BreakdownAttributionType",
"type": "string"
},
"BreakdownFilter": {
"additionalProperties": false,
"properties": {
"breakdown": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array"
},
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Breakdown"
},
"breakdown_group_type_index": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Breakdown Group Type Index"
},
"breakdown_hide_other_aggregation": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Breakdown Hide Other Aggregation"
},
"breakdown_histogram_bin_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Breakdown Histogram Bin Count"
},
"breakdown_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Breakdown Limit"
},
"breakdown_normalize_url": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Breakdown Normalize Url"
},
"breakdown_path_cleaning": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Breakdown Path Cleaning"
},
"breakdown_type": {
"anyOf": [
{
"$ref": "#/$defs/BreakdownType"
},
{
"type": "null"
}
],
"default": "event"
},
"breakdowns": {
"anyOf": [
{
"items": {
"$ref": "#/$defs/Breakdown"
},
"maxItems": 3,
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Breakdowns"
}
},
"title": "BreakdownFilter",
"type": "object"
},
"BreakdownType": {
"enum": [
"cohort",
"person",
"event",
"event_metadata",
"element",
"group",
"session",
"hogql",
"data_warehouse",
"data_warehouse_person_property",
"revenue_analytics"
],
"title": "BreakdownType",
"type": "string"
},
"CalendarHeatmapMathType": {
"enum": [
"total",
"dau"
],
"title": "CalendarHeatmapMathType",
"type": "string"
},
"CohortPropertyFilter": {
"additionalProperties": false,
"properties": {
"cohort_deleted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Set by the feature flag API when the cohort is deleted or does not exist.",
"title": "Cohort Deleted"
},
"cohort_missing": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"description": "Set by the feature flag API when the cohort does not exist, so it cannot be restored.",
"title": "Cohort Missing"
},
"cohort_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cohort Name"
},
"key": {
"const": "id",
"default": "id",
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/PropertyOperator"
},
{
"type": "null"
}
],
"default": "in"
},
"type": {
"const": "cohort",
"default": "cohort",
"title": "Type",
"type": "string"
},
"value": {
"title": "Value",
"type": "integer"
}
},
"required": [
"value"
],
"title": "CohortPropertyFilter",
"type": "object"
},
"CountPerActorMathType": {
"enum": [
"avg_count_per_actor",
"min_count_per_actor",
"max_count_per_actor",
"median_count_per_actor",
"p75_count_per_actor",
"p90_count_per_actor",
"p95_count_per_actor",
"p99_count_per_actor"
],
"title": "CountPerActorMathType",
"type": "string"
},
"CurrencyCode": {
"enum": [
"AED",
"AFN",
"ALL",
"AMD",
"ANG",
"AOA",
"ARS",
"AUD",
"AWG",
"AZN",
"BAM",
"BBD",
"BDT",
"BGN",
"BHD",
"BIF",
"BMD",
"BND",
"BOB",
"BRL",
"BSD",
"BTC",
"BTN",
"BWP",
"BYN",
"BZD",
"CAD",
"CDF",
"CHF",
"CLP",
"CNY",
"COP",
"CRC",
"CVE",
"CZK",
"DJF",
"DKK",
"DOP",
"DZD",
"EGP",
"ERN",
"ETB",
"EUR",
"FJD",
"GBP",
"GEL",
"GHS",
"GIP",
"GMD",
"GNF",
"GTQ",
"GYD",
"HKD",
"HNL",
"HRK",
"HTG",
"HUF",
"IDR",
"ILS",
"INR",
"IQD",
"IRR",
"ISK",
"JMD",
"JOD",
"JPY",
"KES",
"KGS",
"KHR",
"KMF",
"KRW",
"KWD",
"KYD",
"KZT",
"LAK",
"LBP",
"LKR",
"LRD",
"LTL",
"LVL",
"LSL",
"LYD",
"MAD",
"MDL",
"MGA",
"MKD",
"MMK",
"MNT",
"MOP",
"MRU",
"MTL",
"MUR",
"MVR",
"MWK",
"MXN",
"MYR",
"MZN",
"NAD",
"NGN",
"NIO",
"NOK",
"NPR",
"NZD",
"OMR",
"PAB",
"PEN",
"PGK",
"PHP",
"PKR",
"PLN",
"PYG",
"QAR",
"RON",
"RSD",
"RUB",
"RWF",
"SAR",
"SBD",
"SCR",
"SDG",
"SEK",
"SGD",
"SRD",
"SSP",
"STN",
"SYP",
"SZL",
"THB",
"TJS",
"TMT",
"TND",
"TOP",
"TRY",
"TTD",
"TWD",
"TZS",
"UAH",
"UGX",
"USD",
"UYU",
"UZS",
"VES",
"VND",
"VUV",
"WST",
"XAF",
"XCD",
"XOF",
"XPF",
"YER",
"ZAR",
"ZMW"
],
"title": "CurrencyCode",
"type": "string"
},
"DataWarehousePersonPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "data_warehouse_person_property",
"default": "data_warehouse_person_property",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "DataWarehousePersonPropertyFilter",
"type": "object"
},
"DataWarehousePropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "data_warehouse",
"default": "data_warehouse",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "DataWarehousePropertyFilter",
"type": "object"
},
"DurationType": {
"enum": [
"duration",
"active_seconds",
"inactive_seconds"
],
"title": "DurationType",
"type": "string"
},
"ElementPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"$ref": "#/$defs/Key10"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "element",
"default": "element",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "ElementPropertyFilter",
"type": "object"
},
"EmptyPropertyFilter": {
"additionalProperties": false,
"properties": {
"type": {
"const": "empty",
"default": "empty",
"title": "Type",
"type": "string"
}
},
"title": "EmptyPropertyFilter",
"type": "object"
},
"ErrorTrackingIssueFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "error_tracking_issue",
"default": "error_tracking_issue",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "ErrorTrackingIssueFilter",
"type": "object"
},
"EventMetadataPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "event_metadata",
"default": "event_metadata",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "EventMetadataPropertyFilter",
"type": "object"
},
"EventPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"anyOf": [
{
"$ref": "#/$defs/PropertyOperator"
},
{
"type": "null"
}
],
"default": "exact"
},
"type": {
"const": "event",
"default": "event",
"description": "Event properties",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key"
],
"title": "EventPropertyFilter",
"type": "object"
},
"EventsNode": {
"additionalProperties": false,
"properties": {
"custom_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Custom Name"
},
"event": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The event or `null` for all events.",
"title": "Event"
},
"fixedProperties": {
"anyOf": [
{
"items": {
"oneOf": [
{
"$ref": "#/$defs/EventPropertyFilter"
},
{
"$ref": "#/$defs/PersonPropertyFilter"
},
{
"$ref": "#/$defs/PersonMetadataPropertyFilter"
},
{
"$ref": "#/$defs/ElementPropertyFilter"
},
{
"$ref": "#/$defs/EventMetadataPropertyFilter"
},
{
"$ref": "#/$defs/SessionPropertyFilter"
},
{
"$ref": "#/$defs/CohortPropertyFilter"
},
{
"$ref": "#/$defs/RecordingPropertyFilter"
},
{
"$ref": "#/$defs/LogEntryPropertyFilter"
},
{
"$ref": "#/$defs/GroupPropertyFilter"
},
{
"$ref": "#/$defs/FeaturePropertyFilter"
},
{
"$ref": "#/$defs/FlagPropertyFilter"
},
{
"$ref": "#/$defs/HogQLPropertyFilter"
},
{
"$ref": "#/$defs/EmptyPropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePersonPropertyFilter"
},
{
"$ref": "#/$defs/ErrorTrackingIssueFilter"
},
{
"$ref": "#/$defs/LogPropertyFilter"
},
{
"$ref": "#/$defs/MetricPropertyFilter"
},
{
"$ref": "#/$defs/SpanPropertyFilter"
},
{
"$ref": "#/$defs/RevenueAnalyticsPropertyFilter"
},
{
"$ref": "#/$defs/AccountCustomPropertyFilter"
},
{
"$ref": "#/$defs/WorkflowVariablePropertyFilter"
},
{
"$ref": "#/$defs/BehavioralPropertyFilter"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person)",
"title": "Fixedproperties"
},
"kind": {
"const": "EventsNode",
"default": "EventsNode",
"title": "Kind",
"type": "string"
},
"limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Limit"
},
"math": {
"anyOf": [
{
"$ref": "#/$defs/BaseMathType"
},
{
"$ref": "#/$defs/FunnelMathType"
},
{
"$ref": "#/$defs/PropertyMathType"
},
{
"$ref": "#/$defs/CountPerActorMathType"
},
{
"$ref": "#/$defs/GroupMathType"
},
{
"$ref": "#/$defs/ExperimentMetricMathType"
},
{
"$ref": "#/$defs/CalendarHeatmapMathType"
},
{
"const": "hogql",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math"
},
"math_group_type_index": {
"anyOf": [
{
"$ref": "#/$defs/MathGroupTypeIndex"
},
{
"type": "null"
}
],
"default": null
},
"math_hogql": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Hogql"
},
"math_multiplier": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Multiplier"
},
"math_property": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Property"
},
"math_property_revenue_currency": {
"anyOf": [
{
"$ref": "#/$defs/RevenueCurrencyPropertyConfig"
},
{
"type": "null"
}
],
"default": null
},
"math_property_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Property Type"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"optionalInFunnel": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Optionalinfunnel"
},
"orderBy": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Columns to order by",
"title": "Orderby"
},
"properties": {
"anyOf": [
{
"items": {
"oneOf": [
{
"$ref": "#/$defs/EventPropertyFilter"
},
{
"$ref": "#/$defs/PersonPropertyFilter"
},
{
"$ref": "#/$defs/PersonMetadataPropertyFilter"
},
{
"$ref": "#/$defs/ElementPropertyFilter"
},
{
"$ref": "#/$defs/EventMetadataPropertyFilter"
},
{
"$ref": "#/$defs/SessionPropertyFilter"
},
{
"$ref": "#/$defs/CohortPropertyFilter"
},
{
"$ref": "#/$defs/RecordingPropertyFilter"
},
{
"$ref": "#/$defs/LogEntryPropertyFilter"
},
{
"$ref": "#/$defs/GroupPropertyFilter"
},
{
"$ref": "#/$defs/FeaturePropertyFilter"
},
{
"$ref": "#/$defs/FlagPropertyFilter"
},
{
"$ref": "#/$defs/HogQLPropertyFilter"
},
{
"$ref": "#/$defs/EmptyPropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePersonPropertyFilter"
},
{
"$ref": "#/$defs/ErrorTrackingIssueFilter"
},
{
"$ref": "#/$defs/LogPropertyFilter"
},
{
"$ref": "#/$defs/MetricPropertyFilter"
},
{
"$ref": "#/$defs/SpanPropertyFilter"
},
{
"$ref": "#/$defs/RevenueAnalyticsPropertyFilter"
},
{
"$ref": "#/$defs/AccountCustomPropertyFilter"
},
{
"$ref": "#/$defs/WorkflowVariablePropertyFilter"
},
{
"$ref": "#/$defs/BehavioralPropertyFilter"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Properties configurable in the interface",
"title": "Properties"
},
"response": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Response"
},
"version": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "version of the node, used for schema migrations",
"title": "Version"
}
},
"title": "EventsNode",
"type": "object"
},
"ExperimentDataWarehouseNode": {
"additionalProperties": false,
"properties": {
"custom_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Custom Name"
},
"data_warehouse_join_key": {
"title": "Data Warehouse Join Key",
"type": "string"
},
"events_join_key": {
"title": "Events Join Key",
"type": "string"
},
"fixedProperties": {
"anyOf": [
{
"items": {
"oneOf": [
{
"$ref": "#/$defs/EventPropertyFilter"
},
{
"$ref": "#/$defs/PersonPropertyFilter"
},
{
"$ref": "#/$defs/PersonMetadataPropertyFilter"
},
{
"$ref": "#/$defs/ElementPropertyFilter"
},
{
"$ref": "#/$defs/EventMetadataPropertyFilter"
},
{
"$ref": "#/$defs/SessionPropertyFilter"
},
{
"$ref": "#/$defs/CohortPropertyFilter"
},
{
"$ref": "#/$defs/RecordingPropertyFilter"
},
{
"$ref": "#/$defs/LogEntryPropertyFilter"
},
{
"$ref": "#/$defs/GroupPropertyFilter"
},
{
"$ref": "#/$defs/FeaturePropertyFilter"
},
{
"$ref": "#/$defs/FlagPropertyFilter"
},
{
"$ref": "#/$defs/HogQLPropertyFilter"
},
{
"$ref": "#/$defs/EmptyPropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePersonPropertyFilter"
},
{
"$ref": "#/$defs/ErrorTrackingIssueFilter"
},
{
"$ref": "#/$defs/LogPropertyFilter"
},
{
"$ref": "#/$defs/MetricPropertyFilter"
},
{
"$ref": "#/$defs/SpanPropertyFilter"
},
{
"$ref": "#/$defs/RevenueAnalyticsPropertyFilter"
},
{
"$ref": "#/$defs/AccountCustomPropertyFilter"
},
{
"$ref": "#/$defs/WorkflowVariablePropertyFilter"
},
{
"$ref": "#/$defs/BehavioralPropertyFilter"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Fixed properties in the query, can't be edited in the interface (e.g. scoping down by person)",
"title": "Fixedproperties"
},
"kind": {
"const": "ExperimentDataWarehouseNode",
"default": "ExperimentDataWarehouseNode",
"title": "Kind",
"type": "string"
},
"math": {
"anyOf": [
{
"$ref": "#/$defs/BaseMathType"
},
{
"$ref": "#/$defs/FunnelMathType"
},
{
"$ref": "#/$defs/PropertyMathType"
},
{
"$ref": "#/$defs/CountPerActorMathType"
},
{
"$ref": "#/$defs/GroupMathType"
},
{
"$ref": "#/$defs/ExperimentMetricMathType"
},
{
"$ref": "#/$defs/CalendarHeatmapMathType"
},
{
"const": "hogql",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math"
},
"math_group_type_index": {
"anyOf": [
{
"$ref": "#/$defs/MathGroupTypeIndex"
},
{
"type": "null"
}
],
"default": null
},
"math_hogql": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Hogql"
},
"math_multiplier": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Multiplier"
},
"math_property": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Property"
},
"math_property_revenue_currency": {
"anyOf": [
{
"$ref": "#/$defs/RevenueCurrencyPropertyConfig"
},
{
"type": "null"
}
],
"default": null
},
"math_property_type": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Math Property Type"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"optionalInFunnel": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Optionalinfunnel"
},
"properties": {
"anyOf": [
{
"items": {
"oneOf": [
{
"$ref": "#/$defs/EventPropertyFilter"
},
{
"$ref": "#/$defs/PersonPropertyFilter"
},
{
"$ref": "#/$defs/PersonMetadataPropertyFilter"
},
{
"$ref": "#/$defs/ElementPropertyFilter"
},
{
"$ref": "#/$defs/EventMetadataPropertyFilter"
},
{
"$ref": "#/$defs/SessionPropertyFilter"
},
{
"$ref": "#/$defs/CohortPropertyFilter"
},
{
"$ref": "#/$defs/RecordingPropertyFilter"
},
{
"$ref": "#/$defs/LogEntryPropertyFilter"
},
{
"$ref": "#/$defs/GroupPropertyFilter"
},
{
"$ref": "#/$defs/FeaturePropertyFilter"
},
{
"$ref": "#/$defs/FlagPropertyFilter"
},
{
"$ref": "#/$defs/HogQLPropertyFilter"
},
{
"$ref": "#/$defs/EmptyPropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePropertyFilter"
},
{
"$ref": "#/$defs/DataWarehousePersonPropertyFilter"
},
{
"$ref": "#/$defs/ErrorTrackingIssueFilter"
},
{
"$ref": "#/$defs/LogPropertyFilter"
},
{
"$ref": "#/$defs/MetricPropertyFilter"
},
{
"$ref": "#/$defs/SpanPropertyFilter"
},
{
"$ref": "#/$defs/RevenueAnalyticsPropertyFilter"
},
{
"$ref": "#/$defs/AccountCustomPropertyFilter"
},
{
"$ref": "#/$defs/WorkflowVariablePropertyFilter"
},
{
"$ref": "#/$defs/BehavioralPropertyFilter"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Properties configurable in the interface",
"title": "Properties"
},
"response": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Response"
},
"table_name": {
"title": "Table Name",
"type": "string"
},
"timestamp_field": {
"title": "Timestamp Field",
"type": "string"
},
"version": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "version of the node, used for schema migrations",
"title": "Version"
}
},
"required": [
"data_warehouse_join_key",
"events_join_key",
"table_name",
"timestamp_field"
],
"title": "ExperimentDataWarehouseNode",
"type": "object"
},
"ExperimentExposureNode": {
"additionalProperties": false,
"properties": {
"kind": {
"const": "ExperimentExposureNode",
"default": "ExperimentExposureNode",
"title": "Kind",
"type": "string"
},
"response": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Response"
},
"version": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "version of the node, used for schema migrations",
"title": "Version"
}
},
"title": "ExperimentExposureNode",
"type": "object"
},
"ExperimentFunnelMetric": {
"additionalProperties": false,
"properties": {
"breakdownAttributionType": {
"anyOf": [
{
"$ref": "#/$defs/BreakdownAttributionType"
},
{
"type": "null"
}
],
"default": "first_touch",
"description": "How to attribute the breakdown value across funnel steps."
},
"breakdownAttributionValue": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "When breakdownAttributionType is `step`, the 0-indexed step to attribute from.",
"title": "Breakdownattributionvalue"
},
"breakdownFilter": {
"anyOf": [
{
"$ref": "#/$defs/BreakdownFilter"
},
{
"type": "null"
}
],
"default": null
},
"conversion_window": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Conversion Window"
},
"conversion_window_unit": {
"anyOf": [
{
"$ref": "#/$defs/FunnelConversionWindowTimeUnit"
},
{
"type": "null"
}
],
"default": null
},
"fingerprint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fingerprint"
},
"funnel_order_type": {
"anyOf": [
{
"$ref": "#/$defs/StepOrderValue"
},
{
"type": "null"
}
],
"default": null
},
"goal": {
"anyOf": [
{
"$ref": "#/$defs/ExperimentMetricGoal"
},
{
"type": "null"
}
],
"default": null
},
"isSharedMetric": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Issharedmetric"
},
"kind": {
"const": "ExperimentMetric",
"default": "ExperimentMetric",
"title": "Kind",
"type": "string"
},
"metric_type": {
"const": "funnel",
"default": "funnel",
"title": "Metric Type",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"response": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Response"
},
"series": {
"items": {
"discriminator": {
"mapping": {
"ActionsNode": "#/$defs/ActionsNode",
"EventsNode": "#/$defs/EventsNode",
"ExperimentDataWarehouseNode": "#/$defs/ExperimentDataWarehouseNode"
},
"propertyName": "kind"
},
"oneOf": [
{
"$ref": "#/$defs/EventsNode"
},
{
"$ref": "#/$defs/ActionsNode"
},
{
"$ref": "#/$defs/ExperimentDataWarehouseNode"
}
]
},
"title": "Series",
"type": "array"
},
"sharedMetricId": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Sharedmetricid"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"version": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "version of the node, used for schema migrations",
"title": "Version"
}
},
"required": [
"series"
],
"title": "ExperimentFunnelMetric",
"type": "object"
},
"ExperimentMeanMetric": {
"additionalProperties": false,
"properties": {
"breakdownFilter": {
"anyOf": [
{
"$ref": "#/$defs/BreakdownFilter"
},
{
"type": "null"
}
],
"default": null
},
"conversion_window": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Conversion Window"
},
"conversion_window_unit": {
"anyOf": [
{
"$ref": "#/$defs/FunnelConversionWindowTimeUnit"
},
{
"type": "null"
}
],
"default": null
},
"fingerprint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fingerprint"
},
"goal": {
"anyOf": [
{
"$ref": "#/$defs/ExperimentMetricGoal"
},
{
"type": "null"
}
],
"default": null
},
"ignore_zeros": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Ignore Zeros"
},
"isSharedMetric": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Issharedmetric"
},
"kind": {
"const": "ExperimentMetric",
"default": "ExperimentMetric",
"title": "Kind",
"type": "string"
},
"lower_bound_percentile": {
"anyOf": [
{
"maximum": 1.0,
"minimum": 0.0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Winsorization lower percentile bound, as a fraction in [0, 1] (e.g. 0.01 for the 1st percentile).",
"title": "Lower Bound Percentile"
},
"metric_type": {
"const": "mean",
"default": "mean",
"title": "Metric Type",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"response": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Response"
},
"sharedMetricId": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Sharedmetricid"
},
"source": {
"discriminator": {
"mapping": {
"ActionsNode": "#/$defs/ActionsNode",
"EventsNode": "#/$defs/EventsNode",
"ExperimentDataWarehouseNode": "#/$defs/ExperimentDataWarehouseNode",
"ExperimentWarehouseNativeNode": "#/$defs/ExperimentWarehouseNativeNode"
},
"propertyName": "kind"
},
"oneOf": [
{
"$ref": "#/$defs/EventsNode"
},
{
"$ref": "#/$defs/ActionsNode"
},
{
"$ref": "#/$defs/ExperimentDataWarehouseNode"
},
{
"$ref": "#/$defs/ExperimentWarehouseNativeNode"
}
],
"title": "Source"
},
"threshold": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "When set, reports the percentage of users whose per-user summed/counted value reaches or exceeds this threshold. Only meaningful for sum/count math types.",
"title": "Threshold"
},
"upper_bound_percentile": {
"anyOf": [
{
"maximum": 1.0,
"minimum": 0.0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Winsorization upper percentile bound, as a fraction in [0, 1] (e.g. 0.99 for the 99th percentile).",
"title": "Upper Bound Percentile"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"version": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "version of the node, used for schema migrations",
"title": "Version"
}
},
"required": [
"source"
],
"title": "ExperimentMeanMetric",
"type": "object"
},
"ExperimentMetricGoal": {
"enum": [
"increase",
"decrease"
],
"title": "ExperimentMetricGoal",
"type": "string"
},
"ExperimentMetricMathType": {
"enum": [
"total",
"sum",
"unique_session",
"min",
"max",
"avg",
"dau",
"unique_group",
"hogql"
],
"title": "ExperimentMetricMathType",
"type": "string"
},
"ExperimentMetricOutlierHandling": {
"additionalProperties": false,
"properties": {
"ignore_zeros": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Ignore Zeros"
},
"lower_bound_percentile": {
"anyOf": [
{
"maximum": 1.0,
"minimum": 0.0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Winsorization lower percentile bound, as a fraction in [0, 1] (e.g. 0.01 for the 1st percentile).",
"title": "Lower Bound Percentile"
},
"upper_bound_percentile": {
"anyOf": [
{
"maximum": 1.0,
"minimum": 0.0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "Winsorization upper percentile bound, as a fraction in [0, 1] (e.g. 0.99 for the 99th percentile).",
"title": "Upper Bound Percentile"
}
},
"title": "ExperimentMetricOutlierHandling",
"type": "object"
},
"ExperimentRatioMetric": {
"additionalProperties": false,
"properties": {
"breakdownFilter": {
"anyOf": [
{
"$ref": "#/$defs/BreakdownFilter"
},
{
"type": "null"
}
],
"default": null
},
"conversion_window": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Conversion Window"
},
"conversion_window_unit": {
"anyOf": [
{
"$ref": "#/$defs/FunnelConversionWindowTimeUnit"
},
{
"type": "null"
}
],
"default": null
},
"denominator": {
"discriminator": {
"mapping": {
"ActionsNode": "#/$defs/ActionsNode",
"EventsNode": "#/$defs/EventsNode",
"ExperimentDataWarehouseNode": "#/$defs/ExperimentDataWarehouseNode",
"ExperimentWarehouseNativeNode": "#/$defs/ExperimentWarehouseNativeNode"
},
"propertyName": "kind"
},
"oneOf": [
{
"$ref": "#/$defs/EventsNode"
},
{
"$ref": "#/$defs/ActionsNode"
},
{
"$ref": "#/$defs/ExperimentDataWarehouseNode"
},
{
"$ref": "#/$defs/ExperimentWarehouseNativeNode"
}
],
"title": "Denominator"
},
"denominator_outlier_handling": {
"anyOf": [
{
"$ref": "#/$defs/ExperimentMetricOutlierHandling"
},
{
"type": "null"
}
],
"default": null
},
"fingerprint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fingerprint"
},
"goal": {
"anyOf": [
{
"$ref": "#/$defs/ExperimentMetricGoal"
},
{
"type": "null"
}
],
"default": null
},
"isSharedMetric": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Issharedmetric"
},
"kind": {
"const": "ExperimentMetric",
"default": "ExperimentMetric",
"title": "Kind",
"type": "string"
},
"metric_type": {
"const": "ratio",
"default": "ratio",
"title": "Metric Type",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"numerator": {
"discriminator": {
"mapping": {
"ActionsNode": "#/$defs/ActionsNode",
"EventsNode": "#/$defs/EventsNode",
"ExperimentDataWarehouseNode": "#/$defs/ExperimentDataWarehouseNode",
"ExperimentWarehouseNativeNode": "#/$defs/ExperimentWarehouseNativeNode"
},
"propertyName": "kind"
},
"oneOf": [
{
"$ref": "#/$defs/EventsNode"
},
{
"$ref": "#/$defs/ActionsNode"
},
{
"$ref": "#/$defs/ExperimentDataWarehouseNode"
},
{
"$ref": "#/$defs/ExperimentWarehouseNativeNode"
}
],
"title": "Numerator"
},
"numerator_outlier_handling": {
"anyOf": [
{
"$ref": "#/$defs/ExperimentMetricOutlierHandling"
},
{
"type": "null"
}
],
"default": null
},
"response": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Response"
},
"sharedMetricId": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Sharedmetricid"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"version": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "version of the node, used for schema migrations",
"title": "Version"
}
},
"required": [
"denominator",
"numerator"
],
"title": "ExperimentRatioMetric",
"type": "object"
},
"ExperimentRetentionMetric": {
"additionalProperties": false,
"properties": {
"breakdownFilter": {
"anyOf": [
{
"$ref": "#/$defs/BreakdownFilter"
},
{
"type": "null"
}
],
"default": null
},
"completion_event": {
"discriminator": {
"mapping": {
"ActionsNode": "#/$defs/ActionsNode",
"EventsNode": "#/$defs/EventsNode",
"ExperimentDataWarehouseNode": "#/$defs/ExperimentDataWarehouseNode"
},
"propertyName": "kind"
},
"oneOf": [
{
"$ref": "#/$defs/EventsNode"
},
{
"$ref": "#/$defs/ActionsNode"
},
{
"$ref": "#/$defs/ExperimentDataWarehouseNode"
}
],
"title": "Completion Event"
},
"conversion_window": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Conversion Window"
},
"conversion_window_unit": {
"anyOf": [
{
"$ref": "#/$defs/FunnelConversionWindowTimeUnit"
},
{
"type": "null"
}
],
"default": null
},
"fingerprint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fingerprint"
},
"goal": {
"anyOf": [
{
"$ref": "#/$defs/ExperimentMetricGoal"
},
{
"type": "null"
}
],
"default": null
},
"isSharedMetric": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Issharedmetric"
},
"kind": {
"const": "ExperimentMetric",
"default": "ExperimentMetric",
"title": "Kind",
"type": "string"
},
"metric_type": {
"const": "retention",
"default": "retention",
"title": "Metric Type",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"response": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Response"
},
"retention_window_end": {
"title": "Retention Window End",
"type": "integer"
},
"retention_window_start": {
"title": "Retention Window Start",
"type": "integer"
},
"retention_window_unit": {
"$ref": "#/$defs/FunnelConversionWindowTimeUnit"
},
"sharedMetricId": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Sharedmetricid"
},
"start_event": {
"discriminator": {
"mapping": {
"ActionsNode": "#/$defs/ActionsNode",
"EventsNode": "#/$defs/EventsNode",
"ExperimentDataWarehouseNode": "#/$defs/ExperimentDataWarehouseNode",
"ExperimentExposureNode": "#/$defs/ExperimentExposureNode"
},
"propertyName": "kind"
},
"oneOf": [
{
"$ref": "#/$defs/EventsNode"
},
{
"$ref": "#/$defs/ActionsNode"
},
{
"$ref": "#/$defs/ExperimentDataWarehouseNode"
},
{
"$ref": "#/$defs/ExperimentExposureNode"
}
],
"title": "Start Event"
},
"start_handling": {
"$ref": "#/$defs/StartHandling"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"version": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "version of the node, used for schema migrations",
"title": "Version"
}
},
"required": [
"completion_event",
"retention_window_end",
"retention_window_start",
"retention_window_unit",
"start_event",
"start_handling"
],
"title": "ExperimentRetentionMetric",
"type": "object"
},
"ExperimentWarehouseNativeMathType": {
"enum": [
"total",
"sum"
],
"title": "ExperimentWarehouseNativeMathType",
"type": "string"
},
"ExperimentWarehouseNativeNode": {
"additionalProperties": false,
"properties": {
"connection_id": {
"description": "The direct-query source (an ExternalDataSource id) the SQL is written for.",
"title": "Connection Id",
"type": "string"
},
"custom_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Custom Name"
},
"kind": {
"const": "ExperimentWarehouseNativeNode",
"default": "ExperimentWarehouseNativeNode",
"title": "Kind",
"type": "string"
},
"math": {
"anyOf": [
{
"$ref": "#/$defs/ExperimentWarehouseNativeMathType"
},
{
"type": "null"
}
],
"default": null,
"description": "How to aggregate the rows per entity. Defaults to `total` (row count)."
},
"math_property": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The numeric column `math` reads. Required when `math` is `sum`. One SQL relation can serve several metrics, each reading a different column.",
"title": "Math Property"
},
"query": {
"description": "Read-only SQL in the warehouse's dialect, returning one row per outcome with `entity_id` and `timestamp` columns plus any numeric columns a metric can measure.",
"title": "Query",
"type": "string"
},
"response": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Response"
},
"unit": {
"$ref": "#/$defs/ExperimentWarehouseNativeUnitBinding"
},
"version": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"description": "version of the node, used for schema migrations",
"title": "Version"
}
},
"required": [
"connection_id",
"query",
"unit"
],
"title": "ExperimentWarehouseNativeNode",
"type": "object"
},
"ExperimentWarehouseNativeUnitBinding": {
"additionalProperties": false,
"properties": {
"id_namespace": {
"description": "Which ids represent that unit, such as `billing_customer_id`.",
"title": "Id Namespace",
"type": "string"
},
"unit_type": {
"description": "What was randomized, as a stable project-scoped label such as `customer` or `account`.",
"title": "Unit Type",
"type": "string"
}
},
"required": [
"id_namespace",
"unit_type"
],
"title": "ExperimentWarehouseNativeUnitBinding",
"type": "object"
},
"FeaturePropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "feature",
"default": "feature",
"description": "Event property with \"$feature/\" prepended",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "FeaturePropertyFilter",
"type": "object"
},
"FlagPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"description": "The key should be the flag ID",
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"const": "flag_evaluates_to",
"default": "flag_evaluates_to",
"description": "Only flag_evaluates_to operator is allowed for flag dependencies",
"title": "Operator",
"type": "string"
},
"type": {
"const": "flag",
"default": "flag",
"description": "Feature flag dependency",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "string"
}
],
"description": "The value can be true, false, or a variant name",
"title": "Value"
}
},
"required": [
"key",
"value"
],
"title": "FlagPropertyFilter",
"type": "object"
},
"FunnelConversionWindowTimeUnit": {
"enum": [
"second",
"minute",
"hour",
"day",
"week",
"month"
],
"title": "FunnelConversionWindowTimeUnit",
"type": "string"
},
"FunnelMathType": {
"enum": [
"total",
"first_time_for_user",
"first_time_for_user_with_filters"
],
"title": "FunnelMathType",
"type": "string"
},
"GroupMathType": {
"enum": [
"unique_group",
"first_time_for_group",
"first_matching_event_for_group"
],
"title": "GroupMathType",
"type": "string"
},
"GroupPropertyFilter": {
"additionalProperties": false,
"properties": {
"group_key_names": {
"anyOf": [
{
"additionalProperties": {
"type": "string"
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Group Key Names"
},
"group_type_index": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Group Type Index"
},
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "group",
"default": "group",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "GroupPropertyFilter",
"type": "object"
},
"HogQLPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"type": {
"const": "hogql",
"default": "hogql",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key"
],
"title": "HogQLPropertyFilter",
"type": "object"
},
"InlineBehavioralType": {
"enum": [
"performed_event",
"performed_event_multiple"
],
"title": "InlineBehavioralType",
"type": "string"
},
"Key10": {
"enum": [
"tag_name",
"text",
"href",
"selector"
],
"title": "Key10",
"type": "string"
},
"LogEntryPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "log_entry",
"default": "log_entry",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "LogEntryPropertyFilter",
"type": "object"
},
"LogPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"$ref": "#/$defs/LogPropertyFilterType"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator",
"type"
],
"title": "LogPropertyFilter",
"type": "object"
},
"LogPropertyFilterType": {
"enum": [
"log",
"log_attribute",
"log_resource_attribute"
],
"title": "LogPropertyFilterType",
"type": "string"
},
"MathGroupTypeIndex": {
"enum": [
0.0,
1.0,
2.0,
3.0,
4.0
],
"title": "MathGroupTypeIndex",
"type": "number"
},
"MetricPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "metric_attribute",
"default": "metric_attribute",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "MetricPropertyFilter",
"type": "object"
},
"MultipleBreakdownType": {
"enum": [
"person",
"event",
"event_metadata",
"element",
"group",
"session",
"hogql",
"cohort",
"revenue_analytics",
"data_warehouse",
"data_warehouse_person_property"
],
"title": "MultipleBreakdownType",
"type": "string"
},
"PersonMetadataPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "person_metadata",
"default": "person_metadata",
"description": "Top-level columns on the persons table (e.g. created_at), not properties JSON",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "PersonMetadataPropertyFilter",
"type": "object"
},
"PersonPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "person",
"default": "person",
"description": "Person properties",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "PersonPropertyFilter",
"type": "object"
},
"PropertyMathType": {
"enum": [
"avg",
"sum",
"min",
"max",
"median",
"p75",
"p90",
"p95",
"p99"
],
"title": "PropertyMathType",
"type": "string"
},
"PropertyOperator": {
"enum": [
"exact",
"is_not",
"icontains",
"not_icontains",
"starts_with",
"not_starts_with",
"ends_with",
"not_ends_with",
"regex",
"not_regex",
"gt",
"gte",
"lt",
"lte",
"is_set",
"is_not_set",
"is_date_exact",
"is_date_before",
"is_date_after",
"between",
"not_between",
"min",
"max",
"in",
"not_in",
"is_cleaned_path_exact",
"is_cleaned_path_not_exact",
"flag_evaluates_to",
"semver_eq",
"semver_neq",
"semver_gt",
"semver_gte",
"semver_lt",
"semver_lte",
"semver_tilde",
"semver_caret",
"semver_wildcard",
"icontains_multi",
"not_icontains_multi"
],
"title": "PropertyOperator",
"type": "string"
},
"RecordingPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"anyOf": [
{
"$ref": "#/$defs/DurationType"
},
{
"type": "string"
}
],
"title": "Key"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "recording",
"default": "recording",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "RecordingPropertyFilter",
"type": "object"
},
"RevenueAnalyticsPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "revenue_analytics",
"default": "revenue_analytics",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "RevenueAnalyticsPropertyFilter",
"type": "object"
},
"RevenueCurrencyPropertyConfig": {
"additionalProperties": false,
"properties": {
"property": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Property"
},
"static": {
"anyOf": [
{
"$ref": "#/$defs/CurrencyCode"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "RevenueCurrencyPropertyConfig",
"type": "object"
},
"SessionPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "session",
"default": "session",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "SessionPropertyFilter",
"type": "object"
},
"SpanPropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"$ref": "#/$defs/SpanPropertyFilterType"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator",
"type"
],
"title": "SpanPropertyFilter",
"type": "object"
},
"SpanPropertyFilterType": {
"enum": [
"span",
"span_attribute",
"span_resource_attribute"
],
"title": "SpanPropertyFilterType",
"type": "string"
},
"StartHandling": {
"enum": [
"first_seen",
"last_seen"
],
"title": "StartHandling",
"type": "string"
},
"StepOrderValue": {
"enum": [
"strict",
"unordered",
"ordered"
],
"title": "StepOrderValue",
"type": "string"
},
"TimeUnitType": {
"enum": [
"day",
"week",
"month",
"year"
],
"title": "TimeUnitType",
"type": "string"
},
"WorkflowVariablePropertyFilter": {
"additionalProperties": false,
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Label"
},
"operator": {
"$ref": "#/$defs/PropertyOperator"
},
"type": {
"const": "workflow_variable",
"default": "workflow_variable",
"title": "Type",
"type": "string"
},
"value": {
"anyOf": [
{
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
},
"type": "array"
},
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Value"
}
},
"required": [
"key",
"operator"
],
"title": "WorkflowVariablePropertyFilter",
"type": "object"
}
},
"discriminator": {
"mapping": {
"funnel": "#/$defs/ExperimentFunnelMetric",
"mean": "#/$defs/ExperimentMeanMetric",
"ratio": "#/$defs/ExperimentRatioMetric",
"retention": "#/$defs/ExperimentRetentionMetric"
},
"propertyName": "metric_type"
},
"oneOf": [
{
"$ref": "#/$defs/ExperimentMeanMetric"
},
{
"$ref": "#/$defs/ExperimentFunnelMetric"
},
{
"$ref": "#/$defs/ExperimentRatioMetric"
},
{
"$ref": "#/$defs/ExperimentRetentionMetric"
}
],
"title": "ExperimentMetric"
}Mean metric
Average of a numeric property per user. Use for revenue per user, session
duration, page views per user, and similar magnitudes. Drives the math via the
source.math / source.math_property pair on a single EventsNode,
ActionsNode, or ExperimentDataWarehouseNode.
Right
{
"kind": "ExperimentMetric",
"metric_type": "mean",
"name": "Average revenue per user",
"source": {
"kind": "EventsNode",
"event": "purchase_completed",
"math": "sum",
"math_property": "revenue"
}
}Funnel metric
Conversion rate from exposure through one or more ordered actions. The
experiment's exposure event is automatically prepended as step_0, so even a
single entry in series creates a valid 2-step funnel (exposure → action).
Right — single-step funnel (exposure → action)
{
"kind": "ExperimentMetric",
"metric_type": "funnel",
"name": "Reached checkout",
"series": [{ "kind": "EventsNode", "event": "checkout_started" }]
}Measures "% of exposed users who reached checkout".
Right — multi-step funnel (exposure → action 1 → action 2 → ...)
{
"kind": "ExperimentMetric",
"metric_type": "funnel",
"name": "Checkout conversion",
"series": [
{ "kind": "EventsNode", "event": "add_to_cart" },
{ "kind": "EventsNode", "event": "checkout_started" },
{ "kind": "EventsNode", "event": "purchase_completed" }
]
}Step order matters — users must complete steps in sequence.
Ratio metric
Rate of one event relative to another. Each side (numerator, denominator)
is an EventsNode / ActionsNode / ExperimentDataWarehouseNode with its own
math and math_property — the math determines how each side is aggregated
before the ratio is taken.
Use for revenue per pageview, click-through rate, error rate, engagement ratios.
Right — click-through rate (count / count)
{
"kind": "ExperimentMetric",
"metric_type": "ratio",
"name": "Click-through rate",
"numerator": {
"kind": "EventsNode",
"event": "button_clicked"
},
"denominator": {
"kind": "EventsNode",
"event": "$pageview"
}
}Right — revenue per pageview (sum of property / count)
To divide a property sum by an event count, the numerator's math is "sum"
and math_property names the numeric property to sum. The denominator stays
at the default count.
{
"kind": "ExperimentMetric",
"metric_type": "ratio",
"name": "Revenue per pageview",
"numerator": {
"kind": "EventsNode",
"event": "purchase_completed",
"math": "sum",
"math_property": "revenue"
},
"denominator": {
"kind": "EventsNode",
"event": "$pageview"
}
}Wrong — is_set filter instead of math / math_property
{
"kind": "ExperimentMetric",
"metric_type": "ratio",
"name": "Revenue per pageview",
"numerator": {
"kind": "EventsNode",
"event": "purchase_completed",
"properties": [
{ "key": "revenue", "value": "is_set", "operator": "is_set", "type": "event" }
]
},
"denominator": { "kind": "EventsNode", "event": "$pageview" }
}A property filter scopes which events count — it does not sum them. The
numerator above counts purchases that have a revenue property, not the revenue
total. Aggregation lives in math / math_property, never in a filter.
Retention metric
Whether users return after initial exposure. Tracks start_event →
completion_event over a window defined by retention_window_start,
retention_window_end, and retention_window_unit. start_handling is
required and controls how users with multiple start events are anchored:
"first_seen" (anchor on first occurrence) or "last_seen" (anchor on most
recent).
The window is measured from the start event and bucketed by
retention_window_unit, which is "day" or "hour". The start occurrence never
counts as its own completion — only a distinct later event does — so the start
and completion events may be the same:
Different events (e.g.
$pageview→uploaded_file) — conversion retention: "did the user reach the target action within the window?"Same event (e.g.
nav_panel_clicked→nav_panel_clicked) — repeat retention: "did the user fire it again within the window?"From 0counts a repeat from the same period onward (same-day/same-hour repeats count);From N(N ≥ 1) requires the repeat in a later period. Usestart_handling: "first_seen"so in-experiment repeats fall after the anchor —last_seenanchors on the user's final occurrence, which has no in-experiment activity after it.
Right — conversion retention (different events)
{
"kind": "ExperimentMetric",
"metric_type": "retention",
"name": "7-day file-upload retention",
"start_event": {
"kind": "EventsNode",
"event": "$pageview"
},
"completion_event": {
"kind": "EventsNode",
"event": "uploaded_file"
},
"retention_window_start": 0,
"retention_window_end": 7,
"retention_window_unit": "day",
"start_handling": "first_seen"
}Right — repeat retention (same event)
{
"kind": "ExperimentMetric",
"metric_type": "retention",
"name": "7-day repeat-click retention",
"start_event": {
"kind": "EventsNode",
"event": "nav_panel_clicked"
},
"completion_event": {
"kind": "EventsNode",
"event": "nav_panel_clicked"
},
"retention_window_start": 0,
"retention_window_end": 7,
"retention_window_unit": "day",
"start_handling": "first_seen"
}Measures "of users who clicked the promoted product, how many clicked it again within 7 days". The first click anchors the window and never counts as its own completion — only a later distinct click does, so a one-time clicker is correctly counted as not retained.
Wrong — missing retention_window_start and start_handling
{
"kind": "ExperimentMetric",
"metric_type": "retention",
"name": "7-day retention",
"start_event": { "kind": "EventsNode", "event": "$pageview" },
"completion_event": { "kind": "EventsNode", "event": "uploaded_file" },
"retention_window_end": 7,
"retention_window_unit": "day"
}Pydantic rejects the payload with a missing-field error. Both fields are required on every retention metric — the schema is the source of truth.
Adding metrics to an experiment
A metric reaches an experiment via one of two independent experiment-update
fields. Attaching a shared metric does not touch the inline metrics array,
and vice versa.
Inline metric — metrics
Call experiment-update with the full metrics array. This replaces the
entire inline list.
To add a metric without losing existing ones:
Call
experiment-getto get current metricsAppend the new metric to the existing array
Call
experiment-updatewith the combined array
Shared (saved) metric — saved_metrics_ids
Reuse a metric that already exists in the project instead of duplicating it
inline. Resolve the id with experiment-saved-metrics-list, then attach it:
Call
experiment-saved-metrics-listto find the metric and itsid(pass asearchterm to resolve by name; results are paginated, so uselimit/offsetwhen browsing a large project)Call
experiment-getto read the experiment's currentsaved_metricsCall
experiment-updatewithsaved_metrics_ids— this replaces all existing saved-metric links, so send the full desired set:
{
"saved_metrics_ids": [
{ "id": 42, "metadata": { "type": "primary" } },
{ "id": 57, "metadata": { "type": "secondary" } }
]
}The id here is the saved-metric id. Note the read/write asymmetry when you
rebuild the set from experiment-get: each entry in the returned saved_metrics
exposes a top-level id (the link row) and a separate saved_metric (the
metric id). Map each existing entry's saved_metric into the id you
resend — sending the link id attaches the wrong metric or fails validation.
metadata is optional and defaults to primary. Pass an empty array to detach
all shared metrics.
To promote a one-off inline metric into a reusable shared metric:
Call
experiment-saved-metrics-createwith the inline metric'squery(theExperimentMetricobject) and leave outquery.uuid. The API assigns the shared metric a new uuid and ignores one you send.In a single
experiment-updatecall, attach the new metric throughsaved_metrics_idsas above, and resendmetrics(ormetrics_secondary) without the inline metric. If you leave the inline metric in place, the experiment measures the same thing twice.
Property filters
Any EventsNode can include property filters to narrow which events count.
Filters never change aggregation — for that, use math / math_property.
{
"kind": "EventsNode",
"event": "purchase_completed",
"properties": [
{
"key": "plan",
"value": ["pro", "enterprise"],
"operator": "exact",
"type": "event"
}
]
}Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- PostHog
- Publisher
- PostHog (Official)
- Source
- PostHog/skills · skills/omnibus/configuring-experiment-analytics · commit a5d30e7
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by PostHog or PostHog.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download configuring-experiment-analytics.zip