mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
feat: add telemetry to answer for user failed to find template (#6489)
## Summary
Adds mixpanel telemetry with goal of: "We currently only know when a
user opens a template workflow. But we also want to know if they failed
to find what they want"
Example mixpanel query:
```
app:template_library_closed
WHERE template_selected = false AND time_spent_seconds >= 10
```
But can drill down further into what filters were selected etc to answer what they were looking for but couldn't find.
```
1. Event: app:template_filter_changed
2. Filter:
- Add formula: "Where user also triggered app:template_library_closed
with template_selected = false in same session"
3. Breakdown by: search_query
4. Sort by: Total Count (descending)
Search Query Failed Sessions
-----------------------------------
"flux video" 45 times
"sdxl controlnet" 32 times
"upscaler" 28 times
(empty/just filter) 20 times
```
```
Event: app:template_filter_changed
WHERE filtered_count = 0
AND user did app:template_library_closed
with template_selected = false
Breakdown by: search_query
```
etc.
https://www.notion.so/comfy-org/Number-of-users-who-open-the-template-library-and-where-do-they-click-29b6d73d36508044a595c0fb653ca6dc?source=copy_link
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6489-feat-add-telemetry-to-answer-for-user-failed-to-find-template-29d6d73d365081cdad72fd7c6ada5dc7)
by [Unito](https://www.unito.io)
This commit is contained in:
@@ -26,6 +26,7 @@ import type {
|
||||
TelemetryProvider,
|
||||
TemplateFilterMetadata,
|
||||
TemplateLibraryMetadata,
|
||||
TemplateLibraryClosedMetadata,
|
||||
TemplateMetadata,
|
||||
WorkflowImportMetadata
|
||||
} from '../../types'
|
||||
@@ -235,6 +236,10 @@ export class MixpanelTelemetryProvider implements TelemetryProvider {
|
||||
this.trackEvent(TelemetryEvents.TEMPLATE_LIBRARY_OPENED, metadata)
|
||||
}
|
||||
|
||||
trackTemplateLibraryClosed(metadata: TemplateLibraryClosedMetadata): void {
|
||||
this.trackEvent(TelemetryEvents.TEMPLATE_LIBRARY_CLOSED, metadata)
|
||||
}
|
||||
|
||||
trackWorkflowImported(metadata: WorkflowImportMetadata): void {
|
||||
this.trackEvent(TelemetryEvents.WORKFLOW_IMPORTED, metadata)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user