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:

image

And at group context:

image

How to set up and validate locally

  1. Check the branch out.
  2. Set up Snowplow Micro. I don't know why you'd want to change it to port 9092 and I did not do that.
  3. Run bin/rails runner scripts/internal_events/monitor.rb click_new_wiki_page_in_create_menu once you're all configured. I had to manually edit config/gitlab.yml after gdk reconfigure because I use gdk.test with 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 on localhost!
  4. Click on "New wiki page" both from a group and project context.
  5. You should see events appear! This is cool!
    image

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.

Merge request reports

Loading