feat(analytics): add source field to creation and execution events [INS-2427]#9933
Open
pavkout wants to merge 6 commits into
Open
feat(analytics): add source field to creation and execution events [INS-2427]#9933pavkout wants to merge 6 commits into
pavkout wants to merge 6 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a source attribute to multiple analytics “creation” and “execution” events so product analytics can distinguish where actions were triggered from (home page, navbar, sidebar, tab bar, etc.).
Changes:
- Thread a
sourcestring through request/workspace/environment creation flows and attach it to corresponding analytics events. - Add
sourceattribution for request execution (“Request Executed”) from the request pane. - Plumb
sourcethrough dashboard → NewWorkspaceModal →workspace/newroute, and through request/environment fetcher submit hooks.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/insomnia/src/ui/components/tabs/tab-list.tsx | Adds source: 'tab-bar' when creating a request via the tab bar “+”. |
| packages/insomnia/src/ui/components/panes/placeholder-request-pane.tsx | Adds source: 'placeholder' when creating a request from the empty request pane CTA. |
| packages/insomnia/src/ui/components/modals/workspace-environments-edit-modal.tsx | Adds source: 'environment-editor' when creating environments from the env editor modal. |
| packages/insomnia/src/ui/components/modals/new-workspace-modal.tsx | Accepts optional source prop and forwards it to the workspace/new action payload. |
| packages/insomnia/src/ui/components/dropdowns/request-group-actions-dropdown.tsx | Adds source: 'context-menu' for request creation from the request group actions menu. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.new.tsx | Adds source to workspace creation analytics and mock-create analytics payloads; threads source into mock server creation helper. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.environment.tsx | Adds source: 'environment-editor' when triggering environment creation from the environment page. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.environment.create.tsx | Accepts source in the create-environment action and attaches it to environmentCreate analytics. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.debug.tsx | Threads source into request creation calls (sidebar + keyboard shortcut). |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.debug.request.new.tsx | Accepts source in request creation action and adds it to requestCreated analytics properties. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId.workspace.$workspaceId.debug.request.$requestId.send.tsx | Adds source: 'request-pane' to the “Request Executed” analytics payload. |
| packages/insomnia/src/routes/organization.$organizationId.project.$projectId._index.tsx | Captures source when opening the new-workspace modal from navbar/sidebar/home page and when creating “first collection” directly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
e821cf4 to
d817e88
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
sourceproperty to analytics creation and execution events todifferentiate where users trigger actions from (home page, sidebar, navbar, etc.)
Mock Created, MCP Client Workspace Created, and Environment Created
sourceon all call sites — no change neededAnalytics Events
requestExecuted— addedsourcepropertyrequest-paneenvironmentCreate— addedsourcepropertyenvironment-editorenvironment-editorworkspaceCreate— addedsourceproperty (all scopes: collection, design, environment, mcp, mock-server)navbarempty-statehome-pagesidebar-dropdownsidebardesign-viewrequestCreated— new eventFired when a collection is created together with a first HTTP request.
home-pagemockCreate—sourcenow dynamicPreviously hardcoded as
menu. Now inherits the same source values asworkspaceCreate(navbar,sidebar-dropdown,sidebar,design-view). Omitted entirely when no source is provided.