Skip to content

feat(dev-server): send UI analytics through the local server - #855

Draft
nieblara wants to merge 1 commit into
mainfrom
cursor/dev-server-ui-analytics-7932
Draft

nieblara wants to merge 1 commit into
mainfrom
cursor/dev-server-ui-analytics-7932

Conversation

@nieblara

@nieblara nieblara commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Requirements

  • I have added test coverage for new or changed functionality
  • I have followed the repository's pull request submission guidelines
  • I have validated my changes against all supported platform versions

Related issues

None.

Describe the solution you've provided

The dev server UI sends page views and UI actions to POST /ui-analytics on the local dev server. The server allows only a fixed list of event names and properties. It then sends the event with the CLI analytics client. The access token stays in that process. The browser does not call the tracking service.

--analytics-opt-out still selects NoopClient. The local route returns success and sends nothing onward. A failed tracking call does not change a flag override.

The first events are page views, flag override set, flag override remove, project update, project sync, context update, and Events screen open or pause. Project add, remove, and import are on the allowlist. The UI has no controls for those three, so it does not send them yet.

Describe alternatives you've considered

A direct call from the browser to the tracking service would skip the opt-out flag or put the access token in the page. Events on the shared project routes would count CLI commands a second time. Those routes already send CLI Command Run.

The browser posts page views and UI actions to the dev server.
The server sends allowed events with the CLI analytics client.
Opt-out still sends nothing. The browser does not see the access token.

Co-authored-by: Ramon Niebla <[email protected]>
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.

2 participants