-
Story
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
Add comprehensive analytics tracking for all base images management and layer type filtering features to measure adoption and usage.
Implementation using useAnalytics hook:
- Track base images page interactions and outcomes
- Track layer type filter usage in Vulnerabilities tab
- Include error types in failure events
- Follow existing patterns from watched images feature
Base Images Events:
1. Page Viewed - Auto-tracked when user navigates to /vulnerabilities/base-images
2. BASE_IMAGE_REFERENCE_SUBMITTED - User submits form to add base image
3. BASE_IMAGE_REFERENCE_ADD_SUCCESS - POST /v2/baseimages succeeds
4. BASE_IMAGE_REFERENCE_ADD_FAILURE - POST /v2/baseimages fails (include
property)
5. BASE_IMAGE_REFERENCE_REMOVED - DELETE /v2/baseimages succeeds
Layer Type Filter Events:
- Workload CVE Filter Applied - Auto-tracked when user applies layer type filter
- Properties: {category: 'Component Layer Type', filter: 'BASE_IMAGE' | 'APPLICATION'}
- Add 'Component Layer Type' to searchCategoriesWithFilter array in hooks/useAnalytics.ts
Error Types to Track:
- INVALID_IMAGE_NAME
- NO_VALID_INTEGRATION
- Unknown/unexpected errors
Acceptance Criteria:
- All events fire at correct times in user flow
- Error types included in failure events
- No PII or sensitive data in event properties
- Events properly tracked in Amplitude