feat(frontend): add tracking for Network events#12231
Merged
DenysKarmazynDFINITY merged 4 commits intomainfrom Mar 30, 2026
Merged
feat(frontend): add tracking for Network events#12231DenysKarmazynDFINITY merged 4 commits intomainfrom
DenysKarmazynDFINITY merged 4 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds analytics tracking for two network-related user interactions in the frontend application:
- Network filtering (switching networks using the Network Switcher dropdown)
- 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_FILTERandNETWORK_MANAGE) to thePLAUSIBLE_EVENTSenum - Added a new event context (
NETWORKS) to thePLAUSIBLE_EVENT_CONTEXTSenum - Added a new event key (
NETWORK) to thePLAUSIBLE_EVENT_EVENTS_KEYSenum - Implemented tracking in
NetworksSwitcher.svelteto log network selection with success/error handling - Implemented tracking in
SettingsModalEnabledNetworks.svelteto 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.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
AntonioVentilii
approved these changes
Mar 30, 2026
…etworks.svelte Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Motivation
We want to start tracking changes in the Network switcher and Manage networks modal.