Add Snowplow tracking to the create menu
We need to add snowplow tracking to the new create menu to match the tracking on the old create menu.
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 nav_create_menu
E.g. clicking on the "New Project/Repository" link in the old create menu when on an MR page sends the following data:
Event Category : projects:merge_requests:show
Event Action : click_link
Event Label : plus_menu_dropdown
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 : new_project
Event Property : nav_create_menu
You can test these using the Snowplow chrome extension.
Note: To test this locally, you will need to enable Snowplow in your GDK.
This can all be done with data attributes. See !115877 (merged) for an example.
Edited by Sam Beckham