Add snowplow tracking to menu item clicks
We need to add snowplow tracking to the new navigation to match the tracking on the old navigation.
The fields we need to send are, Category, Action, Label, and Property.
- Category: The page the user is currently on.
- Action: The action taken. For most of these, this will be
click_link - Label: What item was clicked on. This needs to match the label in the old navigation.
- Property: This will be defined in #388451 (closed)
E.g. clicking on the "Issues" link in the old navigation when on an MR page sends the following data:
Event Category : projects:merge_requests:show
Event Action : click_link
Event Label : issues_menu
Event Property : navigation_top
Doing the same with the new navigation should send:
Event Category : projects:merge_requests:show
Event Action : click_link
Event Label : issues_menu
Event Property : nav_project
You can test these using the Snowplow chrome extension.
Note: To test this locally, you will need to enable Snowplow in your GDK.
Edited by Sam Beckham