Add analytics for file tree browser usage

Context

See &17781 (comment 2673324349)

Add analytics so we can understand usage of the file tree browser. This will help us decide whether or not to optimize the UI for the file tree browser (instead of the file list) in the future.

Questions to answer

  • Do users prefer navigating with the file tree browser, or the file list?
  • Do users prefer to Filter with the file tree browser, or use the Find file button?
  • Are users actually using keyboard shortcuts to interact with the file tree browser? #545036 (closed)
  • How much are users interacting with the file tree browser vs. interacting with the file list?

Suggested metrics

File tree browser

  • Number of clicks to open the file tree browser
  • Number of clicks to close the file tree browser
  • Number of clicks inside the file tree browser
  • Number of clicks in the Filter bar
  • Number of clicks of the Find file button
    • Tracked with click_find_file_button_on_repository_pages event
  • Number of times users click the shortcuts for the file tree browser #545036 (closed)
    • f will always open file browser and focus the search field
    • shift+f will only toggle file browser visibility

File list

  • Number of clicks inside the old file list
Edited by Alyssa Trinh