Skip to content

Conversation

@ckbedwell
Copy link
Contributor

@ckbedwell ckbedwell commented Nov 27, 2025

Problem

Currently, we don't track when users interact with the secrets management UI, which limits our ability to understand how users are managing secrets and whether they're accessing this functionality from the check editor sidepanel or the config page. This makes it difficult to measure feature adoption and understand user workflows.

Solution

This PR adds comprehensive tracking for secrets management interactions. When users create, edit, or delete secrets, we now track these actions with high-level context only:

  • The source context (check_editor_sidepanel_feature_tabs or config_page_secrets_tab) to distinguish where the UI is being accessed
  • The location where create buttons are clicked (empty_state or header_action)

Note: We intentionally do not track secret names or any other secret details to maintain user privacy and avoid tracking sensitive information.

The implementation:

  • Adds a new tracking events file secretsManagementEvents.ts with 6 tracking events
  • Extracts SecretsManagementSource type to avoid repetition across the codebase
  • Integrates tracking into SecretsManagementUI to track button clicks and successful operations
  • Integrates tracking into SecretEditModal to track successful create/update operations
  • Updates both usage locations (SecretsPanel and SecretsManagementTab) to pass the appropriate source context
  • Updates tests to include the new required source prop
  • Regenerates analytics events documentation

@ckbedwell ckbedwell requested a review from a team as a code owner November 27, 2025 10:56
@ckbedwell ckbedwell requested review from w1kman and removed request for a team November 27, 2025 10:56
@github-actions github-actions bot added the feature A feature added to the application. label Nov 27, 2025
- Extract SecretsManagementSource type to avoid repetition
- Remove secretName from all tracking events to only track high-level interactions
- Update all tracking calls to remove secret details
- Regenerate analytics events documentation
@github-actions
Copy link

github-actions bot commented Nov 27, 2025

Script size changes

Name +/- Main This PR Outcome
[502.js] = 1,736.41 kB 1,736.41 kB
[193.js] New file - 955.56 kB
[datasource/module.js] = 24.49 kB 24.49 kB
[692.js] = 20.41 kB 20.41 kB
[663.js] = 5.84 kB 5.84 kB
[module.js] = 4.92 kB 4.92 kB
[224.js] Deleted file 955.08 kB -

Totals

Name +/- Main This PR Outcome
[Scripts] +0.02% 2,747.15 kB 2,747.63 kB
[Non-script Assets] = 2,660.26 kB 2,660.26 kB
[All] = 5,407.41 kB 5,407.88 kB

Generated by 🚫 dangerJS against f30d25c

- Consolidate 6 interfaces into 2 reusable interfaces
- Use SecretsManagementEvent interface for events with only source property
- Keep CreateSecretButtonClicked separate due to additional location property
- Regenerate analytics events documentation
@ckbedwell ckbedwell force-pushed the feat/track-secrets-management-events branch from 7f3a5c3 to f30d25c Compare November 27, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature A feature added to the application.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant