Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(web-analytics): add agent analytics query runner (#88040)

Jordan Mryyan6d4edf09bda5
diff --git a/frontend/src/queries/schema.json b/frontend/src/queries/schema.json
index ecbcd696cf5f..11a02908bb44 100644
--- a/frontend/src/queries/schema.json
+++ b/frontend/src/queries/schema.json
@@ -1597,6 +1597,9 @@
{
"$ref": "#/definitions/WebBotsTableQuery"
},
+ {
+ "$ref": "#/definitions/WebAgentAnalyticsQuery"
+ },
{
"$ref": "#/definitions/WebGoalsQuery"
},
@@ -14414,6 +14417,121 @@
],
"type": "object"
},
+ "CachedWebAgentAnalyticsQueryResponse": {
+ "additionalProperties": false,
+ "properties": {
+ "cache_key": {
+ "type": "string"
+ },
+ "cache_target_age": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "calculation_trigger": {
+ "description": "What triggered the calculation of the query, leave empty if user/immediate",
+ "type": "string"
+ },
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hasMore": {
+ "type": "boolean"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "is_cached": {
+ "type": "boolean"
+ },
+ "last_refresh": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "limit": {
+ "$ref": "#/definitions/integer"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "next_allowed_client_refresh": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "offset": {
+ "$ref": "#/definitions/integer"
+ },
+ "query_metadata": {
+ "type": "object"
+ },
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
+ },
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
+ },
+ "results": {
+ "items": {},
+ "type": "array"
+ },
+ "timezone": {
+ "type": "string"
+ },
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "types": {
+ "items": {},
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
+ "items": {
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
+ },
+ "type": "array"
+ },
+ "warnings": {
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "required": [
+ "cache_key",
+ "is_cached",
+ "last_refresh",
+ "next_allowed_client_refresh",
+ "results",
+ "timezone"
+ ],
+ "type": "object"
+ },
"CachedWebBotsTableQueryResponse": {
"additionalProperties": false,
"properties": {
@@ -36888,6 +37006,7 @@
"WebStatsTableQuery",
"WebExternalClicksTableQuery",
"WebBotsTableQuery",
+ "WebAgentAnalyticsQuery",
"WebGoalsQuery",
"WebVitalsQuery",
"WebVitalsPathBreakdownQuery",
@@ -40848,6 +40967,86 @@
"required": ["results"],
"type": "object"
},
+ {
+ "additionalProperties": false,
+ "properties": {
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hasMore": {
+ "type": "boolean"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "limit": {
+ "$ref": "#/definitions/integer"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "offset": {
+ "$ref": "#/definitions/integer"
+ },
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
+ },
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
+ },
+ "results": {
+ "items": {},
+ "type": "array"
+ },
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "types": {
+ "items": {},
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
+ "items": {
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
+ },
+ "type": "array"
+ },
+ "warnings": {
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "required": ["results"],
+ "type": "object"
+ },
{
"additionalProperties": false,
"properties": {
@@ -47044,6 +47243,9 @@
{
"$ref": "#/definitions/WebBotsTableQuery"
},
+ {
+ "$ref": "#/definitions/WebAgentAnalyticsQuery"
+ },
{
"$ref": "#/definitions/WebGoalsQuery"
},
@@ -54046,6 +54248,219 @@
},
"type": "object"
},
+ "WebAgentAnalyticsQuery": {
+ "additionalProperties": false,
+ "description": "Agent traffic summaries and readiness diagnostics derived from web request events.",
+ "properties": {
+ "aggregation_group_type_index": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/integer"
+ },
+ {
+ "type": "null"
+ }
+ ],
+ "description": "Groups aggregation - not used in Web Analytics but required for type compatibility"
+ },
+ "compareFilter": {
+ "$ref": "#/definitions/CompareFilter"
+ },
+ "contentGrouping": {
+ "$ref": "#/definitions/WebAgentContentGrouping"
+ },
+ "conversionGoal": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/WebAnalyticsConversionGoal"
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "dataColorTheme": {
+ "description": "Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility",
+ "type": ["number", "null"]
+ },
+ "dateRange": {
+ "$ref": "#/definitions/DateRange"
+ },
+ "doPathCleaning": {
+ "type": "boolean"
+ },
+ "filterTestAccounts": {
+ "type": "boolean"
+ },
+ "includeCrawlers": {
+ "type": "boolean"
+ },
+ "includeRevenue": {
+ "deprecated": "ignored, always treated as disabled",
+ "type": "boolean"
+ },
+ "intentKey": {
+ "type": "string"
+ },
+ "interval": {
+ "$ref": "#/definitions/IntervalType",
+ "description": "Interval for date range calculation (affects date_to rounding for hour vs day ranges)"
+ },
+ "journeyKey": {
+ "description": "Opaque journey identifier returned by the journeys list, used to load one journey's timeline.",
+ "type": "string"
+ },
+ "kind": {
+ "const": "WebAgentAnalyticsQuery",
+ "type": "string"
+ },
+ "limit": {
+ "$ref": "#/definitions/integer"
+ },
+ "llmsTxtUrl": {
+ "type": "string"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "offset": {
+ "$ref": "#/definitions/integer"
+ },
+ "orderBy": {
+ "$ref": "#/definitions/WebAnalyticsOrderBy"
+ },
+ "properties": {
+ "$ref": "#/definitions/WebAnalyticsPropertyFilters"
+ },
+ "queryType": {
+ "$ref": "#/definitions/WebAgentAnalyticsQueryType"
+ },
+ "response": {
+ "$ref": "#/definitions/WebAgentAnalyticsQueryResponse"
+ },
+ "sampling": {
+ "$ref": "#/definitions/WebAnalyticsSampling",
+ "deprecated": "Use samplingFactor instead"
+ },
+ "samplingFactor": {
+ "description": "Sampling rate",
+ "type": ["number", "null"]
+ },
+ "tags": {
+ "$ref": "#/definitions/QueryLogTags"
+ },
+ "useSessionsTable": {
+ "deprecated": "ignored, always treated as enabled *",
+ "type": "boolean"
+ },
+ "version": {
+ "description": "version of the node, used for schema migrations",
+ "type": "number"
+ }
+ },
+ "required": ["kind", "properties", "queryType"],
+ "type": "object"
+ },
+ "WebAgentAnalyticsQueryResponse": {
+ "additionalProperties": false,
+ "properties": {
+ "columns": {
+ "items": {},
+ "type": "array"
+ },
+ "error": {
+ "description": "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise.",
+ "type": "string"
+ },
+ "hasMore": {
+ "type": "boolean"
+ },
+ "hogql": {
+ "description": "Generated HogQL query.",
+ "type": "string"
+ },
+ "limit": {
+ "$ref": "#/definitions/integer"
+ },
+ "modifiers": {
+ "$ref": "#/definitions/HogQLQueryModifiers",
+ "description": "Modifiers used when performing the query"
+ },
+ "offset": {
+ "$ref": "#/definitions/integer"
+ },
+ "query_status": {
+ "$ref": "#/definitions/QueryStatus",
+ "description": "Query status indicates whether next to the provided data, a query is still running."
+ },
+ "resolved_compare_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The resolved previous/comparison period date range, when comparing against another period"
+ },
+ "resolved_date_range": {
+ "$ref": "#/definitions/ResolvedDateRangeResponse",
+ "description": "The date range used for the query"
+ },
+ "results": {
+ "items": {},
+ "type": "array"
+ },
+ "timings": {
+ "description": "Measured timings for different parts of the query generation process",
+ "items": {
+ "$ref": "#/definitions/QueryTiming"
+ },
+ "type": "array"
+ },
+ "types": {
+ "items": {},
+ "type": "array"
+ },
+ "used_data_warehouse_sources": {
+ "description": "Connector-synced data warehouse sources referenced by this query, if any.",
+ "items": {
+ "$ref": "#/definitions/DataWarehouseSourceUsage"
+ },
+ "type": "array"
+ },
+ "warnings": {
+ "description": "Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access.",
+ "items": {
+ "anyOf": [
+ {
+ "$ref": "#/definitions/DataWarehouseSyncWarning"
+ },
+ {
+ "$ref": "#/definitions/AccessControlFilterWarning"
+ }
+ ]
+ },
+ "type": "array"
+ }
+ },
+ "required": ["results"],
+ "type": "object"
+ },
+ "WebAgentAnalyticsQueryType": {
+ "enum": [
+ "overview",
+ "issues",
+ "page_requests",
+ "transitions",
+ "demand",
+ "issue_variants",
+ "request_anatomy",
+ "journey_summary",
+ "journeys",
+ "journey_detail"
+ ],
+ "type": "string"
+ },
+ "WebAgentContentGrouping": {
+ "enum": ["exact", "normalized"],
+ "type": "string"
+ },
"WebAnalyticsAssistantFilters": {
"additionalProperties": false,
"properties": {
diff --git a/frontend/src/queries/schema/schema-general.ts b/frontend/src/queries/schema/schema-general.ts
index 09c24b74840e..103f5296f612 100644
--- a/frontend/src/queries/schema/schema-general.ts
+++ b/frontend/src/queries/schema/schema-general.ts
@@ -141,6 +141,7 @@ export enum NodeKind {
WebStatsTableQuery = 'WebStatsTableQuery',
WebExternalClicksTableQuery = 'WebExternalClicksTableQuery',
WebBotsTableQuery = 'WebBotsTableQuery',
+ WebAgentAnalyticsQuery = 'WebAgentAnalyticsQuery',
WebGoalsQuery = 'WebGoalsQuery',
WebVitalsQuery = 'WebVitalsQuery',
WebVitalsPathBreakdownQuery = 'WebVitalsPathBreakdownQuery',
@@ -241,6 +242,7 @@ export type AnyDataNode =
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
@@ -332,6 +334,7 @@ export type QuerySchema =
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
@@ -3711,6 +3714,48 @@ export interface WebBotsTableQueryResponse extends AnalyticsQueryResponseBase {
}
export type CachedWebBotsTableQueryResponse = CachedQueryResponse<WebBotsTableQueryResponse>
+export enum WebAgentAnalyticsQueryType {
+ Overview = 'overview',
+ Issues = 'issues',
+ PageRequests = 'page_requests',
+ Transitions = 'transitions',
+ Demand = 'demand',
+ IssueVariants = 'issue_variants',
+ RequestAnatomy = 'request_anatomy',
+ JourneySummary = 'journey_summary',
+ Journeys = 'journeys',
+ JourneyDetail = 'journey_detail',
+}
+
+export enum WebAgentContentGrouping {
+ Exact = 'exact',
+ Normalized = 'normalized',
+}
+
+/** Agent traffic summaries and readiness diagnostics derived from web request events. */
+export interface WebAgentAnalyticsQuery extends WebAnalyticsQueryBase<WebAgentAnalyticsQueryResponse> {
+ kind: NodeKind.WebAgentAnalyticsQuery
+ queryType: WebAgentAnalyticsQueryType
+ includeCrawlers?: boolean
+ contentGrouping?: WebAgentContentGrouping
+ llmsTxtUrl?: string
+ limit?: integer
+ offset?: integer
+ intentKey?: string
+ /** Opaque journey identifier returned by the journeys list, used to load one journey's timeline. */
+ journeyKey?: string
+}
+export interface WebAgentAnalyticsQueryResponse extends AnalyticsQueryResponseBase {
+ results: unknown[]
+ types?: unknown[]
+ columns?: unknown[]
+ hogql?: string
+ hasMore?: boolean
+ limit?: integer
+ offset?: integer
+}
+export type CachedWebAgentAnalyticsQueryResponse = CachedQueryResponse<WebAgentAnalyticsQueryResponse>
+
export interface WebGoalsQuery extends WebAnalyticsQueryBase<WebGoalsQueryResponse> {
kind: NodeKind.WebGoalsQuery
limit?: integer
diff --git a/frontend/src/scenes/saved-insights/insightTypesMetadata.tsx b/frontend/src/scenes/saved-insights/insightTypesMetadata.tsx
index 50c03d806585..0d41c3f98dbf 100644
--- a/frontend/src/scenes/saved-insights/insightTypesMetadata.tsx
+++ b/frontend/src/scenes/saved-insights/insightTypesMetadata.tsx
@@ -309,6 +309,12 @@ export const QUERY_TYPES_METADATA: Record<NodeKind, InsightTypeMetadata> = {
icon: IconPieChart,
inMenu: true,
},
+ [NodeKind.WebAgentAnalyticsQuery]: {
+ name: 'Agent analytics',
+ description: 'View AI agent demand, request failures, and content readiness.',
+ icon: IconPieChart,
+ inMenu: false,
+ },
[NodeKind.WebVitalsQuery]: {
name: 'Web vitals',
description: 'View web vitals.',
diff --git a/posthog/clickhouse/query_tagging.py b/posthog/clickhouse/query_tagging.py
index f5372d370bbc..1decbf98a31a 100644
--- a/posthog/clickhouse/query_tagging.py
+++ b/posthog/clickhouse/query_tagging.py
@@ -205,6 +205,7 @@ def kind_fallback_tags(kind: NodeKind) -> FallbackTags | None:
| NodeKind.WEB_GOALS_QUERY
| NodeKind.WEB_EXTERNAL_CLICKS_TABLE_QUERY
| NodeKind.WEB_BOTS_TABLE_QUERY
+ | NodeKind.WEB_AGENT_ANALYTICS_QUERY
| NodeKind.WEB_PAGE_URL_SEARCH_QUERY
| NodeKind.WEB_VITALS_QUERY
| NodeKind.WEB_VITALS_PATH_BREAKDOWN_QUERY
diff --git a/posthog/hogql_queries/query_runner.py b/posthog/hogql_queries/query_runner.py
index 09a733842f5f..893a5c6edc16 100644
--- a/posthog/hogql_queries/query_runner.py
+++ b/posthog/hogql_queries/query_runner.py
@@ -91,6 +91,7 @@ from posthog.schema import (
TrendsQuery,
UsageMetricsQuery,
VectorSearchQuery,
+ WebAgentAnalyticsQuery,
WebGoalsQuery,
WebNotableChangesQuery,
WebOverviewQuery,
@@ -876,6 +877,18 @@ def get_query_runner(
user=user,
)
+ if kind == "WebAgentAnalyticsQuery":
+ from products.web_analytics.backend.hogql_queries.web_agent_analytics import WebAgentAnalyticsQueryRunner
+
+ return WebAgentAnalyticsQueryRunner(
+ query=cast(WebAgentAnalyticsQuery | dict[str, Any], query),
+ team=team,
+ timings=timings,
+ modifiers=modifiers,
+ limit_context=limit_context,
+ user=user,
+ )
+
if kind == "WebVitalsPathBreakdownQuery":
from products.web_analytics.backend.hogql_queries.web_vitals_path_breakdown import (
WebVitalsPathBreakdownQueryRunner,
diff --git a/posthog/schema.py b/posthog/schema.py
index d714c8570ab5..9fba270a1936 100644
--- a/posthog/schema.py
+++ b/posthog/schema.py
@@ -279,6 +279,8 @@ from posthog.schema_enums import (
UsageMetricFormat as UsageMetricFormat,
UserProductListReason as UserProductListReason,
ValueDisplay as ValueDisplay,
+ WebAgentAnalyticsQueryType as WebAgentAnalyticsQueryType,
+ WebAgentContentGrouping as WebAgentContentGrouping,
WebAnalyticsItemKind as WebAnalyticsItemKind,
WebAnalyticsOrderByDirection as WebAnalyticsOrderByDirection,
WebAnalyticsOrderByFields as WebAnalyticsOrderByFields,
@@ -2460,7 +2462,7 @@ class QueryResponseAlternative7(BaseModel):
stdout: str | None = None
-class QueryResponseAlternative78(BaseModel):
+class QueryResponseAlternative79(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -6376,7 +6378,7 @@ class QueryResponseAlternative20(BaseModel):
)
-class QueryResponseAlternative29(BaseModel):
+class QueryResponseAlternative30(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -6385,7 +6387,7 @@ class QueryResponseAlternative29(BaseModel):
status: ExternalQueryStatus
-class QueryResponseAlternative85(BaseModel):
+class QueryResponseAlternative86(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -8240,6 +8242,58 @@ class UserProductListItem(BaseModel):
updated_at: str
+class WebAgentAnalyticsQueryResponse(BaseModel):
+ model_config = ConfigDict(
+ extra="forbid",
+ )
+ columns: list | None = None
+ error: str | None = Field(
+ default=None,
+ description=(
+ "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise."
+ ),
+ )
+ hasMore: bool | None = None
+ hogql: str | None = Field(default=None, description="Generated HogQL query.")
+ limit: int | None = None
+ modifiers: HogQLQueryModifiers | None = Field(default=None, description="Modifiers used when performing the query")
+ offset: int | None = None
+ query_status: QueryStatus | None = Field(
+ default=None,
+ description=("Query status indicates whether next to the provided data, a query is still running."),
+ )
+ resolved_compare_date_range: ResolvedDateRangeResponse | None = Field(
+ default=None,
+ description=("The resolved previous/comparison period date range, when comparing against another period"),
+ )
+ resolved_date_range: ResolvedDateRangeResponse | None = Field(
+ default=None, description="The date range used for the query"
+ )
+ results: list
+ timings: list[QueryTiming] | None = Field(
+ default=None,
+ description=("Measured timings for different parts of the query generation process"),
+ )
+ types: list | None = None
+ used_data_warehouse_sources: list[DataWarehouseSourceUsage] | None = Field(
+ default=None,
+ description=("Connector-synced data warehouse sources referenced by this query, if any."),
+ )
+ warnings: list[DataWarehouseSyncWarning | AccessControlFilterWarning] | None = Field(
+ default=None,
+ description=(
+ "Warnings about data warehouse sources referenced by the query whose"
+ " latest sync failed, is paused, hit a billing limit, or is otherwise"
+ " stale. Results may not reflect current source data. Accumulated"
+ " across every HogQL execution that contributes to this response — so"
+ " insights backed by warehouse tables (Trends, Funnels, etc.) receive"
+ " the same warnings as raw HogQL queries. Also carries access control"
+ " warnings when a system-table query filters out objects the user can't"
+ " access."
+ ),
+ )
+
+
class WebAnalyticsExternalSummaryQueryResponse(BaseModel):
model_config = ConfigDict(
extra="forbid",
@@ -14394,6 +14448,69 @@ class CachedVectorSearchQueryResponse(BaseModel):
)
+class CachedWebAgentAnalyticsQueryResponse(BaseModel):
+ model_config = ConfigDict(
+ extra="forbid",
+ )
+ cache_key: str
+ cache_target_age: AwareDatetime | None = None
+ calculation_trigger: str | None = Field(
+ default=None,
+ description=("What triggered the calculation of the query, leave empty if user/immediate"),
+ )
+ columns: list | None = None
+ error: str | None = Field(
+ default=None,
+ description=(
+ "Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise."
+ ),
+ )
+ hasMore: bool | None = None
+ hogql: str | None = Field(default=None, description="Generated HogQL query.")
+ is_cached: bool
+ last_refresh: AwareDatetime
+ limit: int | None = None
+ modifiers: HogQLQueryModifiers | None = Field(default=None, description="Modifiers used when performing the query")
+ next_allowed_client_refresh: AwareDatetime
+ offset: int | None = None
+ query_metadata: dict[str, Any] | None = None
+ query_status: QueryStatus | None = Field(
+ default=None,
+ description=("Query status indicates whether next to the provided data, a query is still running."),
+ )
+ resolved_compare_date_range: ResolvedDateRangeResponse | None = Field(
+ default=None,
+ description=("The resolved previous/comparison period date range, when comparing against another period"),
+ )
+ resolved_date_range: ResolvedDateRangeResponse | None = Field(
+ default=None, description="The date range used for the query"
+ )
+ results: list
+ timezone: str
+ timings: list[QueryTiming] | None = Field(
+ default=None,
+ description=("Measured timings for different parts of the query generation process"),
+ )
+ types: list | None = None
+ used_data_warehouse_sources: list[DataWarehouseSourceUsage] | None = Field(
+ default=None,
+ description=("Connector-synced data warehouse sources referenced by this query, if any."),
+ )
+ warnings: list[DataWarehouseSyncWarning | AccessControlFilterWarning] | None = Field(
+ default=None,
+ description=(
+ "Warnings about data warehouse sources referenced by the query whose"
+ " latest sync failed, is paused, hit a billing limit, or is otherwise"
+ " stale. Results may not reflect current source data. Accumulated"
+ " across every HogQL execution that contributes to this response — so"
+ " insights backed by warehouse tables (Trends, Funnels, etc.) receive"
+ " the same warnings as raw HogQL queries. Also carries access control"
+ " warnings when a system-table query filters out objects the user can't"
+ " access."
+ ),
+ )
+
+
class CachedWebBotsTableQueryResponse(BaseModel):
model_config = ConfigDict(
extra="forbid",
@@ -19320,7 +19437,7 @@ class QueryResponseAlternative25(BaseModel):
)
-class QueryResponseAlternative26(BaseModel):
+class QueryResponseAlternative27(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19374,7 +19491,7 @@ class QueryResponseAlternative26(BaseModel):
)
-class QueryResponseAlternative27(BaseModel):
+class QueryResponseAlternative28(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19422,7 +19539,7 @@ class QueryResponseAlternative27(BaseModel):
)
-class QueryResponseAlternative28(BaseModel):
+class QueryResponseAlternative29(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19472,7 +19589,7 @@ class QueryResponseAlternative28(BaseModel):
)
-class QueryResponseAlternative30(BaseModel):
+class QueryResponseAlternative31(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19521,7 +19638,7 @@ class QueryResponseAlternative30(BaseModel):
)
-class QueryResponseAlternative31(BaseModel):
+class QueryResponseAlternative32(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19574,7 +19691,7 @@ class QueryResponseAlternative31(BaseModel):
)
-class QueryResponseAlternative32(BaseModel):
+class QueryResponseAlternative33(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19622,7 +19739,7 @@ class QueryResponseAlternative32(BaseModel):
)
-class QueryResponseAlternative33(BaseModel):
+class QueryResponseAlternative34(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19692,7 +19809,7 @@ class QueryResponseAlternative33(BaseModel):
)
-class QueryResponseAlternative34(BaseModel):
+class QueryResponseAlternative35(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19756,7 +19873,7 @@ class QueryResponseAlternative34(BaseModel):
)
-class QueryResponseAlternative35(BaseModel):
+class QueryResponseAlternative36(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19809,7 +19926,7 @@ class QueryResponseAlternative35(BaseModel):
)
-class QueryResponseAlternative36(BaseModel):
+class QueryResponseAlternative37(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19862,7 +19979,7 @@ class QueryResponseAlternative36(BaseModel):
)
-class QueryResponseAlternative37(BaseModel):
+class QueryResponseAlternative38(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19915,7 +20032,7 @@ class QueryResponseAlternative37(BaseModel):
)
-class QueryResponseAlternative38(BaseModel):
+class QueryResponseAlternative39(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -19968,7 +20085,7 @@ class QueryResponseAlternative38(BaseModel):
)
-class QueryResponseAlternative39(BaseModel):
+class QueryResponseAlternative40(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20021,7 +20138,7 @@ class QueryResponseAlternative39(BaseModel):
)
-class QueryResponseAlternative40(BaseModel):
+class QueryResponseAlternative41(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20072,7 +20189,7 @@ class QueryResponseAlternative40(BaseModel):
)
-class QueryResponseAlternative41(BaseModel):
+class QueryResponseAlternative42(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20133,7 +20250,7 @@ class QueryResponseAlternative41(BaseModel):
)
-class QueryResponseAlternative42(BaseModel):
+class QueryResponseAlternative43(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20186,7 +20303,7 @@ class QueryResponseAlternative42(BaseModel):
)
-class QueryResponseAlternative43(BaseModel):
+class QueryResponseAlternative44(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20238,7 +20355,7 @@ class QueryResponseAlternative43(BaseModel):
)
-class QueryResponseAlternative44(BaseModel):
+class QueryResponseAlternative45(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20292,7 +20409,7 @@ class QueryResponseAlternative44(BaseModel):
)
-class QueryResponseAlternative45(BaseModel):
+class QueryResponseAlternative46(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20340,7 +20457,7 @@ class QueryResponseAlternative45(BaseModel):
)
-class QueryResponseAlternative46(BaseModel):
+class QueryResponseAlternative47(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20392,7 +20509,7 @@ class QueryResponseAlternative46(BaseModel):
)
-class QueryResponseAlternative47(BaseModel):
+class QueryResponseAlternative48(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20444,7 +20561,7 @@ class QueryResponseAlternative47(BaseModel):
)
-class QueryResponseAlternative48(BaseModel):
+class QueryResponseAlternative49(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20497,7 +20614,7 @@ class QueryResponseAlternative48(BaseModel):
)
-class QueryResponseAlternative49(BaseModel):
+class QueryResponseAlternative50(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20545,7 +20662,7 @@ class QueryResponseAlternative49(BaseModel):
)
-class QueryResponseAlternative50(BaseModel):
+class QueryResponseAlternative51(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20598,7 +20715,7 @@ class QueryResponseAlternative50(BaseModel):
)
-class QueryResponseAlternative51(BaseModel):
+class QueryResponseAlternative52(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20649,7 +20766,7 @@ class QueryResponseAlternative51(BaseModel):
)
-class QueryResponseAlternative55(BaseModel):
+class QueryResponseAlternative56(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20700,7 +20817,7 @@ class QueryResponseAlternative55(BaseModel):
)
-class QueryResponseAlternative57(BaseModel):
+class QueryResponseAlternative58(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20752,7 +20869,7 @@ class QueryResponseAlternative57(BaseModel):
)
-class QueryResponseAlternative58(BaseModel):
+class QueryResponseAlternative59(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20809,7 +20926,7 @@ class QueryResponseAlternative58(BaseModel):
)
-class QueryResponseAlternative59(BaseModel):
+class QueryResponseAlternative60(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20864,7 +20981,7 @@ class QueryResponseAlternative59(BaseModel):
)
-class QueryResponseAlternative60(BaseModel):
+class QueryResponseAlternative61(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20913,7 +21030,7 @@ class QueryResponseAlternative60(BaseModel):
)
-class QueryResponseAlternative61(BaseModel):
+class QueryResponseAlternative62(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -20967,7 +21084,7 @@ class QueryResponseAlternative61(BaseModel):
)
-class QueryResponseAlternative62(BaseModel):
+class QueryResponseAlternative63(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21014,7 +21131,7 @@ class QueryResponseAlternative62(BaseModel):
)
-class QueryResponseAlternative63(BaseModel):
+class QueryResponseAlternative64(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21061,7 +21178,7 @@ class QueryResponseAlternative63(BaseModel):
)
-class QueryResponseAlternative64(BaseModel):
+class QueryResponseAlternative65(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21108,7 +21225,7 @@ class QueryResponseAlternative64(BaseModel):
)
-class QueryResponseAlternative65(BaseModel):
+class QueryResponseAlternative66(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21155,7 +21272,7 @@ class QueryResponseAlternative65(BaseModel):
)
-class QueryResponseAlternative67(BaseModel):
+class QueryResponseAlternative68(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21207,7 +21324,7 @@ class QueryResponseAlternative67(BaseModel):
)
-class QueryResponseAlternative69(BaseModel):
+class QueryResponseAlternative70(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21259,7 +21376,7 @@ class QueryResponseAlternative69(BaseModel):
)
-class QueryResponseAlternative70(BaseModel):
+class QueryResponseAlternative71(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21311,7 +21428,7 @@ class QueryResponseAlternative70(BaseModel):
)
-class QueryResponseAlternative71(BaseModel):
+class QueryResponseAlternative72(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21359,7 +21476,7 @@ class QueryResponseAlternative71(BaseModel):
)
-class QueryResponseAlternative72(BaseModel):
+class QueryResponseAlternative73(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21406,7 +21523,7 @@ class QueryResponseAlternative72(BaseModel):
)
-class QueryResponseAlternative73(BaseModel):
+class QueryResponseAlternative74(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21453,7 +21570,7 @@ class QueryResponseAlternative73(BaseModel):
)
-class QueryResponseAlternative74(BaseModel):
+class QueryResponseAlternative75(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21504,7 +21621,7 @@ class QueryResponseAlternative74(BaseModel):
)
-class QueryResponseAlternative75(BaseModel):
+class QueryResponseAlternative76(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21555,7 +21672,7 @@ class QueryResponseAlternative75(BaseModel):
)
-class QueryResponseAlternative76(BaseModel):
+class QueryResponseAlternative77(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21606,7 +21723,7 @@ class QueryResponseAlternative76(BaseModel):
)
-class QueryResponseAlternative77(BaseModel):
+class QueryResponseAlternative78(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21657,7 +21774,7 @@ class QueryResponseAlternative77(BaseModel):
)
-class QueryResponseAlternative79(BaseModel):
+class QueryResponseAlternative80(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21707,7 +21824,7 @@ class QueryResponseAlternative79(BaseModel):
)
-class QueryResponseAlternative80(BaseModel):
+class QueryResponseAlternative81(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21757,7 +21874,7 @@ class QueryResponseAlternative80(BaseModel):
)
-class QueryResponseAlternative81(BaseModel):
+class QueryResponseAlternative82(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21804,7 +21921,7 @@ class QueryResponseAlternative81(BaseModel):
)
-class QueryResponseAlternative82(BaseModel):
+class QueryResponseAlternative83(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21855,7 +21972,7 @@ class QueryResponseAlternative82(BaseModel):
)
-class QueryResponseAlternative86(BaseModel):
+class QueryResponseAlternative87(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21902,7 +22019,7 @@ class QueryResponseAlternative86(BaseModel):
)
-class QueryResponseAlternative87(BaseModel):
+class QueryResponseAlternative88(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -21949,7 +22066,7 @@ class QueryResponseAlternative87(BaseModel):
)
-class QueryResponseAlternative88(BaseModel):
+class QueryResponseAlternative89(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22006,7 +22123,7 @@ class QueryResponseAlternative88(BaseModel):
)
-class QueryResponseAlternative89(BaseModel):
+class QueryResponseAlternative90(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22061,7 +22178,7 @@ class QueryResponseAlternative89(BaseModel):
)
-class QueryResponseAlternative90(BaseModel):
+class QueryResponseAlternative91(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22108,7 +22225,7 @@ class QueryResponseAlternative90(BaseModel):
)
-class QueryResponseAlternative91(BaseModel):
+class QueryResponseAlternative92(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22160,7 +22277,7 @@ class QueryResponseAlternative91(BaseModel):
)
-class QueryResponseAlternative92(BaseModel):
+class QueryResponseAlternative93(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22207,7 +22324,7 @@ class QueryResponseAlternative92(BaseModel):
)
-class QueryResponseAlternative93(BaseModel):
+class QueryResponseAlternative94(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22254,7 +22371,7 @@ class QueryResponseAlternative93(BaseModel):
)
-class QueryResponseAlternative94(BaseModel):
+class QueryResponseAlternative95(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22301,7 +22418,7 @@ class QueryResponseAlternative94(BaseModel):
)
-class QueryResponseAlternative95(BaseModel):
+class QueryResponseAlternative96(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22348,7 +22465,7 @@ class QueryResponseAlternative95(BaseModel):
)
-class QueryResponseAlternative96(BaseModel):
+class QueryResponseAlternative97(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22395,7 +22512,7 @@ class QueryResponseAlternative96(BaseModel):
)
-class QueryResponseAlternative97(BaseModel):
+class QueryResponseAlternative98(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22442,7 +22559,7 @@ class QueryResponseAlternative97(BaseModel):
)
-class QueryResponseAlternative98(BaseModel):
+class QueryResponseAlternative99(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22489,7 +22606,7 @@ class QueryResponseAlternative98(BaseModel):
)
-class QueryResponseAlternative99(BaseModel):
+class QueryResponseAlternative100(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22539,7 +22656,7 @@ class QueryResponseAlternative99(BaseModel):
)
-class QueryResponseAlternative100(BaseModel):
+class QueryResponseAlternative101(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22586,7 +22703,7 @@ class QueryResponseAlternative100(BaseModel):
)
-class QueryResponseAlternative101(BaseModel):
+class QueryResponseAlternative102(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22633,7 +22750,7 @@ class QueryResponseAlternative101(BaseModel):
)
-class QueryResponseAlternative102(BaseModel):
+class QueryResponseAlternative103(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22680,7 +22797,7 @@ class QueryResponseAlternative102(BaseModel):
)
-class QueryResponseAlternative103(BaseModel):
+class QueryResponseAlternative104(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22727,7 +22844,7 @@ class QueryResponseAlternative103(BaseModel):
)
-class QueryResponseAlternative104(BaseModel):
+class QueryResponseAlternative105(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22774,7 +22891,7 @@ class QueryResponseAlternative104(BaseModel):
)
-class QueryResponseAlternative105(BaseModel):
+class QueryResponseAlternative106(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22821,7 +22938,7 @@ class QueryResponseAlternative105(BaseModel):
)
-class QueryResponseAlternative106(BaseModel):
+class QueryResponseAlternative107(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22868,7 +22985,7 @@ class QueryResponseAlternative106(BaseModel):
)
-class QueryResponseAlternative107(BaseModel):
+class QueryResponseAlternative108(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22915,7 +23032,7 @@ class QueryResponseAlternative107(BaseModel):
)
-class QueryResponseAlternative108(BaseModel):
+class QueryResponseAlternative109(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -22962,7 +23079,7 @@ class QueryResponseAlternative108(BaseModel):
)
-class QueryResponseAlternative109(BaseModel):
+class QueryResponseAlternative110(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -23357,6 +23474,53 @@ class VectorSearchQueryResponse(BaseModel):
)
+class WebAgentAnalyticsQuery(BaseModel):
+ model_config = ConfigDict(
+ extra="forbid",
+ )
+ aggregation_group_type_index: int | None = Field(
+ default=None,
+ description=("Groups aggregation - not used in Web Analytics but required for type compatibility"),
+ )
+ compareFilter: CompareFilter | None = None
+ contentGrouping: WebAgentContentGrouping | None = None
+ conversionGoal: ActionConversionGoal | CustomEventConversionGoal | None = None
+ dataColorTheme: float | None = Field(
+ default=None,
+ description=(
+ "Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility"
+ ),
+ )
+ dateRange: DateRange | None = None
+ doPathCleaning: bool | None = None
+ filterTestAccounts: bool | None = None
+ includeCrawlers: bool | None = None
+ includeRevenue: bool | None = None
+ intentKey: str | None = None
+ interval: IntervalType | None = Field(
+ default=None,
+ description=("Interval for date range calculation (affects date_to rounding for hour vs day ranges)"),
+ )
+ journeyKey: str | None = Field(
+ default=None,
+ description=("Opaque journey identifier returned by the journeys list, used to load one journey's timeline."),
+ )
+ kind: Literal["WebAgentAnalyticsQuery"] = "WebAgentAnalyticsQuery"
+ limit: int | None = None
+ llmsTxtUrl: str | None = None
+ modifiers: HogQLQueryModifiers | None = Field(default=None, description="Modifiers used when performing the query")
+ offset: int | None = None
+ orderBy: list[WebAnalyticsOrderByFields | WebAnalyticsOrderByDirection] | None = None
+ properties: list[EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter]
+ queryType: WebAgentAnalyticsQueryType
+ response: WebAgentAnalyticsQueryResponse | None = None
+ sampling: WebAnalyticsSampling | None = None
+ samplingFactor: float | None = Field(default=None, description="Sampling rate")
+ tags: QueryLogTags | None = None
+ useSessionsTable: bool | None = None
+ version: float | None = Field(default=None, description="version of the node, used for schema migrations")
+
+
class WebAnalyticsAssistantFilters(BaseModel):
model_config = ConfigDict(
extra="forbid",
@@ -28008,7 +28172,7 @@ class PathsV2Query(BaseModel):
version: float | None = Field(default=None, description="version of the node, used for schema migrations")
-class QueryResponseAlternative68(BaseModel):
+class QueryResponseAlternative69(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -28867,7 +29031,7 @@ class QueryResponseAlternative18(BaseModel):
)
-class QueryResponseAlternative53(BaseModel):
+class QueryResponseAlternative54(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -28887,7 +29051,7 @@ class QueryResponseAlternative53(BaseModel):
)
-class QueryResponseAlternative54(BaseModel):
+class QueryResponseAlternative55(BaseModel):
model_config = ConfigDict(
extra="forbid",
)
@@ -28936,7 +29100,6 @@ class QueryResponseAlternative(
| QueryResponseAlternative23
| QueryResponseAlternative24
| QueryResponseAlternative25
- | QueryResponseAlternative26
| QueryResponseAlternative27
| QueryResponseAlternative28
| QueryResponseAlternative29
@@ -28946,8 +29109,8 @@ class QueryResponseAlternative(
| QueryResponseAlternative33
| QueryResponseAlternative34
| QueryResponseAlternative35
- | Any
| QueryResponseAlternative36
+ | Any
| QueryResponseAlternative37
| QueryResponseAlternative38
| QueryResponseAlternative39
@@ -28963,10 +29126,10 @@ class QueryResponseAlternative(
| QueryResponseAlternative49
| QueryResponseAlternative50
| QueryResponseAlternative51
- | QueryResponseAlternative53
+ | QueryResponseAlternative52
| QueryResponseAlternative54
| QueryResponseAlternative55
- | QueryResponseAlternative57
+ | QueryResponseAlternative56
| QueryResponseAlternative58
| QueryResponseAlternative59
| QueryResponseAlternative60
@@ -28975,7 +29138,7 @@ class QueryResponseAlternative(
| QueryResponseAlternative63
| QueryResponseAlternative64
| QueryResponseAlternative65
- | QueryResponseAlternative67
+ | QueryResponseAlternative66
| QueryResponseAlternative68
| QueryResponseAlternative69
| QueryResponseAlternative70
@@ -28991,7 +29154,7 @@ class QueryResponseAlternative(
| QueryResponseAlternative80
| QueryResponseAlternative81
| QueryResponseAlternative82
- | QueryResponseAlternative85
+ | QueryResponseAlternative83
| QueryResponseAlternative86
| QueryResponseAlternative87
| QueryResponseAlternative88
@@ -29016,6 +29179,7 @@ class QueryResponseAlternative(
| QueryResponseAlternative107
| QueryResponseAlternative108
| QueryResponseAlternative109
+ | QueryResponseAlternative110
]
):
root: (
@@ -29045,7 +29209,6 @@ class QueryResponseAlternative(
| QueryResponseAlternative23
| QueryResponseAlternative24
| QueryResponseAlternative25
- | QueryResponseAlternative26
| QueryResponseAlternative27
| QueryResponseAlternative28
| QueryResponseAlternative29
@@ -29055,8 +29218,8 @@ class QueryResponseAlternative(
| QueryResponseAlternative33
| QueryResponseAlternative34
| QueryResponseAlternative35
- | Any
| QueryResponseAlternative36
+ | Any
| QueryResponseAlternative37
| QueryResponseAlternative38
| QueryResponseAlternative39
@@ -29072,10 +29235,10 @@ class QueryResponseAlternative(
| QueryResponseAlternative49
| QueryResponseAlternative50
| QueryResponseAlternative51
- | QueryResponseAlternative53
+ | QueryResponseAlternative52
| QueryResponseAlternative54
| QueryResponseAlternative55
- | QueryResponseAlternative57
+ | QueryResponseAlternative56
| QueryResponseAlternative58
| QueryResponseAlternative59
| QueryResponseAlternative60
@@ -29084,7 +29247,7 @@ class QueryResponseAlternative(
| QueryResponseAlternative63
| QueryResponseAlternative64
| QueryResponseAlternative65
- | QueryResponseAlternative67
+ | QueryResponseAlternative66
| QueryResponseAlternative68
| QueryResponseAlternative69
| QueryResponseAlternative70
@@ -29100,7 +29263,7 @@ class QueryResponseAlternative(
| QueryResponseAlternative80
| QueryResponseAlternative81
| QueryResponseAlternative82
- | QueryResponseAlternative85
+ | QueryResponseAlternative83
| QueryResponseAlternative86
| QueryResponseAlternative87
| QueryResponseAlternative88
@@ -29125,6 +29288,7 @@ class QueryResponseAlternative(
| QueryResponseAlternative107
| QueryResponseAlternative108
| QueryResponseAlternative109
+ | QueryResponseAlternative110
)
@@ -30047,6 +30211,7 @@ class HogQLAutocomplete(BaseModel):
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
@@ -30161,6 +30326,7 @@ class HogQLMetadata(BaseModel):
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
@@ -30290,6 +30456,7 @@ class MaxInsightContext(BaseModel):
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
@@ -30428,6 +30595,7 @@ class QueryRequest(BaseModel):
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
@@ -30558,6 +30726,7 @@ class QuerySchemaRoot(
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
@@ -30658,6 +30827,7 @@ class QuerySchemaRoot(
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
@@ -30763,6 +30933,7 @@ class QueryUpgradeRequest(BaseModel):
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
@@ -30868,6 +31039,7 @@ class QueryUpgradeResponse(BaseModel):
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
@@ -31159,6 +31331,7 @@ class VisualizationArtifactContent(BaseModel):
| WebStatsTableQuery
| WebExternalClicksTableQuery
| WebBotsTableQuery
+ | WebAgentAnalyticsQuery
| WebGoalsQuery
| WebVitalsQuery
| WebVitalsPathBreakdownQuery
diff --git a/posthog/schema_enums.py b/posthog/schema_enums.py
index cb6933e6a6f6..96bade40db28 100644
--- a/posthog/schema_enums.py
+++ b/posthog/schema_enums.py
@@ -3349,6 +3349,7 @@ class NodeKind(StrEnum):
WEB_STATS_TABLE_QUERY = "WebStatsTableQuery"
WEB_EXTERNAL_CLICKS_TABLE_QUERY = "WebExternalClicksTableQuery"
WEB_BOTS_TABLE_QUERY = "WebBotsTableQuery"
+ WEB_AGENT_ANALYTICS_QUERY = "WebAgentAnalyticsQuery"
WEB_GOALS_QUERY = "WebGoalsQuery"
WEB_VITALS_QUERY = "WebVitalsQuery"
WEB_VITALS_PATH_BREAKDOWN_QUERY = "WebVitalsPathBreakdownQuery"
@@ -4146,6 +4147,24 @@ class UserProductListReason(StrEnum):
ONBOARDING_DELEGATED = "onboarding_delegated"
+class WebAgentAnalyticsQueryType(StrEnum):
+ OVERVIEW = "overview"
+ ISSUES = "issues"
+ PAGE_REQUESTS = "page_requests"
+ TRANSITIONS = "transitions"
+ DEMAND = "demand"
+ ISSUE_VARIANTS = "issue_variants"
+ REQUEST_ANATOMY = "request_anatomy"
+ JOURNEY_SUMMARY = "journey_summary"
+ JOURNEYS = "journeys"
+ JOURNEY_DETAIL = "journey_detail"
+
+
+class WebAgentContentGrouping(StrEnum):
+ EXACT = "exact"
+ NORMALIZED = "normalized"
+
+
class WebAnalyticsItemKind(StrEnum):
UNIT = "unit"
DURATION_S = "duration_s"
diff --git a/products/web_analytics/backend/hogql_queries/agent_analytics_definitions.py b/products/web_analytics/backend/hogql_queries/agent_analytics_definitions.py
new file mode 100644
index 000000000000..f4e65b6cb294
--- /dev/null
+++ b/products/web_analytics/backend/hogql_queries/agent_analytics_definitions.py
@@ -0,0 +1,73 @@
+from posthog.hogql import ast
+from posthog.hogql.parser import parse_expr
+
+from products.web_analytics.backend.hogql_queries.web_bots import BOT_ANALYTICS_EVENTS
+
+AGENT_HTTP_EVENT = "$http_log"
+AGENT_NAVIGATION_EVENTS = ("$pageview", "$screen")
+AGENT_EVENTS = BOT_ANALYTICS_EVENTS
+
+AGENT_CATEGORIES = ("ai_assistant", "ai_search")
+AGENT_CATEGORIES_WITH_CRAWLERS = (*AGENT_CATEGORIES, "ai_crawler")
+
+NAVIGATION_WINDOW_SECONDS = 30 * 60
+INACTIVITY_WINDOW_SECONDS = 30 * 60
+CONVERSION_WINDOW_SECONDS = 24 * 60 * 60
+DEFAULT_RESULT_LIMIT = 100
+MAX_JOURNEY_STEPS = 200
+
+
+def static_asset_expr() -> ast.Expr:
+ return parse_expr(
+ r"""
+match(properties.$pathname, '(?i)(\\.(ico|png|jpe?g|gif|svg|webp|css|js|map)$|\\.woff|/apple-touch-icon)')
+ OR properties.$pathname IN ('/robots.txt', '/sitemap.xml')
+"""
+ )
+
+
+def malformed_path_expr() -> ast.Expr:
+ return parse_expr(
+ """
+properties.$pathname ILIKE '%/null/%'
+ OR properties.$pathname ILIKE '%/undefined/%'
+ OR endsWith(properties.$pathname, '/null')
+ OR endsWith(properties.$pathname, '/undefined')
+"""
+ )
+
+
+def normalized_path_expr() -> ast.Expr:
+ return parse_expr(
+ r"""
+replaceRegexpAll(
+ replaceRegexpAll(
+ replaceRegexpAll(properties.$pathname, '\\.(md|html?|json|txt|xml|ya?ml)$', ''),
+ '[-/]v?[0-9]+\\.[0-9]+(\\.[0-9]+)?',
+ ''
+ ),
+ '/+$',
+ ''
+)
+"""
+ )
+
+
+def markdown_path_expr() -> ast.Expr:
+ return parse_expr("properties.$pathname ILIKE '%.md'")
+
+
+def page_identity_expr() -> ast.Expr:
+ return parse_expr(
+ r"concat(coalesce(properties.$host, ''), replaceRegexpAll(properties.$pathname, '(?i)\\.md$', ''))"
+ )
+
+
+def referrer_expr() -> ast.Expr:
+ return parse_expr(
+ "coalesce(nullIf(toString(properties.$referrer), ''), nullIf(toString(properties.proxy_referer), ''), '')"
+ )
+
+
+def response_status_code_expr() -> ast.Expr:
+ return parse_expr("toInt(coalesce(nullIf(toString(properties.proxy_status_code), ''), '0'))")
diff --git a/products/web_analytics/backend/hogql_queries/test/test_web_agent_analytics.py b/products/web_analytics/backend/hogql_queries/test/test_web_agent_analytics.py
new file mode 100644
index 000000000000..696032eee859
--- /dev/null
+++ b/products/web_analytics/backend/hogql_queries/test/test_web_agent_analytics.py
@@ -0,0 +1,435 @@
+from freezegun import freeze_time
+from posthog.test.base import APIBaseTest, ClickhouseTestMixin, _create_event, _create_person, flush_persons_and_events
+
+from posthog.schema import (
+ ActionConversionGoal,
+ CustomEventConversionGoal,
+ DateRange,
+ EventPropertyFilter,
+ PropertyOperator,
+ WebAgentAnalyticsQuery,
+ WebAgentAnalyticsQueryResponse,
+ WebAgentAnalyticsQueryType,
+ WebAgentContentGrouping,
+)
+
+from posthog.hogql.context import HogQLContext
+from posthog.hogql.printer import prepare_and_print_ast
+
+from products.web_analytics.backend.hogql_queries.web_agent_analytics import WebAgentAnalyticsQueryRunner
+
+ASSISTANT_USER_AGENT = "Mozilla/5.0 (compatible; ChatGPT-User/1.0; +https://openai.com/bot)"
+CRAWLER_USER_AGENT = "Mozilla/5.0 (compatible; GPTBot/1.2; +https://openai.com/gptbot)"
+HUMAN_USER_AGENT = "Mozilla/5.0 AppleWebKit/537.36 Chrome/126.0.0.0 Safari/537.36"
+
+
+class TestWebAgentAnalyticsQueryRunner(ClickhouseTestMixin, APIBaseTest):
+ def _create_http_event(
+ self,
+ distinct_id: str,
+ pathname: str,
+ status_code: int,
+ *,
+ user_agent: str = ASSISTANT_USER_AGENT,
+ timestamp: str = "2026-08-10T12:00:00Z",
+ host: str = "example.com",
+ referrer: str | None = None,
+ ) -> None:
+ properties: dict[str, object | None] = {
+ "$host": host,
+ "$pathname": pathname,
+ "$raw_user_agent": user_agent,
+ "proxy_status_code": status_code,
+ }
+ if referrer is not None:
+ properties["proxy_referer"] = referrer
+ _create_event(
+ team=self.team,
+ event="$http_log",
+ distinct_id=distinct_id,
+ timestamp=timestamp,
+ properties=properties,
+ )
+
+ def _run(
+ self,
+ query_type: WebAgentAnalyticsQueryType,
+ *,
+ include_crawlers: bool = False,
+ conversion_goal: ActionConversionGoal | CustomEventConversionGoal | None = None,
+ content_grouping: WebAgentContentGrouping = WebAgentContentGrouping.NORMALIZED,
+ properties: list[EventPropertyFilter] | None = None,
+ llms_txt_url: str | None = None,
+ journey_key: str | None = None,
+ intent_key: str | None = None,
+ limit: int = 100,
+ date_from: str = "2026-08-01",
+ ) -> WebAgentAnalyticsQueryResponse:
+ query = WebAgentAnalyticsQuery(
+ queryType=query_type,
+ dateRange=DateRange(date_from=date_from, date_to="2026-08-20"),
+ includeCrawlers=include_crawlers,
+ contentGrouping=content_grouping,
+ conversionGoal=conversion_goal,
+ properties=properties or [],
+ llmsTxtUrl=llms_txt_url,
+ journeyKey=journey_key,
+ intentKey=intent_key,
+ limit=limit,
+ )
+ with freeze_time("2026-08-20T18:00:00Z"):
+ return WebAgentAnalyticsQueryRunner(team=self.team, query=query).calculate()
+
+ @staticmethod
+ def _first_row(response: WebAgentAnalyticsQueryResponse) -> dict[str, object]:
+ assert response.columns is not None
+ assert response.results
+ return dict(zip(response.columns, response.results[0], strict=True))
+
+ @staticmethod
+ def _rows(response: WebAgentAnalyticsQueryResponse) -> list[dict[str, object]]:
+ assert response.columns is not None
+ return [dict(zip(response.columns, row, strict=True)) for row in response.results]
+
+ def test_overview_excludes_humans_assets_and_unpaired_markdown_fetches(self) -> None:
+ for distinct_id in ("paired", "markdown-only", "human", "crawler"):
+ _create_person(team_id=self.team.pk, distinct_ids=[distinct_id], properties={})
+
+ self._create_http_event("paired", "/docs/start", 200)
+ self._create_http_event("paired", "/docs/start.md", 200)
+ self._create_http_event("markdown-only", "/docs/other.md", 200)
+ self._create_http_event("paired", "/logo.svg", 200)
+ self._create_http_event("human", "/docs/start", 200, user_agent=HUMAN_USER_AGENT)
+ self._create_http_event("crawler", "/docs/start", 200, user_agent=CRAWLER_USER_AGENT)
+ self._create_http_event("paired", "/docs/old", 404, timestamp="2026-07-20T12:00:00Z")
+ flush_persons_and_events()
+
+ default_row = self._first_row(self._run(WebAgentAnalyticsQueryType.OVERVIEW))
+ crawler_row = self._first_row(self._run(WebAgentAnalyticsQueryType.OVERVIEW, include_crawlers=True))
+
+ self.assertEqual(default_row["active_clients"], 2)
+ self.assertEqual(default_row["server_requests"], 3)
+ self.assertEqual(default_row["client_navigations"], 0)
+ self.assertEqual(default_row["excluded_requests"], 1)
+ self.assertEqual(default_row["wasted"], 1)
+ self.assertEqual(default_row["waste_pages"], 1)
+ self.assertEqual(crawler_row["active_clients"], 3)
+ self.assertEqual(crawler_row["server_requests"], 4)
+
+ def test_overview_counts_agents_that_reach_the_conversion_goal_inside_the_window(self) -> None:
+ for distinct_id in ("converted-agent", "agent-only", "human-only", "wrong-order", "expired"):
+ _create_person(team_id=self.team.pk, distinct_ids=[distinct_id], properties={})
+
+ self._create_http_event("converted-agent", "/docs/start", 200)
+ self._create_http_event("agent-only", "/docs/start", 200)
+ self._create_http_event("wrong-order", "/docs/start", 200, timestamp="2026-08-10T12:10:00Z")
+ self._create_http_event("expired", "/docs/start", 200, timestamp="2026-08-10T00:00:00Z")
+ for distinct_id, timestamp in (
+ ("converted-agent", "2026-08-10T12:05:00Z"),
+ ("human-only", "2026-08-10T12:05:00Z"),
+ ("wrong-order", "2026-08-10T12:05:00Z"),
+ ("expired", "2026-08-11T01:00:00Z"),
+ ):
+ _create_event(
+ team=self.team,
+ event="completed_signup",
+ distinct_id=distinct_id,
+ timestamp=timestamp,
+ properties={},
+ )
+ flush_persons_and_events()
+
+ row = self._first_row(
+ self._run(
+ WebAgentAnalyticsQueryType.OVERVIEW,
+ conversion_goal=CustomEventConversionGoal(customEventName="completed_signup"),
+ )
+ )
+
+ self.assertEqual(row["converted_agents"], 1)
+
+ def test_issues_group_normalized_variants_and_exclude_noise(self) -> None:
+ for distinct_id in ("assistant", "human"):
+ _create_person(team_id=self.team.pk, distinct_ids=[distinct_id], properties={})
+
+ self._create_http_event("assistant", "/docs/sdk-2.4.1.md", 404)
+ self._create_http_event("assistant", "/docs/sdk-3.0.0.html", 404)
+ self._create_http_event("assistant", "/Docs/SDK-4.0.0", 404)
+ self._create_http_event("assistant", "/missing.svg", 404)
+ self._create_http_event("human", "/docs/sdk-4.0.0", 404, user_agent=HUMAN_USER_AGENT)
+ flush_persons_and_events()
+
+ rows = self._rows(self._run(WebAgentAnalyticsQueryType.ISSUES))
+
+ self.assertEqual(len(rows), 2)
+ self.assertEqual(rows[0]["intent_key"], "example.com/docs/sdk")
+ self.assertEqual(rows[0]["demand"], 2)
+ self.assertEqual(rows[0]["variants"], 2)
+ self.assertEqual(rows[1]["intent_key"], "example.com/Docs/SDK")
+
+ def test_issue_variants_return_only_exact_paths_for_the_selected_intent(self) -> None:
+ _create_person(team_id=self.team.pk, distinct_ids=["assistant"], properties={})
+ self._create_http_event("assistant", "/docs/sdk-2.4.1.md", 404)
+ self._create_http_event("assistant", "/docs/sdk-2.4.1.md", 404)
+ self._create_http_event("assistant", "/docs/sdk-3.0.0.html", 404)
+ self._create_http_event("assistant", "/Docs/SDK-4.0.0", 404)
+ flush_persons_and_events()
+
+ rows = self._rows(self._run(WebAgentAnalyticsQueryType.ISSUE_VARIANTS, intent_key="example.com/docs/sdk"))
+
+ self.assertEqual(
+ {row["variant"]: row["demand"] for row in rows},
+ {"/docs/sdk-2.4.1.md": 2, "/docs/sdk-3.0.0.html": 1},
+ )
+
+ def test_demand_counts_successful_agent_requests_per_exact_page(self) -> None:
+ for distinct_id in ("assistant", "human"):
+ _create_person(team_id=self.team.pk, distinct_ids=[distinct_id], properties={})
+
+ self._create_http_event("assistant", "/docs/start", 200)
+ self._create_http_event("assistant", "/docs/start", 200)
+ self._create_http_event("assistant", "/docs/other", 200)
+ self._create_http_event("assistant", "/docs/missing", 404)
+ self._create_http_event("assistant", "/logo.svg", 200)
+ self._create_http_event("human", "/docs/start", 200, user_agent=HUMAN_USER_AGENT)
+ flush_persons_and_events()
+
+ rows = self._rows(self._run(WebAgentAnalyticsQueryType.DEMAND))
+
+ self.assertEqual(len(rows), 2)
+ self.assertEqual(
+ rows[0], {"page": "example.com/docs/start", "host": "example.com", "path": "/docs/start", "demand": 2}
+ )
+ self.assertEqual(rows[1]["page"], "example.com/docs/other")
+ self.assertEqual(rows[1]["demand"], 1)
+
+ def test_server_requests_and_client_navigations_are_counted_separately(self) -> None:
+ _create_person(team_id=self.team.pk, distinct_ids=["assistant"], properties={})
+ self._create_http_event("assistant", "/docs/start", 200)
+ _create_event(
+ team=self.team,
+ event="$pageview",
+ distinct_id="assistant",
+ timestamp="2026-08-10T12:00:01Z",
+ properties={
+ "$host": "example.com",
+ "$pathname": "/docs/start",
+ "$raw_user_agent": ASSISTANT_USER_AGENT,
+ },
+ )
+ flush_persons_and_events()
+
+ row = self._first_row(self._run(WebAgentAnalyticsQueryType.OVERVIEW))
+
+ self.assertEqual(row["active_clients"], 1)
+ self.assertEqual(row["server_requests"], 1)
+ self.assertEqual(row["client_navigations"], 1)
+
+ def test_shared_property_filters_apply_to_agent_tables(self) -> None:
+ _create_person(team_id=self.team.pk, distinct_ids=["assistant"], properties={})
+ self._create_http_event("assistant", "/included", 200, host="docs.example.com")
+ self._create_http_event("assistant", "/excluded", 200, host="other.example.com")
+ flush_persons_and_events()
+
+ response = self._run(
+ WebAgentAnalyticsQueryType.PAGE_REQUESTS,
+ properties=[EventPropertyFilter(key="$host", value="docs.example.com", operator=PropertyOperator.EXACT)],
+ )
+
+ self.assertEqual(len(response.results), 1)
+ self.assertEqual(response.results[0][0], "docs.example.com/included")
+
+ def test_transitions_require_the_loaded_source_page_host_and_time_window(self) -> None:
+ for distinct_id in ("valid", "late", "wrong-host", "cross-domain"):
+ _create_person(team_id=self.team.pk, distinct_ids=[distinct_id], properties={})
+
+ self._create_http_event("valid", "/ai/llms.txt", 200, host="docs.example.com")
+ self._create_http_event(
+ "valid", "/guides/start", 200, host="docs.example.com", timestamp="2026-08-10T12:05:00Z"
+ )
+ self._create_http_event("late", "/ai/llms.txt", 200, host="docs.example.com")
+ self._create_http_event("late", "/guides/late", 200, host="docs.example.com", timestamp="2026-08-10T13:00:00Z")
+ self._create_http_event("wrong-host", "/ai/llms.txt", 200, host="other.example.com")
+ self._create_http_event(
+ "wrong-host", "/guides/wrong-host", 200, host="other.example.com", timestamp="2026-08-10T12:05:00Z"
+ )
+ self._create_http_event("cross-domain", "/ai/llms.txt", 200, host="docs.example.com")
+ self._create_http_event(
+ "cross-domain", "/guides/cross-domain", 200, host="other.example.com", timestamp="2026-08-10T12:05:00Z"
+ )
+ flush_persons_and_events()
+
+ response = self._run(
+ WebAgentAnalyticsQueryType.TRANSITIONS, llms_txt_url="https://docs.example.com/ai/llms.txt"
+ )
+
+ self.assertEqual(response.results, [["/guides/start", 1, 0]])
+
+ def test_result_limit_reports_more_rows_without_silently_dropping_the_signal(self) -> None:
+ _create_person(team_id=self.team.pk, distinct_ids=["assistant"], properties={})
+ self._create_http_event("assistant", "/one", 404)
+ self._create_http_event("assistant", "/two", 404)
+ flush_persons_and_events()
+
+ response = self._run(WebAgentAnalyticsQueryType.ISSUES, limit=1)
+
+ self.assertEqual(len(response.results), 1)
+ self.assertTrue(response.hasMore)
+ self.assertEqual(response.limit, 1)
+
+ def test_page_requests_counts_format_mix_per_client(self) -> None:
+ for distinct_id in ("paired", "html-only", "markdown-only"):
+ _create_person(team_id=self.team.pk, distinct_ids=[distinct_id], properties={})
+
+ self._create_http_event("paired", "/docs/start", 200)
+ self._create_http_event("paired", "/docs/start.md", 200)
+ self._create_http_event("html-only", "/docs/start", 200)
+ self._create_http_event("markdown-only", "/docs/other.md", 200)
+ flush_persons_and_events()
+
+ rows = self._rows(self._run(WebAgentAnalyticsQueryType.PAGE_REQUESTS))
+
+ self.assertEqual(
+ rows[0],
+ {
+ "page": "example.com/docs/start",
+ "fetches": 3,
+ "md_fetches": 1,
+ "html_fetches": 2,
+ "paired_clients": 1,
+ },
+ )
+
+ def test_journeys_split_on_inactivity_and_keep_hosts_separate(self) -> None:
+ _create_person(team_id=self.team.pk, distinct_ids=["wanderer"], properties={})
+
+ self._create_http_event("wanderer", "/p1", 200, timestamp="2026-08-10T12:00:00Z")
+ self._create_http_event("wanderer", "/p2", 200, timestamp="2026-08-10T12:05:00Z")
+ self._create_http_event("wanderer", "/p3", 200, timestamp="2026-08-10T13:00:00Z")
+ self._create_http_event("wanderer", "/q1", 200, host="other.com", timestamp="2026-08-10T12:02:00Z")
+ flush_persons_and_events()
+
+ journeys = self._rows(self._run(WebAgentAnalyticsQueryType.JOURNEYS))
+ summary = self._first_row(self._run(WebAgentAnalyticsQueryType.JOURNEY_SUMMARY))
+
+ self.assertEqual(len(journeys), 3)
+ self.assertEqual(summary["total_journeys"], 3)
+ self.assertEqual(sorted(str(row["host"]) for row in journeys), ["example.com", "example.com", "other.com"])
+ example_requests = sorted(
+ (int(str(row["requests"])) for row in journeys if row["host"] == "example.com"), reverse=True
+ )
+ self.assertEqual(example_requests, [2, 1])
+
+ def test_journey_keys_are_opaque_and_survive_a_widened_date_range(self) -> None:
+ _create_person(team_id=self.team.pk, distinct_ids=["wanderer"], properties={})
+ self._create_http_event("wanderer", "/early", 200, timestamp="2026-08-02T09:00:00Z")
+ self._create_http_event("wanderer", "/late", 200, timestamp="2026-08-10T12:00:00Z")
+ flush_persons_and_events()
+
+ narrow = self._rows(self._run(WebAgentAnalyticsQueryType.JOURNEYS, date_from="2026-08-05"))
+ wide = self._rows(self._run(WebAgentAnalyticsQueryType.JOURNEYS, date_from="2026-08-01"))
+
+ self.assertEqual(len(narrow), 1)
+ self.assertEqual(len(wide), 2)
+ late_key = narrow[0]["journey_key"]
+ self.assertIn(late_key, [row["journey_key"] for row in wide])
+ for row in wide:
+ key = str(row["journey_key"])
+ self.assertNotIn("wanderer", key)
+ self.assertNotIn("example.com", key)
+
+ detail = self._rows(
+ self._run(
+ WebAgentAnalyticsQueryType.JOURNEY_DETAIL,
+ journey_key=str(late_key),
+ date_from="2026-08-01",
+ )
+ )
+ self.assertEqual([row["path"] for row in detail], ["/late"])
+
+ def test_journey_detail_labels_transitions_by_the_strongest_available_signal(self) -> None:
+ _create_person(team_id=self.team.pk, distinct_ids=["reader"], properties={})
+ self._create_http_event("reader", "/docs", 200, timestamp="2026-08-10T12:00:00Z")
+ self._create_http_event(
+ "reader",
+ "/guide",
+ 200,
+ referrer="https://example.com/docs",
+ timestamp="2026-08-10T12:00:10Z",
+ )
+ self._create_http_event("reader", "/pricing", 200, timestamp="2026-08-10T12:00:20Z")
+ flush_persons_and_events()
+
+ journeys = self._rows(self._run(WebAgentAnalyticsQueryType.JOURNEYS))
+ self.assertEqual(len(journeys), 1)
+ detail = self._rows(
+ self._run(WebAgentAnalyticsQueryType.JOURNEY_DETAIL, journey_key=str(journeys[0]["journey_key"]))
+ )
+
+ self.assertEqual([row["path"] for row in detail], ["/docs", "/guide", "/pricing"])
+ self.assertEqual([row["transition"] for row in detail], ["start", "confirmed", "sequential"])
+
+ limited_detail = self._rows(
+ self._run(
+ WebAgentAnalyticsQueryType.JOURNEY_DETAIL,
+ journey_key=str(journeys[0]["journey_key"]),
+ limit=2,
+ )
+ )
+ self.assertEqual([row["path"] for row in limited_detail], ["/docs", "/guide"])
+
+ def test_journey_detail_marks_same_timestamp_requests_as_parallel(self) -> None:
+ _create_person(team_id=self.team.pk, distinct_ids=["reader"], properties={})
+ self._create_http_event("reader", "/x", 200, timestamp="2026-08-10T12:00:00Z")
+ self._create_http_event("reader", "/y", 200, timestamp="2026-08-10T12:00:00Z")
+ flush_persons_and_events()
+
+ journeys = self._rows(self._run(WebAgentAnalyticsQueryType.JOURNEYS))
+ detail = self._rows(
+ self._run(WebAgentAnalyticsQueryType.JOURNEY_DETAIL, journey_key=str(journeys[0]["journey_key"]))
+ )
+
+ self.assertEqual(len(detail), 2)
+ self.assertEqual(sorted(str(row["transition"]) for row in detail), ["parallel", "start"])
+
+ def test_request_anatomy_aggregates_format_retries_and_errors_per_agent(self) -> None:
+ _create_person(team_id=self.team.pk, distinct_ids=["client"], properties={})
+ self._create_http_event("client", "/docs", 200, timestamp="2026-08-10T12:00:00Z")
+ self._create_http_event("client", "/docs.md", 200, timestamp="2026-08-10T12:00:05Z")
+ self._create_http_event("client", "/missing", 404, timestamp="2026-08-10T12:00:10Z")
+ self._create_http_event("client", "/before.md", 200, timestamp="2026-08-10T12:00:15Z")
+ self._create_http_event("client", "/before", 200, timestamp="2026-08-10T12:00:20Z")
+ flush_persons_and_events()
+
+ rows = self._rows(self._run(WebAgentAnalyticsQueryType.REQUEST_ANATOMY))
+
+ self.assertEqual(len(rows), 1)
+ self.assertEqual(rows[0]["requests"], 5)
+ self.assertEqual(rows[0]["requested_markdown"], 2)
+ self.assertEqual(rows[0]["retry_pairs"], 1)
+ self.assertEqual(rows[0]["errors"], 1)
+
+ def test_every_query_mode_compiles(self) -> None:
+ for query_type in WebAgentAnalyticsQueryType:
+ with self.subTest(query_type=query_type):
+ query = WebAgentAnalyticsQuery(
+ queryType=query_type,
+ dateRange=DateRange(date_from="2026-08-01", date_to="2026-08-20"),
+ intentKey="example.com/docs/sdk"
+ if query_type == WebAgentAnalyticsQueryType.ISSUE_VARIANTS
+ else None,
+ journeyKey="client:ChatGPT:example.com:1"
+ if query_type == WebAgentAnalyticsQueryType.JOURNEY_DETAIL
+ else None,
+ properties=[],
+ )
+ runner = WebAgentAnalyticsQueryRunner(team=self.team, query=query)
+ context = HogQLContext(
+ team=self.team,
+ team_id=self.team.pk,
+ enable_select_queries=True,
+ modifiers=runner.modifiers,
+ )
+ sql, _ = prepare_and_print_ast(runner.to_query(), context=context, dialect="clickhouse")
+
+ self.assertLess(len(sql), 1_048_576)
diff --git a/products/web_analytics/backend/hogql_queries/web_agent_analytics.py b/products/web_analytics/backend/hogql_queries/web_agent_analytics.py
new file mode 100644
index 000000000000..1f49a9402413
--- /dev/null
+++ b/products/web_analytics/backend/hogql_queries/web_agent_analytics.py
@@ -0,0 +1,677 @@
+import urllib.parse as urlparse
+
+from posthog.schema import (
+ CachedWebAgentAnalyticsQueryResponse,
+ HogQLQueryResponse,
+ WebAgentAnalyticsQuery,
+ WebAgentAnalyticsQueryResponse,
+ WebAgentAnalyticsQueryType,
+ WebAgentContentGrouping,
+)
+
+from posthog.hogql import ast
+from posthog.hogql.constants import LimitContext
+from posthog.hogql.errors import QueryError
+from posthog.hogql.parser import parse_expr, parse_select
+from posthog.hogql.query import execute_hogql_query
+
+from posthog.hogql_queries.insights.paginators import HogQLHasMorePaginator
+from posthog.models.filters.mixins.utils import cached_property
+
+from products.web_analytics.backend.hogql_queries.agent_analytics_definitions import (
+ AGENT_CATEGORIES,
+ AGENT_CATEGORIES_WITH_CRAWLERS,
+ AGENT_EVENTS,
+ AGENT_HTTP_EVENT,
+ AGENT_NAVIGATION_EVENTS,
+ CONVERSION_WINDOW_SECONDS,
+ DEFAULT_RESULT_LIMIT,
+ INACTIVITY_WINDOW_SECONDS,
+ MAX_JOURNEY_STEPS,
+ NAVIGATION_WINDOW_SECONDS,
+ malformed_path_expr,
+ markdown_path_expr,
+ normalized_path_expr,
+ page_identity_expr,
+ referrer_expr,
+ response_status_code_expr,
+ static_asset_expr,
+)
+from products.web_analytics.backend.hogql_queries.web_analytics_query_runner import WebAnalyticsQueryRunner
+
+
+def markdown_retry_pairs(*, md_times: str, html_times: str) -> str:
+ return (
+ "arrayCount("
+ "md_time -> arrayExists("
+ "html_time -> dateDiff('second', html_time, md_time) BETWEEN 0 AND {navigation_window_seconds}, "
+ f"{html_times}), "
+ f"{md_times})"
+ )
+
+
+OVERVIEW_QUERY = r"""
+SELECT
+ uniqIf(distinct_id, included_request AND {current_period}) AS active_clients,
+ uniqIf(bot_name, included_request AND bot_name != '' AND {current_period}) AS agent_families,
+ countIf(included_request AND event = {http_event} AND {current_period}) AS server_requests,
+ countIf(included_request AND event IN {navigation_events} AND {current_period}) AS client_navigations,
+ countIf(included_request AND event = {http_event} AND status > 0 AND {current_period}) AS status_observed,
+ countIf(included_request AND event = {http_event} AND status >= 400 AND status < 500 AND {current_period}) AS client_errors,
+ uniqIf(distinct_id, included_request AND {previous_period}) AS active_clients_prev,
+ countIf(included_request AND event = {http_event} AND {previous_period}) AS server_requests_prev,
+ countIf(included_request AND event IN {navigation_events} AND {previous_period}) AS client_navigations_prev,
+ countIf(included_request AND event = {http_event} AND status >= 400 AND status < 500 AND {previous_period}) AS client_errors_prev,
+ countIf(included_request AND event = {http_event} AND malformed_path AND {current_period}) AS malformed,
+ countIf(included_request AND event = {http_event} AND malformed_path AND {previous_period}) AS malformed_prev,
+ countIf(included_request AND event = {http_event} AND llms_source AND status = 200 AND {current_period}) AS llms_txt_fetches,
+ countIf(agent_scope AND event = {http_event} AND excluded_path AND {current_period}) AS excluded_requests
+FROM (
+ SELECT
+ distinct_id,
+ event,
+ timestamp,
+ `$virt_bot_name` AS bot_name,
+ {status} AS status,
+ {agent_scope} AS agent_scope,
+ {excluded_path} AS excluded_path,
+ {malformed_path} AS malformed_path,
+ {llms_source_event} AS llms_source,
+ {included_request} AS included_request
+ FROM events
+ WHERE and(event IN {agent_events}, `$virt_is_bot` = true, {periods}, {all_properties})
+)
+"""
+
+CONVERSION_GOAL_QUERY = r"""
+SELECT
+ countIf(arrayExists(
+ agent_time -> arrayExists(
+ goal_time -> dateDiff('second', agent_time, goal_time) BETWEEN 0 AND {conversion_window_seconds},
+ current_goal_times
+ ),
+ current_agent_times
+ )) AS converted_agents,
+ countIf(arrayExists(
+ agent_time -> arrayExists(
+ goal_time -> dateDiff('second', agent_time, goal_time) BETWEEN 0 AND {conversion_window_seconds},
+ previous_goal_times
+ ),
+ previous_agent_times
+ )) AS converted_agents_prev
+FROM (
+ SELECT
+ distinct_id,
+ groupArrayIf(timestamp, {agent_request} AND {current_period}) AS current_agent_times,
+ groupArrayIf(timestamp, {agent_request} AND {previous_period}) AS previous_agent_times,
+ groupArrayIf(timestamp, {conversion_goal} AND {current_period}) AS current_goal_times,
+ groupArrayIf(timestamp, {conversion_goal} AND {previous_period}) AS previous_goal_times
+ FROM events
+ WHERE and({periods}, ({agent_request} OR {conversion_goal}))
+ GROUP BY distinct_id
+)
+"""
+
+DOUBLE_FETCH_QUERY = (
+ r"""
+SELECT
+ sum(wasted_fetches) AS wasted,
+ sum(wasted_fetches_prev) AS wasted_prev,
+ uniqIf(page, wasted_fetches > 0) AS waste_pages
+FROM (
+ SELECT
+ distinct_id,
+ {page_key} AS page,
+"""
+ + markdown_retry_pairs(
+ md_times="groupArrayIf(timestamp, {is_md_hit} AND {current_period})",
+ html_times="groupArrayIf(timestamp, {is_html_hit} AND {current_period})",
+ )
+ + r""" AS wasted_fetches,
+"""
+ + markdown_retry_pairs(
+ md_times="groupArrayIf(timestamp, {is_md_hit} AND {previous_period})",
+ html_times="groupArrayIf(timestamp, {is_html_hit} AND {previous_period})",
+ )
+ + r""" AS wasted_fetches_prev
+ FROM events
+ WHERE and(
+ event = {http_event},
+ `$virt_is_bot` = true,
+ {agent_scope},
+ {included_path},
+ {periods},
+ {all_properties}
+ )
+ GROUP BY distinct_id, page
+)
+"""
+)
+
+ISSUES_QUERY = r"""
+SELECT
+ {intent_key} AS intent_key,
+ any({normalized_path}) AS intent_path,
+ countIf({current_period}) AS demand,
+ countIf({previous_period}) AS demand_prev,
+ uniqIf(properties.$pathname, {current_period}) AS variants,
+ arrayElement(topK(1)(`$virt_bot_name`), 1) AS top_agent,
+ minIf(timestamp, {current_period}) AS first_seen,
+ maxIf(timestamp, {current_period}) AS last_seen
+FROM events
+WHERE and(
+ event = {http_event},
+ `$virt_is_bot` = true,
+ {agent_scope},
+ {is_404},
+ {included_path},
+ {periods},
+ {all_properties}
+)
+GROUP BY intent_key
+ORDER BY demand DESC, intent_key
+"""
+
+PAGE_REQUESTS_QUERY = (
+ r"""
+SELECT
+ page,
+ sum(fetches) AS fetches,
+ sum(md_fetches) AS md_fetches,
+ sum(html_fetches) AS html_fetches,
+ countIf(client_paired) AS paired_clients
+FROM (
+ SELECT
+ distinct_id,
+ {page_key} AS page,
+ count() AS fetches,
+ countIf({is_md}) AS md_fetches,
+ countIf(NOT ({is_md})) AS html_fetches,
+"""
+ + markdown_retry_pairs(
+ md_times="groupArrayIf(timestamp, {is_md})",
+ html_times="groupArrayIf(timestamp, NOT ({is_md}))",
+ )
+ + r""" > 0 AS client_paired
+ FROM events
+ WHERE and(
+ event = {http_event},
+ `$virt_is_bot` = true,
+ {agent_scope},
+ {is_200},
+ {included_path},
+ {current_period},
+ {all_properties}
+ )
+ GROUP BY distinct_id, page
+)
+GROUP BY page
+ORDER BY fetches DESC, page
+"""
+)
+
+DEMAND_QUERY = r"""
+SELECT
+ concat(coalesce(properties.$host, ''), properties.$pathname) AS page,
+ coalesce(properties.$host, '') AS host,
+ properties.$pathname AS path,
+ count() AS demand
+FROM events
+WHERE and(
+ event = {http_event},
+ `$virt_is_bot` = true,
+ {agent_scope},
+ {is_200},
+ {included_path},
+ {current_period},
+ {all_properties}
+)
+GROUP BY page, host, path
+ORDER BY demand DESC, page
+"""
+
+ISSUE_VARIANTS_QUERY = r"""
+SELECT
+ properties.$pathname AS variant,
+ count() AS demand,
+ arrayElement(topK(1)(`$virt_bot_name`), 1) AS top_agent,
+ min(timestamp) AS first_seen
+FROM events
+WHERE and(
+ event = {http_event},
+ `$virt_is_bot` = true,
+ {agent_scope},
+ {is_404},
+ {included_path},
+ {intent_key} = {selected_intent_key},
+ {current_period},
+ {all_properties}
+)
+GROUP BY variant
+ORDER BY demand DESC, variant
+"""
+
+REQUEST_ANATOMY_QUERY = (
+ r"""
+SELECT
+ agent,
+ sum(page_requests) AS requests,
+ sum(page_requested_markdown) AS requested_markdown,
+ sum(page_retry_pairs) AS retry_pairs,
+ sum(page_errors) AS errors
+FROM (
+ SELECT
+ agent,
+ distinct_id,
+ page,
+ count() AS page_requests,
+ countIf(is_md) AS page_requested_markdown,
+ countIf(is_error) AS page_errors,
+"""
+ + markdown_retry_pairs(
+ md_times="groupArrayIf(timestamp, is_md)",
+ html_times="groupArrayIf(timestamp, is_200 AND NOT is_md)",
+ )
+ + r""" AS page_retry_pairs
+ FROM (
+ SELECT
+ `$virt_bot_name` AS agent,
+ distinct_id,
+ timestamp,
+ {page_key} AS page,
+ {is_md} AS is_md,
+ {is_200} AS is_200,
+ {status} >= 400 AS is_error
+ FROM events
+ WHERE and(
+ event = {http_event},
+ `$virt_is_bot` = true,
+ {agent_scope},
+ {included_path},
+ {current_period},
+ {all_properties}
+ )
+ )
+ GROUP BY agent, distinct_id, page
+)
+GROUP BY agent
+ORDER BY requests DESC, agent
+"""
+)
+
+_SESSIONIZED_EVENTS = r"""
+SELECT
+ distinct_id,
+ uuid,
+ timestamp,
+ agent,
+ host,
+ path,
+ status,
+ is_md,
+ is_error,
+ referrer,
+ toString(cityHash64(concat({journey_salt}, distinct_id, agent, host, toString(toUnixTimestamp(
+ max(journey_started) OVER (
+ PARTITION BY distinct_id, agent, host
+ ORDER BY timestamp ASC, uuid ASC
+ ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
+ )
+ ))))) AS journey_key
+FROM (
+ SELECT
+ distinct_id,
+ uuid,
+ timestamp,
+ agent,
+ host,
+ path,
+ status,
+ is_md,
+ is_error,
+ referrer,
+ if(
+ dateDiff('second', lagInFrame(timestamp, 1, toDateTime(0)) OVER (
+ PARTITION BY distinct_id, agent, host
+ ORDER BY timestamp ASC, uuid ASC
+ ROWS BETWEEN 1 PRECEDING AND CURRENT ROW
+ ), timestamp) > {inactivity_window_seconds},
+ timestamp,
+ toDateTime(0)
+ ) AS journey_started
+ FROM (
+ SELECT
+ distinct_id,
+ uuid,
+ timestamp,
+ `$virt_bot_name` AS agent,
+ coalesce(properties.$host, '') AS host,
+ properties.$pathname AS path,
+ {status} AS status,
+ {is_md} AS is_md,
+ {status} >= 400 AS is_error,
+ {referrer} AS referrer
+ FROM events
+ WHERE and(
+ event = {http_event},
+ `$virt_is_bot` = true,
+ {agent_scope},
+ {included_path},
+ {current_period},
+ {all_properties}
+ )
+ )
+)
+"""
+
+TRANSITIONS_QUERY = r"""
+SELECT next_path, count() AS requests, countIf(next_status = 404) AS not_found
+FROM (
+ SELECT
+ timestamp,
+ path,
+ leadInFrame(path) OVER agent_requests AS next_path,
+ leadInFrame(timestamp) OVER agent_requests AS next_timestamp,
+ leadInFrame(status) OVER agent_requests AS next_status,
+ {llms_source_row} AS llms_source
+ FROM (
+ SELECT
+ uuid,
+ timestamp,
+ `$virt_bot_name` AS agent,
+ coalesce(properties.$host, '') AS host,
+ properties.$pathname AS path,
+ {status} AS status,
+ distinct_id
+ FROM events
+ WHERE and(
+ event = {http_event},
+ `$virt_is_bot` = true,
+ {agent_scope},
+ {included_path},
+ {current_period},
+ {all_properties}
+ )
+ )
+ WINDOW agent_requests AS (
+ PARTITION BY distinct_id, agent, host
+ ORDER BY timestamp ASC, uuid ASC
+ ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING
+ )
+)
+WHERE and(
+ llms_source,
+ next_path != '',
+ next_path != path,
+ dateDiff('second', timestamp, next_timestamp) BETWEEN 0 AND {navigation_window_seconds}
+)
+GROUP BY next_path
+ORDER BY requests DESC, next_path
+"""
+
+JOURNEY_SUMMARY_QUERY = (
+ r"""
+SELECT
+ count() AS total_journeys,
+ round(quantile(0.5)(pages)) AS median_pages,
+ round(quantile(0.5)(requests)) AS median_requests,
+ round(quantile(0.5)(duration_seconds)) AS median_duration_seconds,
+ countIf(errors > 0) AS journeys_with_errors
+FROM (
+ SELECT
+ journey_key,
+ uniq(path) AS pages,
+ count() AS requests,
+ dateDiff('second', min(timestamp), max(timestamp)) AS duration_seconds,
+ countIf(is_error) AS errors
+ FROM (
+"""
+ + _SESSIONIZED_EVENTS
+ + r"""
+ )
+ GROUP BY journey_key
+)
+"""
+)
+
+JOURNEYS_QUERY = (
+ r"""
+SELECT
+ journey_key,
+ min(timestamp) AS started,
+ arrayElement(topK(1)(agent), 1) AS agent,
+ any(host) AS host,
+ uniq(path) AS pages,
+ count() AS requests,
+ dateDiff('second', min(timestamp), max(timestamp)) AS duration_seconds,
+ countIf(is_error) AS errors
+FROM (
+"""
+ + _SESSIONIZED_EVENTS
+ + r"""
+)
+GROUP BY journey_key
+ORDER BY started DESC, journey_key
+"""
+)
+
+JOURNEY_DETAIL_QUERY = (
+ r"""
+SELECT
+ timestamp,
+ path,
+ status,
+ if(is_md, 'markdown', 'html') AS format,
+ referrer,
+ multiIf(
+ prev_path = '', 'start',
+ timestamp = prev_timestamp, 'parallel',
+ referrer != '' AND path(referrer) = prev_path, 'confirmed',
+ 'sequential'
+ ) AS transition
+FROM (
+ SELECT
+ timestamp,
+ path,
+ status,
+ is_md,
+ referrer,
+ lagInFrame(path, 1, '') OVER journey_steps AS prev_path,
+ lagInFrame(timestamp) OVER journey_steps AS prev_timestamp
+ FROM (
+"""
+ + _SESSIONIZED_EVENTS
+ + r"""
+ )
+ WHERE journey_key = {selected_journey_key}
+ WINDOW journey_steps AS (
+ PARTITION BY journey_key
+ ORDER BY timestamp ASC, uuid ASC
+ ROWS BETWEEN 1 PRECEDING AND CURRENT ROW
+ )
+)
+ORDER BY timestamp ASC
+"""
+)
+
+QUERY_TEMPLATES = {
+ WebAgentAnalyticsQueryType.OVERVIEW: OVERVIEW_QUERY,
+ WebAgentAnalyticsQueryType.ISSUES: ISSUES_QUERY,
+ WebAgentAnalyticsQueryType.PAGE_REQUESTS: PAGE_REQUESTS_QUERY,
+ WebAgentAnalyticsQueryType.TRANSITIONS: TRANSITIONS_QUERY,
+ WebAgentAnalyticsQueryType.DEMAND: DEMAND_QUERY,
+ WebAgentAnalyticsQueryType.ISSUE_VARIANTS: ISSUE_VARIANTS_QUERY,
+ WebAgentAnalyticsQueryType.REQUEST_ANATOMY: REQUEST_ANATOMY_QUERY,
+ WebAgentAnalyticsQueryType.JOURNEY_SUMMARY: JOURNEY_SUMMARY_QUERY,
+ WebAgentAnalyticsQueryType.JOURNEYS: JOURNEYS_QUERY,
+ WebAgentAnalyticsQueryType.JOURNEY_DETAIL: JOURNEY_DETAIL_QUERY,
+}
+
+REQUIRED_ARGUMENTS = {
+ WebAgentAnalyticsQueryType.ISSUE_VARIANTS: "intentKey",
+ WebAgentAnalyticsQueryType.JOURNEY_DETAIL: "journeyKey",
+}
+
+
+class WebAgentAnalyticsQueryRunner(WebAnalyticsQueryRunner[WebAgentAnalyticsQueryResponse]):
+ query: WebAgentAnalyticsQuery
+ cached_response: CachedWebAgentAnalyticsQueryResponse
+ paginator: HogQLHasMorePaginator
+
+ def __init__(self, *args, **kwargs):
+ super().__init__(*args, **kwargs)
+ limit = self.query.limit or DEFAULT_RESULT_LIMIT
+ if self.query.queryType == WebAgentAnalyticsQueryType.JOURNEY_DETAIL:
+ limit = min(limit, MAX_JOURNEY_STEPS)
+ self.paginator = HogQLHasMorePaginator.from_limit_context(
+ limit_context=LimitContext.QUERY, limit=limit, offset=self.query.offset
+ )
+
+ def _agent_categories(self) -> ast.Tuple:
+ categories = AGENT_CATEGORIES_WITH_CRAWLERS if self.query.includeCrawlers else AGENT_CATEGORIES
+ return ast.Tuple(exprs=[ast.Constant(value=category) for category in categories])
+
+ def _llms_source_expr(self, *, host: str, path: str) -> ast.Expr:
+ parsed_url = urlparse.urlparse(self.query.llmsTxtUrl or "")
+ source_path = parsed_url.path or "/llms.txt"
+ source_host = (parsed_url.hostname or "").lower()
+ path_expr = parse_expr(
+ "{path} = {source_path}",
+ placeholders={"path": parse_expr(path), "source_path": ast.Constant(value=source_path)},
+ )
+ if not source_host:
+ return path_expr
+ return parse_expr(
+ "{path_match} AND lower(coalesce({host}, '')) = {source_host}",
+ placeholders={
+ "path_match": path_expr,
+ "host": parse_expr(host),
+ "source_host": ast.Constant(value=source_host),
+ },
+ )
+
+ @cached_property
+ def _placeholders(self) -> dict[str, ast.Expr]:
+ status = response_status_code_expr()
+ is_200 = parse_expr("{status} = 200", placeholders={"status": status})
+ is_md = markdown_path_expr()
+ excluded_path = static_asset_expr()
+ included_path = ast.Not(expr=excluded_path)
+ agent_scope = parse_expr(
+ "`$virt_traffic_category` IN {agent_categories}",
+ placeholders={"agent_categories": self._agent_categories()},
+ )
+ normalized_path = (
+ normalized_path_expr()
+ if self.query.contentGrouping != WebAgentContentGrouping.EXACT
+ else ast.Field(chain=["properties", "$pathname"])
+ )
+ agent_request = parse_expr(
+ "event IN {agent_events} AND `$virt_is_bot` = true AND {agent_scope} AND {included_path} AND {all_properties}",
+ placeholders={
+ "agent_events": ast.Tuple(exprs=[ast.Constant(value=event) for event in AGENT_EVENTS]),
+ "agent_scope": agent_scope,
+ "included_path": included_path,
+ "all_properties": self.all_properties(),
+ },
+ )
+
+ return {
+ "agent_events": ast.Tuple(exprs=[ast.Constant(value=event) for event in AGENT_EVENTS]),
+ "navigation_events": ast.Tuple(exprs=[ast.Constant(value=event) for event in AGENT_NAVIGATION_EVENTS]),
+ "http_event": ast.Constant(value=AGENT_HTTP_EVENT),
+ "agent_scope": agent_scope,
+ "agent_request": agent_request,
+ "current_period": self._current_period_expression("timestamp"),
+ "previous_period": self._previous_period_expression("timestamp"),
+ "periods": self._periods_expression("timestamp"),
+ "all_properties": self.all_properties(),
+ "status": status,
+ "is_404": parse_expr("{status} = 404", placeholders={"status": status}),
+ "is_200": is_200,
+ "is_md": is_md,
+ "is_md_hit": parse_expr("{is_200} AND {is_md}", placeholders={"is_200": is_200, "is_md": is_md}),
+ "is_html_hit": parse_expr("{is_200} AND NOT ({is_md})", placeholders={"is_200": is_200, "is_md": is_md}),
+ "malformed_path": malformed_path_expr(),
+ "excluded_path": excluded_path,
+ "included_path": included_path,
+ "included_request": ast.And(exprs=[agent_scope, included_path]),
+ "normalized_path": normalized_path,
+ "page_key": page_identity_expr(),
+ "intent_key": parse_expr(
+ "concat(coalesce(properties.$host, ''), {normalized_path})",
+ placeholders={"normalized_path": normalized_path},
+ ),
+ "selected_intent_key": ast.Constant(value=self.query.intentKey or ""),
+ "conversion_goal": self.conversion_goal_expr or ast.Constant(value=False),
+ "conversion_window_seconds": ast.Constant(value=CONVERSION_WINDOW_SECONDS),
+ "navigation_window_seconds": ast.Constant(value=NAVIGATION_WINDOW_SECONDS),
+ "inactivity_window_seconds": ast.Constant(value=INACTIVITY_WINDOW_SECONDS),
+ "referrer": referrer_expr(),
+ "journey_salt": ast.Constant(value=str(self.team.uuid)),
+ "selected_journey_key": ast.Constant(value=self.query.journeyKey or ""),
+ "llms_source_event": self._llms_source_expr(host="properties.$host", path="properties.$pathname"),
+ "llms_source_row": self._llms_source_expr(host="host", path="path"),
+ }
+
+ def _parse(self, template: str) -> ast.SelectQuery:
+ query = parse_select(template, timings=self.timings, placeholders=self._placeholders)
+ assert isinstance(query, ast.SelectQuery)
+ return query
+
+ def to_query(self) -> ast.SelectQuery:
+ required = REQUIRED_ARGUMENTS.get(self.query.queryType)
+ if required and not getattr(self.query, required):
+ raise QueryError(f"{required} is required for {self.query.queryType.value}")
+ with self.timings.measure("web_agent_analytics_query"):
+ return self._parse(QUERY_TEMPLATES[self.query.queryType])
+
+ def _execute(self, template: str, query_type: str) -> HogQLQueryResponse:
+ return execute_hogql_query(
+ query_type=f"web_agent_analytics_{query_type}",
+ query=self._parse(template),
+ team=self.team,
+ user=self.user,
+ timings=self.timings,
+ modifiers=self.modifiers,
+ limit_context=self.limit_context,
+ )
+
+ def _supplementary_responses(self) -> list[HogQLQueryResponse]:
+ if self.query.queryType != WebAgentAnalyticsQueryType.OVERVIEW:
+ return []
+ responses = [self._execute(DOUBLE_FETCH_QUERY, "double_fetch")]
+ if self.query.conversionGoal:
+ responses.append(self._execute(CONVERSION_GOAL_QUERY, "conversion_goal"))
+ return responses
+
+ def _calculate(self) -> WebAgentAnalyticsQueryResponse:
+ response = self.paginator.execute_hogql_query(
+ query=self.to_query(),
+ query_type=f"web_agent_analytics_{self.query.queryType.value}",
+ team=self.team,
+ user=self.user,
+ timings=self.timings,
+ modifiers=self.modifiers,
+ )
+ columns = list(response.columns or [])
+ types = list(response.types or [])
+ results = [list(row) for row in self.paginator.results]
+ hogql_parts = [response.hogql]
+
+ for supplement in self._supplementary_responses():
+ columns.extend(supplement.columns or [])
+ types.extend(supplement.types or [])
+ supplement_row = list(supplement.results[0]) if supplement.results else []
+ results = [[*(results[0] if results else []), *supplement_row]]
+ hogql_parts.append(supplement.hogql)
+
+ return WebAgentAnalyticsQueryResponse(
+ columns=columns,
+ results=results,
+ timings=response.timings,
+ types=types,
+ hogql="\n\n".join(part for part in hogql_parts if part) or None,
+ modifiers=self.modifiers,
+ **self.paginator.response_params(),
+ )
diff --git a/products/web_analytics/backend/hogql_queries/web_analytics_query_runner.py b/products/web_analytics/backend/hogql_queries/web_analytics_query_runner.py
index b29756a5706b..2048784aa014 100644
--- a/products/web_analytics/backend/hogql_queries/web_analytics_query_runner.py
+++ b/products/web_analytics/backend/hogql_queries/web_analytics_query_runner.py
@@ -19,6 +19,7 @@ from posthog.schema import (
EventPropertyFilter,
PersonPropertyFilter,
SessionPropertyFilter,
+ WebAgentAnalyticsQuery,
WebBotsTableQuery,
WebExternalClicksTableQuery,
WebGoalsQuery,
@@ -90,6 +91,7 @@ WebQueryNode = Union[
WebStatsTableQuery,
WebGoalsQuery,
WebExternalClicksTableQuery,
+ WebAgentAnalyticsQuery,
WebBotsTableQuery,
WebVitalsPathBreakdownQuery,
WebPageURLSearchQuery,
diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.ts
index 6bfafebd1822..4b3a48e1c876 100644
--- a/services/mcp/src/api/generated.ts
+++ b/services/mcp/src/api/generated.ts
@@ -42077,6 +42077,94 @@ export namespace Schemas {
version?: number | null;
}
+ export type WebAgentContentGrouping = typeof WebAgentContentGrouping[keyof typeof WebAgentContentGrouping];
+
+
+ export const WebAgentContentGrouping = {
+ Exact: 'exact',
+ Normalized: 'normalized',
+ } as const;
+
+ export type WebAgentAnalyticsQueryType = typeof WebAgentAnalyticsQueryType[keyof typeof WebAgentAnalyticsQueryType];
+
+
+ export const WebAgentAnalyticsQueryType = {
+ Overview: 'overview',
+ Issues: 'issues',
+ PageRequests: 'page_requests',
+ Transitions: 'transitions',
+ Demand: 'demand',
+ IssueVariants: 'issue_variants',
+ RequestAnatomy: 'request_anatomy',
+ JourneySummary: 'journey_summary',
+ Journeys: 'journeys',
+ JourneyDetail: 'journey_detail',
+ } as const;
+
+ export interface WebAgentAnalyticsQueryResponse {
+ columns?: unknown[] | null;
+ /** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
+ error?: string | null;
+ hasMore?: boolean | null;
+ /** Generated HogQL query. */
+ hogql?: string | null;
+ limit?: number | null;
+ /** Modifiers used when performing the query */
+ modifiers?: HogQLQueryModifiers | null;
+ offset?: number | null;
+ /** Query status indicates whether next to the provided data, a query is still running. */
+ query_status?: QueryStatus | null;
+ /** The resolved previous/comparison period date range, when comparing against another period */
+ resolved_compare_date_range?: ResolvedDateRangeResponse | null;
+ /** The date range used for the query */
+ resolved_date_range?: ResolvedDateRangeResponse | null;
+ results: unknown[];
+ /** Measured timings for different parts of the query generation process */
+ timings?: QueryTiming[] | null;
+ types?: unknown[] | null;
+ /** Connector-synced data warehouse sources referenced by this query, if any. */
+ used_data_warehouse_sources?: DataWarehouseSourceUsage[] | null;
+ /** Warnings about data warehouse sources referenced by the query whose latest sync failed, is paused, hit a billing limit, or is otherwise stale. Results may not reflect current source data. Accumulated across every HogQL execution that contributes to this response — so insights backed by warehouse tables (Trends, Funnels, etc.) receive the same warnings as raw HogQL queries. Also carries access control warnings when a system-table query filters out objects the user can't access. */
+ warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
+ }
+
+ export interface WebAgentAnalyticsQuery {
+ /** Groups aggregation - not used in Web Analytics but required for type compatibility */
+ aggregation_group_type_index?: number | null;
+ compareFilter?: CompareFilter | null;
+ contentGrouping?: WebAgentContentGrouping | null;
+ conversionGoal?: ActionConversionGoal | CustomEventConversionGoal | null;
+ /** Colors used in the insight's visualization - not used in Web Analytics but required for type compatibility */
+ dataColorTheme?: number | null;
+ dateRange?: DateRange | null;
+ doPathCleaning?: boolean | null;
+ filterTestAccounts?: boolean | null;
+ includeCrawlers?: boolean | null;
+ includeRevenue?: boolean | null;
+ intentKey?: string | null;
+ /** Interval for date range calculation (affects date_to rounding for hour vs day ranges) */
+ interval?: IntervalType | null;
+ /** Opaque journey identifier returned by the journeys list, used to load one journey's timeline. */
+ journeyKey?: string | null;
+ kind?: 'WebAgentAnalyticsQuery';
+ limit?: number | null;
+ llmsTxtUrl?: string | null;
+ /** Modifiers used when performing the query */
+ modifiers?: HogQLQueryModifiers | null;
+ offset?: number | null;
+ orderBy?: (WebAnalyticsOrderByFields | WebAnalyticsOrderByDirection)[] | null;
+ properties: (EventPropertyFilter | PersonPropertyFilter | SessionPropertyFilter | CohortPropertyFilter)[];
+ queryType: WebAgentAnalyticsQueryType;
+ response?: WebAgentAnalyticsQueryResponse | null;
+ sampling?: WebAnalyticsSampling | null;
+ /** Sampling rate */
+ samplingFactor?: number | null;
+ tags?: QueryLogTags | null;
+ useSessionsTable?: boolean | null;
+ /** version of the node, used for schema migrations */
+ version?: number | null;
+ }
+
export interface PageURL {
url: string;
}
@@ -43871,7 +43959,7 @@ export namespace Schemas {
query: string;
response?: HogQLMetadataResponse | null;
/** Query within which "expr" and "template" are validated. Defaults to "select * from events" */
- sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | NonIntegratedConversionsTableQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | null;
+ sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | NonIntegratedConversionsTableQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | null;
tags?: QueryLogTags | null;
/** Variables to be subsituted into the query */
variables?: HogQLMetadataVariables;
@@ -43897,7 +43985,7 @@ export namespace Schemas {
query: string;
response?: HogQLAutocompleteResponse | null;
/** Query in whose context to validate. */
- sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | NonIntegratedConversionsTableQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | null;
+ sourceQuery?: EventsNode | ActionsNode | PersonsNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | NonIntegratedConversionsTableQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingIssueCorrelationQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | CalendarHeatmapQuery | RecordingsQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | null;
/** Start position of the editor word */
startPosition: number;
tags?: QueryLogTags | null;
@@ -68595,7 +68683,7 @@ export namespace Schemas {
* ```
*
* For more details on HogQL queries, see the [PostHog HogQL documentation](/docs/hogql#api-access). */
- query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | NonIntegratedConversionsTableQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | PropertyValuesQuery;
+ query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | NonIntegratedConversionsTableQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | PropertyValuesQuery;
/** Whether results should be calculated sync or async, and how much to rely on the cache:
* - `'blocking'` - calculate synchronously (returning only when the query is done), UNLESS there are very fresh results in the cache
* - `'async'` - kick off background calculation (returning immediately with a query status), UNLESS there are very fresh results in the cache
@@ -69190,7 +69278,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative26 {
+ export interface QueryResponseAlternative27 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69219,7 +69307,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative27 {
+ export interface QueryResponseAlternative28 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -69246,7 +69334,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative28 {
+ export interface QueryResponseAlternative29 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore?: boolean | null;
@@ -69271,15 +69359,15 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative29Data = { [key: string]: unknown };
+ export type QueryResponseAlternative30Data = { [key: string]: unknown };
- export interface QueryResponseAlternative29 {
- data: QueryResponseAlternative29Data;
+ export interface QueryResponseAlternative30 {
+ data: QueryResponseAlternative30Data;
error?: ExternalQueryError | null;
status: ExternalQueryStatus;
}
- export interface QueryResponseAlternative30 {
+ export interface QueryResponseAlternative31 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -69303,7 +69391,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative31 {
+ export interface QueryResponseAlternative32 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69331,9 +69419,9 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative32Results = {[key: string]: MarketingAnalyticsItem};
+ export type QueryResponseAlternative33Results = {[key: string]: MarketingAnalyticsItem};
- export interface QueryResponseAlternative32 {
+ export interface QueryResponseAlternative33 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -69346,7 +69434,7 @@ export namespace Schemas {
resolved_compare_date_range?: ResolvedDateRangeResponse | null;
/** The date range used for the query */
resolved_date_range?: ResolvedDateRangeResponse | null;
- results: QueryResponseAlternative32Results;
+ results: QueryResponseAlternative33Results;
samplingRate?: SamplingRate | null;
/** Measured timings for different parts of the query generation process */
timings?: QueryTiming[] | null;
@@ -69356,7 +69444,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative33 {
+ export interface QueryResponseAlternative34 {
/** Whether this result counted a repeat converter's every conversion, after resolving the query's null against the goal's math. The rate columns are a true share only when this is false, so the table reads it to label them. */
allowsMultipleConversionsPerVisitor: boolean;
/** The team's configured attribution window, for the tooltips. */
@@ -69393,7 +69481,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative34 {
+ export interface QueryResponseAlternative35 {
/** Conversions with at least one in-window touchpoint. The share denominator — deliberately unfiltered by min/maxTouchpoints so shares stay comparable across filter values. */
attributedConversions: number;
/** The attribution window actually used, for the tooltips. */
@@ -69426,7 +69514,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative35 {
+ export interface QueryResponseAlternative36 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69454,7 +69542,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative36 {
+ export interface QueryResponseAlternative37 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69483,7 +69571,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative37 {
+ export interface QueryResponseAlternative38 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69511,7 +69599,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative38 {
+ export interface QueryResponseAlternative39 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69539,7 +69627,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative39 {
+ export interface QueryResponseAlternative40 {
/** Executed ClickHouse query */
clickhouse?: string | null;
/** Returned columns */
@@ -69576,7 +69664,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative40 {
+ export interface QueryResponseAlternative41 {
dateFrom?: string | null;
dateTo?: string | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -69602,7 +69690,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative41 {
+ export interface QueryResponseAlternative42 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69633,7 +69721,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative42 {
+ export interface QueryResponseAlternative43 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69661,7 +69749,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative43 {
+ export interface QueryResponseAlternative44 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69688,7 +69776,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative44 {
+ export interface QueryResponseAlternative45 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69717,7 +69805,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative45 {
+ export interface QueryResponseAlternative46 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -69744,7 +69832,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative46 {
+ export interface QueryResponseAlternative47 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69771,7 +69859,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative47 {
+ export interface QueryResponseAlternative48 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69798,7 +69886,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative48 {
+ export interface QueryResponseAlternative49 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69826,9 +69914,9 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative49Results = {[key: string]: MarketingAnalyticsItem};
+ export type QueryResponseAlternative50Results = {[key: string]: MarketingAnalyticsItem};
- export interface QueryResponseAlternative49 {
+ export interface QueryResponseAlternative50 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -69841,7 +69929,7 @@ export namespace Schemas {
resolved_compare_date_range?: ResolvedDateRangeResponse | null;
/** The date range used for the query */
resolved_date_range?: ResolvedDateRangeResponse | null;
- results: QueryResponseAlternative49Results;
+ results: QueryResponseAlternative50Results;
samplingRate?: SamplingRate | null;
/** Measured timings for different parts of the query generation process */
timings?: QueryTiming[] | null;
@@ -69851,7 +69939,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative50 {
+ export interface QueryResponseAlternative51 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69879,7 +69967,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative51 {
+ export interface QueryResponseAlternative52 {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69905,19 +69993,19 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative53CredibleIntervals = {[key: string]: number[]};
+ export type QueryResponseAlternative54CredibleIntervals = {[key: string]: number[]};
- export type QueryResponseAlternative53InsightItemItem = { [key: string]: unknown };
+ export type QueryResponseAlternative54InsightItemItem = { [key: string]: unknown };
- export type QueryResponseAlternative53Probability = {[key: string]: number};
+ export type QueryResponseAlternative54Probability = {[key: string]: number};
- export interface QueryResponseAlternative53 {
- credible_intervals: QueryResponseAlternative53CredibleIntervals;
+ export interface QueryResponseAlternative54 {
+ credible_intervals: QueryResponseAlternative54CredibleIntervals;
expected_loss: number;
funnels_query?: FunnelsQuery | null;
- insight: QueryResponseAlternative53InsightItemItem[][];
+ insight: QueryResponseAlternative54InsightItemItem[][];
kind?: 'ExperimentFunnelsQuery';
- probability: QueryResponseAlternative53Probability;
+ probability: QueryResponseAlternative54Probability;
significance_code: ExperimentSignificanceCode;
significant: boolean;
stats_version?: number | null;
@@ -69926,20 +70014,20 @@ export namespace Schemas {
warnings?: DataWarehouseSyncWarning[] | null;
}
- export type QueryResponseAlternative54CredibleIntervals = {[key: string]: number[]};
+ export type QueryResponseAlternative55CredibleIntervals = {[key: string]: number[]};
- export type QueryResponseAlternative54InsightItem = { [key: string]: unknown };
+ export type QueryResponseAlternative55InsightItem = { [key: string]: unknown };
- export type QueryResponseAlternative54Probability = {[key: string]: number};
+ export type QueryResponseAlternative55Probability = {[key: string]: number};
- export interface QueryResponseAlternative54 {
+ export interface QueryResponseAlternative55 {
count_query?: TrendsQuery | null;
- credible_intervals: QueryResponseAlternative54CredibleIntervals;
+ credible_intervals: QueryResponseAlternative55CredibleIntervals;
exposure_query?: TrendsQuery | null;
- insight: QueryResponseAlternative54InsightItem[];
+ insight: QueryResponseAlternative55InsightItem[];
kind?: 'ExperimentTrendsQuery';
p_value: number;
- probability: QueryResponseAlternative54Probability;
+ probability: QueryResponseAlternative55Probability;
significance_code: ExperimentSignificanceCode;
significant: boolean;
stats_version?: number | null;
@@ -69948,7 +70036,7 @@ export namespace Schemas {
warnings?: DataWarehouseSyncWarning[] | null;
}
- export interface QueryResponseAlternative55 {
+ export interface QueryResponseAlternative56 {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -69974,7 +70062,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative57 {
+ export interface QueryResponseAlternative58 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -70001,7 +70089,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative58 {
+ export interface QueryResponseAlternative59 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -70031,7 +70119,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative59 {
+ export interface QueryResponseAlternative60 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore: boolean;
@@ -70059,9 +70147,9 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative60ResultsItem = { [key: string]: unknown };
+ export type QueryResponseAlternative61ResultsItem = { [key: string]: unknown };
- export interface QueryResponseAlternative60 {
+ export interface QueryResponseAlternative61 {
boxplot_data?: BoxPlotDatum[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -70077,7 +70165,7 @@ export namespace Schemas {
resolved_compare_date_range?: ResolvedDateRangeResponse | null;
/** The date range used for the query */
resolved_date_range?: ResolvedDateRangeResponse | null;
- results: QueryResponseAlternative60ResultsItem[];
+ results: QueryResponseAlternative61ResultsItem[];
/** Measured timings for different parts of the query generation process */
timings?: QueryTiming[] | null;
/** Connector-synced data warehouse sources referenced by this query, if any. */
@@ -70086,7 +70174,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative61 {
+ export interface QueryResponseAlternative62 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70110,7 +70198,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative62 {
+ export interface QueryResponseAlternative63 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70132,7 +70220,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative63 {
+ export interface QueryResponseAlternative64 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70154,7 +70242,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative64 {
+ export interface QueryResponseAlternative65 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70176,9 +70264,9 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative65ResultsItem = { [key: string]: unknown };
+ export type QueryResponseAlternative66ResultsItem = { [key: string]: unknown };
- export interface QueryResponseAlternative65 {
+ export interface QueryResponseAlternative66 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70191,7 +70279,7 @@ export namespace Schemas {
resolved_compare_date_range?: ResolvedDateRangeResponse | null;
/** The date range used for the query */
resolved_date_range?: ResolvedDateRangeResponse | null;
- results: QueryResponseAlternative65ResultsItem[];
+ results: QueryResponseAlternative66ResultsItem[];
/** Measured timings for different parts of the query generation process */
timings?: QueryTiming[] | null;
/** Connector-synced data warehouse sources referenced by this query, if any. */
@@ -70200,7 +70288,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative67 {
+ export interface QueryResponseAlternative68 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -70227,14 +70315,14 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative68Tables = {[key: string]: DatabaseSchemaPostHogTable | DatabaseSchemaSystemTable | DatabaseSchemaDataWarehouseTable | DatabaseSchemaViewTable | DatabaseSchemaManagedViewTable | DatabaseSchemaBatchExportTable | DatabaseSchemaMaterializedViewTable | DatabaseSchemaEndpointTable};
+ export type QueryResponseAlternative69Tables = {[key: string]: DatabaseSchemaPostHogTable | DatabaseSchemaSystemTable | DatabaseSchemaDataWarehouseTable | DatabaseSchemaViewTable | DatabaseSchemaManagedViewTable | DatabaseSchemaBatchExportTable | DatabaseSchemaMaterializedViewTable | DatabaseSchemaEndpointTable};
- export interface QueryResponseAlternative68 {
+ export interface QueryResponseAlternative69 {
joins: DataWarehouseViewLink[];
- tables: QueryResponseAlternative68Tables;
+ tables: QueryResponseAlternative69Tables;
}
- export interface QueryResponseAlternative69 {
+ export interface QueryResponseAlternative70 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
has_next: boolean;
@@ -70259,7 +70347,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative70 {
+ export interface QueryResponseAlternative71 {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -70287,7 +70375,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative71 {
+ export interface QueryResponseAlternative72 {
count: number;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -70310,7 +70398,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative72 {
+ export interface QueryResponseAlternative73 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70332,7 +70420,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative73 {
+ export interface QueryResponseAlternative74 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70354,7 +70442,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative74 {
+ export interface QueryResponseAlternative75 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore?: boolean | null;
@@ -70381,7 +70469,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative75 {
+ export interface QueryResponseAlternative76 {
/** Result rows for the comparison period when `compareFilter.compare` is true. */
compare?: AggregatedSpanRow[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -70405,7 +70493,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative76 {
+ export interface QueryResponseAlternative77 {
/** Result rows for the comparison period when `compareFilter.compare` is true. */
compare?: SpanTreeNode[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -70429,7 +70517,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative77 {
+ export interface QueryResponseAlternative78 {
/** Result rows for the comparison period when `compareFilter.compare` is true. */
compare?: AttributeBreakdownRow[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
@@ -70453,13 +70541,13 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative78 {
+ export interface QueryResponseAlternative79 {
questions: string[];
/** Data warehouse sync warnings — see AnalyticsQueryResponseBase.warnings for semantics. */
warnings?: DataWarehouseSyncWarning[] | null;
}
- export interface QueryResponseAlternative79 {
+ export interface QueryResponseAlternative80 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore?: boolean | null;
@@ -70484,7 +70572,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative80 {
+ export interface QueryResponseAlternative81 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore?: boolean | null;
@@ -70509,7 +70597,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative81 {
+ export interface QueryResponseAlternative82 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70531,7 +70619,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative82 {
+ export interface QueryResponseAlternative83 {
columns?: string[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -70557,7 +70645,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative85 {
+ export interface QueryResponseAlternative86 {
/** Timestamp of the newer trace */
newerTimestamp?: string | null;
/** ID of the newer trace (chronologically after current) */
@@ -70572,7 +70660,7 @@ export namespace Schemas {
warnings?: DataWarehouseSyncWarning[] | null;
}
- export interface QueryResponseAlternative86 {
+ export interface QueryResponseAlternative87 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70594,7 +70682,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative87 {
+ export interface QueryResponseAlternative88 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70616,7 +70704,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative88 {
+ export interface QueryResponseAlternative89 {
columns: unknown[];
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -70646,7 +70734,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative89 {
+ export interface QueryResponseAlternative90 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
hasMore: boolean;
@@ -70674,7 +70762,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative90 {
+ export interface QueryResponseAlternative91 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70696,7 +70784,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative91 {
+ export interface QueryResponseAlternative92 {
columns?: unknown[] | null;
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
@@ -70723,9 +70811,9 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative92ResultsItem = { [key: string]: unknown };
+ export type QueryResponseAlternative93ResultsItem = { [key: string]: unknown };
- export interface QueryResponseAlternative92 {
+ export interface QueryResponseAlternative93 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70738,7 +70826,7 @@ export namespace Schemas {
resolved_compare_date_range?: ResolvedDateRangeResponse | null;
/** The date range used for the query */
resolved_date_range?: ResolvedDateRangeResponse | null;
- results: QueryResponseAlternative92ResultsItem[];
+ results: QueryResponseAlternative93ResultsItem[];
/** Measured timings for different parts of the query generation process */
timings?: QueryTiming[] | null;
/** Connector-synced data warehouse sources referenced by this query, if any. */
@@ -70747,7 +70835,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative93 {
+ export interface QueryResponseAlternative94 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70769,7 +70857,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative94 {
+ export interface QueryResponseAlternative95 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70791,7 +70879,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative95 {
+ export interface QueryResponseAlternative96 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70813,7 +70901,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative96 {
+ export interface QueryResponseAlternative97 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70835,7 +70923,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative97 {
+ export interface QueryResponseAlternative98 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70857,7 +70945,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative98 {
+ export interface QueryResponseAlternative99 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70879,7 +70967,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative99 {
+ export interface QueryResponseAlternative100 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70902,7 +70990,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative100 {
+ export interface QueryResponseAlternative101 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70924,7 +71012,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative101 {
+ export interface QueryResponseAlternative102 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70946,7 +71034,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative102 {
+ export interface QueryResponseAlternative103 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70968,7 +71056,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative103 {
+ export interface QueryResponseAlternative104 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -70990,7 +71078,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative104 {
+ export interface QueryResponseAlternative105 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -71012,7 +71100,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative105 {
+ export interface QueryResponseAlternative106 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -71034,7 +71122,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative106 {
+ export interface QueryResponseAlternative107 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -71056,7 +71144,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative107 {
+ export interface QueryResponseAlternative108 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -71078,7 +71166,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative108 {
+ export interface QueryResponseAlternative109 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -71100,7 +71188,7 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export interface QueryResponseAlternative109 {
+ export interface QueryResponseAlternative110 {
/** Query error. Returned only if 'explain' or `modifiers.debug` is true. Throws an error otherwise. */
error?: string | null;
/** Generated HogQL query. */
@@ -71122,18 +71210,18 @@ export namespace Schemas {
warnings?: (DataWarehouseSyncWarning | AccessControlFilterWarning)[] | null;
}
- export type QueryResponseAlternative = { [key: string]: unknown } | QueryResponseAlternative1 | QueryResponseAlternative2 | QueryResponseAlternative3 | QueryResponseAlternative4 | QueryResponseAlternative5 | QueryResponseAlternative6 | QueryResponseAlternative7 | QueryResponseAlternative8 | QueryResponseAlternative9 | QueryResponseAlternative10 | QueryResponseAlternative11 | QueryResponseAlternative12 | QueryResponseAlternative13 | QueryResponseAlternative14 | QueryResponseAlternative15 | QueryResponseAlternative16 | QueryResponseAlternative17 | QueryResponseAlternative18 | QueryResponseAlternative19 | QueryResponseAlternative20 | QueryResponseAlternative21 | QueryResponseAlternative22 | QueryResponseAlternative23 | QueryResponseAlternative24 | QueryResponseAlternative25 | QueryResponseAlternative26 | QueryResponseAlternative27 | QueryResponseAlternative28 | QueryResponseAlternative29 | QueryResponseAlternative30 | QueryResponseAlternative31 | QueryResponseAlternative32 | QueryResponseAlternative33 | QueryResponseAlternative34 | QueryResponseAlternative35 | unknown | QueryResponseAlternative36 | QueryResponseAlternative37 | QueryResponseAlternative38 | QueryResponseAlternative39 | QueryResponseAlternative40 | QueryResponseAlternative41 | QueryResponseAlternative42 | QueryResponseAlternative43 | QueryResponseAlternative44 | QueryResponseAlternative45 | QueryResponseAlternative46 | QueryResponseAlternative47 | QueryResponseAlternative48 | QueryResponseAlternative49 | QueryResponseAlternative50 | QueryResponseAlternative51 | QueryResponseAlternative53 | QueryResponseAlternative54 | QueryResponseAlternative55 | QueryResponseAlternative57 | QueryResponseAlternative58 | QueryResponseAlternative59 | QueryResponseAlternative60 | QueryResponseAlternative61 | QueryResponseAlternative62 | QueryResponseAlternative63 | QueryResponseAlternative64 | QueryResponseAlternative65 | QueryResponseAlternative67 | QueryResponseAlternative68 | QueryResponseAlternative69 | QueryResponseAlternative70 | QueryResponseAlternative71 | QueryResponseAlternative72 | QueryResponseAlternative73 | QueryResponseAlternative74 | QueryResponseAlternative75 | QueryResponseAlternative76 | QueryResponseAlternative77 | QueryResponseAlternative78 | QueryResponseAlternative79 | QueryResponseAlternative80 | QueryResponseAlternative81 | QueryResponseAlternative82 | QueryResponseAlternative85 | QueryResponseAlternative86 | QueryResponseAlternative87 | QueryResponseAlternative88 | QueryResponseAlternative89 | QueryResponseAlternative90 | QueryResponseAlternative91 | QueryResponseAlternative92 | QueryResponseAlternative93 | QueryResponseAlternative94 | QueryResponseAlternative95 | QueryResponseAlternative96 | QueryResponseAlternative97 | QueryResponseAlternative98 | QueryResponseAlternative99 | QueryResponseAlternative100 | QueryResponseAlternative101 | QueryResponseAlternative102 | QueryResponseAlternative103 | QueryResponseAlternative104 | QueryResponseAlternative105 | QueryResponseAlternative106 | QueryResponseAlternative107 | QueryResponseAlternative108 | QueryResponseAlternative109;
+ export type QueryResponseAlternative = { [key: string]: unknown } | QueryResponseAlternative1 | QueryResponseAlternative2 | QueryResponseAlternative3 | QueryResponseAlternative4 | QueryResponseAlternative5 | QueryResponseAlternative6 | QueryResponseAlternative7 | QueryResponseAlternative8 | QueryResponseAlternative9 | QueryResponseAlternative10 | QueryResponseAlternative11 | QueryResponseAlternative12 | QueryResponseAlternative13 | QueryResponseAlternative14 | QueryResponseAlternative15 | QueryResponseAlternative16 | QueryResponseAlternative17 | QueryResponseAlternative18 | QueryResponseAlternative19 | QueryResponseAlternative20 | QueryResponseAlternative21 | QueryResponseAlternative22 | QueryResponseAlternative23 | QueryResponseAlternative24 | QueryResponseAlternative25 | QueryResponseAlternative27 | QueryResponseAlternative28 | QueryResponseAlternative29 | QueryResponseAlternative30 | QueryResponseAlternative31 | QueryResponseAlternative32 | QueryResponseAlternative33 | QueryResponseAlternative34 | QueryResponseAlternative35 | QueryResponseAlternative36 | unknown | QueryResponseAlternative37 | QueryResponseAlternative38 | QueryResponseAlternative39 | QueryResponseAlternative40 | QueryResponseAlternative41 | QueryResponseAlternative42 | QueryResponseAlternative43 | QueryResponseAlternative44 | QueryResponseAlternative45 | QueryResponseAlternative46 | QueryResponseAlternative47 | QueryResponseAlternative48 | QueryResponseAlternative49 | QueryResponseAlternative50 | QueryResponseAlternative51 | QueryResponseAlternative52 | QueryResponseAlternative54 | QueryResponseAlternative55 | QueryResponseAlternative56 | QueryResponseAlternative58 | QueryResponseAlternative59 | QueryResponseAlternative60 | QueryResponseAlternative61 | QueryResponseAlternative62 | QueryResponseAlternative63 | QueryResponseAlternative64 | QueryResponseAlternative65 | QueryResponseAlternative66 | QueryResponseAlternative68 | QueryResponseAlternative69 | QueryResponseAlternative70 | QueryResponseAlternative71 | QueryResponseAlternative72 | QueryResponseAlternative73 | QueryResponseAlternative74 | QueryResponseAlternative75 | QueryResponseAlternative76 | QueryResponseAlternative77 | QueryResponseAlternative78 | QueryResponseAlternative79 | QueryResponseAlternative80 | QueryResponseAlternative81 | QueryResponseAlternative82 | QueryResponseAlternative83 | QueryResponseAlternative86 | QueryResponseAlternative87 | QueryResponseAlternative88 | QueryResponseAlternative89 | QueryResponseAlternative90 | QueryResponseAlternative91 | QueryResponseAlternative92 | QueryResponseAlternative93 | QueryResponseAlternative94 | QueryResponseAlternative95 | QueryResponseAlternative96 | QueryResponseAlternative97 | QueryResponseAlternative98 | QueryResponseAlternative99 | QueryResponseAlternative100 | QueryResponseAlternative101 | QueryResponseAlternative102 | QueryResponseAlternative103 | QueryResponseAlternative104 | QueryResponseAlternative105 | QueryResponseAlternative106 | QueryResponseAlternative107 | QueryResponseAlternative108 | QueryResponseAlternative109 | QueryResponseAlternative110;
export interface QueryStatusResponse {
query_status: QueryStatus;
}
export interface QueryUpgradeRequest {
- query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | NonIntegratedConversionsTableQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | PropertyValuesQuery;
+ query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | NonIntegratedConversionsTableQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | PropertyValuesQuery;
}
export interface QueryUpgradeResponse {
- query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | NonIntegratedConversionsTableQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | PropertyValuesQuery;
+ query: EventsNode | ActionsNode | PersonsNode | DataWarehouseNode | FunnelsDataWarehouseNode | LifecycleDataWarehouseNode | EventsQuery | SessionsQuery | ActorsQuery | GroupsQuery | InsightActorsQuery | InsightActorsQueryOptions | SessionsTimelineQuery | HogQuery | HogQLQuery | HogQLMetadata | HogQLAutocomplete | SessionAttributionExplorerQuery | ErrorTrackingQuery | ErrorTrackingSimilarIssuesQuery | ErrorTrackingFingerprintProjectionQuery | ErrorTrackingBreakdownsQuery | ErrorTrackingIssueCorrelationQuery | ExperimentFunnelsQuery | ExperimentTrendsQuery | ExperimentQuery | ExperimentExposureQuery | DocumentSimilarityQuery | WebOverviewQuery | WebStatsTableQuery | WebExternalClicksTableQuery | WebBotsTableQuery | WebAgentAnalyticsQuery | WebGoalsQuery | WebVitalsQuery | WebVitalsPathBreakdownQuery | WebPageURLSearchQuery | WebAnalyticsExternalSummaryQuery | WebNotableChangesQuery | MarketingAnalyticsTableQuery | MarketingAnalyticsAggregatedQuery | MarketingAnalyticsAttributionQuery | MarketingAnalyticsAttributionPathsQuery | NonIntegratedConversionsTableQuery | DataVisualizationNode | DataTableNode | SavedInsightNode | InsightVizNode | TrendsQuery | FunnelsQuery | RetentionQuery | PathsQuery | PathsV2Query | StickinessQuery | LifecycleQuery | FunnelCorrelationQuery | DatabaseSchemaQuery | RecordingsQuery | LogsQuery | LogAttributesQuery | LogValuesQuery | MetricsQuery | TraceSpansQuery | TraceSpansAggregationQuery | TraceSpansTreeQuery | TraceSpansAttributeBreakdownQuery | SuggestedQuestionsQuery | TeamTaxonomyQuery | EventTaxonomyQuery | ActorsPropertyTaxonomyQuery | TracesQuery | TraceQuery | SessionQuery | TraceNeighborsQuery | VectorSearchQuery | UsageMetricsQuery | AccountsQuery | AccountsTableQuery | EndpointsUsageOverviewQuery | EndpointsUsageTableQuery | EndpointsUsageTrendsQuery | MCPToolCallBreakdownQuery | MCPToolCallsAndErrorsQuery | MCPHarnessBreakdownQuery | MCPToolTopUsersQuery | MCPToolFailuresQuery | MCPToolFailureOccurrencesQuery | MCPToolStatsQuery | MCPToolDailyStatsQuery | MCPToolQualityRowsQuery | MCPToolQualityDailyStatsQuery | MCPToolCategoryCountsQuery | MCPToolCategoriesQuery | MCPToolCategoryMapQuery | MCPToolDescriptionsQuery | MCPToolSampleIntentsQuery | MCPToolNeighborsQuery | PropertyValuesQuery;
}
export interface QuotaResourceLimit {