Skip to content

feat(frontend): add tracking for Network events#12231

Merged
DenysKarmazynDFINITY merged 4 commits intomainfrom
feat(frontend)/networks-tracking
Mar 30, 2026
Merged

feat(frontend): add tracking for Network events#12231
DenysKarmazynDFINITY merged 4 commits intomainfrom
feat(frontend)/networks-tracking

Conversation

@DenysKarmazynDFINITY
Copy link
Copy Markdown
Contributor

Motivation

We want to start tracking changes in the Network switcher and Manage networks modal.

@DenysKarmazynDFINITY DenysKarmazynDFINITY requested a review from a team as a code owner March 30, 2026 17:55
Copilot AI review requested due to automatic review settings March 30, 2026 17:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds analytics tracking for two network-related user interactions in the frontend application:

  1. Network filtering (switching networks using the Network Switcher dropdown)
  2. Network management (enabling/disabling networks in the Manage Networks modal)

The implementation adds new Plausible analytics events and contexts to track these actions, along with success/error status information.

Changes:

  • Added two new event types (NETWORK_FILTER and NETWORK_MANAGE) to the PLAUSIBLE_EVENTS enum
  • Added a new event context (NETWORKS) to the PLAUSIBLE_EVENT_CONTEXTS enum
  • Added a new event key (NETWORK) to the PLAUSIBLE_EVENT_EVENTS_KEYS enum
  • Implemented tracking in NetworksSwitcher.svelte to log network selection with success/error handling
  • Implemented tracking in SettingsModalEnabledNetworks.svelte to log network management changes with success/error handling

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
src/frontend/src/lib/enums/plausible.ts Added new enum values for network tracking events and contexts
src/frontend/src/lib/components/networks/NetworksSwitcher.svelte Implemented tracking for network selection with error handling and status reporting
src/frontend/src/lib/components/settings/SettingsModalEnabledNetworks.svelte Implemented tracking for network management changes with status reporting, wrapped save logic in try-catch


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/frontend/src/lib/enums/plausible.ts Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…etworks.svelte

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@DenysKarmazynDFINITY DenysKarmazynDFINITY added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit 80bb32f Mar 30, 2026
80 checks passed
@DenysKarmazynDFINITY DenysKarmazynDFINITY deleted the feat(frontend)/networks-tracking branch March 30, 2026 18:44
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.

3 participants