Use internal event tracking for 'New wiki page' Create menu items
What does this MR do and why?
Fixes Fix the tracking events on the "New wiki item" ... (#593661 - closed) by adding "New wiki item"-specific tracking data.
The MR which added these menu items, Add "New wiki page" to super topbar (!225606 - merged), copied the existing structure for tracking … except, those data: attributes are not passed through whatsoever. We add the new Wiki tracking event in SidebarsHelper#create_new_menu_groups where it will actually make it to the rendered page.
I ummed and ahhed for a bit and figured I should remove the dead code, now that I'm looking at it and have spent the time to verify it's truly dead. There was a fair bit of related stuff which all could go.
Screenshots or screen recordings
Tracking attributes applied at project context:
And at group context:
How to set up and validate locally
- Check the branch out.
- Set up Snowplow Micro. I don't know why you'd want to change it to port 9092 and I did not do that.
- Run
bin/rails runner scripts/internal_events/monitor.rb click_new_wiki_page_in_create_menuonce you're all configured. I had to manually editconfig/gitlab.ymlaftergdk reconfigurebecause I usegdk.testwith a dedicated local IP for it, and GDK assumes your Snowplow Micro will be reachable on the same address as your GDK, but it won't! It'll be onlocalhost! - Click on "New wiki page" both from a group and project context.
- You should see events appear! This is cool!

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.


