Generalize product analytics event tracking

This commit is contained in:
James Chu
2026-04-27 18:26:35 -04:00
parent f26d65b9c5
commit 2575cf76a4
20 changed files with 293 additions and 158 deletions
+43 -19
View File
@@ -2126,6 +2126,34 @@
],
"type": "object"
},
"ProductAnalyticsEvent": {
"oneOf": [
{
"properties": {
"action": {
"$ref": "#/definitions/UsageLimitBannerAction"
},
"bannerType": {
"$ref": "#/definitions/UsageLimitBannerType"
},
"type": {
"enum": [
"usageLimitBanner"
],
"title": "UsageLimitBannerProductAnalyticsEventType",
"type": "string"
}
},
"required": [
"action",
"bannerType",
"type"
],
"title": "UsageLimitBannerProductAnalyticsEvent",
"type": "object"
}
]
},
"RealtimeOutputModality": {
"enum": [
"text",
@@ -4082,25 +4110,14 @@
],
"type": "object"
},
"TrackUsageLimitBannerAction": {
"enum": [
"shown",
"cta_clicked"
],
"type": "string"
},
"TrackUsageLimitBannerParams": {
"TrackProductAnalyticsEventParams": {
"properties": {
"action": {
"$ref": "#/definitions/TrackUsageLimitBannerAction"
},
"bannerType": {
"$ref": "#/definitions/UsageLimitBannerType"
"event": {
"$ref": "#/definitions/ProductAnalyticsEvent"
}
},
"required": [
"action",
"bannerType"
"event"
],
"type": "object"
},
@@ -4287,6 +4304,13 @@
],
"type": "object"
},
"UsageLimitBannerAction": {
"enum": [
"shown",
"cta_clicked"
],
"type": "string"
},
"UsageLimitBannerType": {
"enum": [
"workspace_member_credits_depleted",
@@ -5843,13 +5867,13 @@
},
"method": {
"enum": [
"account/usageLimitBanner/track"
"analytics/productEvent/track"
],
"title": "Account/usageLimitBanner/trackRequestMethod",
"title": "Analytics/productEvent/trackRequestMethod",
"type": "string"
},
"params": {
"$ref": "#/definitions/TrackUsageLimitBannerParams"
"$ref": "#/definitions/TrackProductAnalyticsEventParams"
}
},
"required": [
@@ -5857,7 +5881,7 @@
"method",
"params"
],
"title": "Account/usageLimitBanner/trackRequest",
"title": "Analytics/productEvent/trackRequest",
"type": "object"
},
{