Add tracking for permalink dropdown item

What does this MR do and why?

AI Summary

This change adds tracking for when users click the permalink button in the overflow menu, both in the blob view and repository view. The permalink component now requires a "source" prop to identify where it's being used (either "blob" or "repository"), and it tracks whether the permalink was accessed via a mouse click or keyboard shortcut. The tracking data is sent through GitLab's internal events system. The code also includes a new YAML configuration file for the tracking event, specifying what data is collected and which product group owns it. Tests were updated to verify the tracking functionality works correctly in both contexts and with both interaction methods.

References

Screenshots or screen recordings

CleanShot_2025-05-08_at_13.42.18

CleanShot_2025-05-08_at_13.41.46

How to set up and validate locally

  • Go to a directory/file
  • Open the overflow menu -> Select Permalink or press y

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #522042 (closed)

Edited by Chaoyue Zhao

Merge request reports

Loading