Skip to content

feat: add frontend analytics tracking events#97

Open
shaikhhasib wants to merge 2 commits intomainfrom
feature/analytics-loki-frontend
Open

feat: add frontend analytics tracking events#97
shaikhhasib wants to merge 2 commits intomainfrom
feature/analytics-loki-frontend

Conversation

@shaikhhasib
Copy link
Copy Markdown
Collaborator

Description

Added a frontend analytics client service to emit structured usage events to backend endpoint POST /v1/analytics/events.
Added page-view analytics hook integrated at the root route so route changes automatically generate page_view events.
Added analytics endpoint constant in API config for centralized routing.
Instrumented snapshot workflows in query hooks:
async snapshot create requested
sync snapshot create completed
snapshot delete
Instrumented PV Browser interactions:
search/filter query activity
load-more pagination activity
PV create/import/update/delete actions
Instrumented Tag page interactions:
tag group create/update/delete
tag create/update/delete

Motivation

This change gives us visibility into how users actually use core Squirrel UI workflows (navigation, PV management, snapshots, and tags) without adding a heavy client SDK.

Problems solved:

No consistent frontend usage telemetry for key user journeys.
No easy way to correlate user actions with backend observability events/dashboards.
Hard to measure feature adoption and workflow friction points.
Design notes:

Analytics calls are intentionally non-blocking and failure-tolerant, so never breaks user actions.

@shaikhhasib shaikhhasib requested a review from YektaY April 30, 2026 21:34
@YektaY YektaY requested a review from a team May 1, 2026 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant