diff options
Diffstat (limited to 'doc/development/navigation_sidebar.md')
-rw-r--r-- | doc/development/navigation_sidebar.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/development/navigation_sidebar.md b/doc/development/navigation_sidebar.md index 495f30a796c..90b87e9518d 100644 --- a/doc/development/navigation_sidebar.md +++ b/doc/development/navigation_sidebar.md @@ -20,6 +20,10 @@ To enable the new navigation sidebar: - Enable the `super_sidebar_nav` feature flag. - Select your avatar, then turn on the **New navigation** toggle. +## Adding items to the sidebar + +Before adding an item to the sidebar, ensure you follow [this process](https://about.gitlab.com/handbook/product/ux/navigation/#how-to-propose-a-change-that-impacts-navigation). + ## Adding page-specific Vue content Pages can render arbitrary content into the sidebar using the `SidebarPortal` @@ -36,3 +40,16 @@ subclassing `::Sidebars::Panel`. NOTE: Do not use the `SidebarPortalTarget` component. It is internal to the sidebar. + +## Snowplow Tracking + +All clicks on the nav items should be automatically tracked in Snowplow, but may require additional input. +We use `data-tracking` attributes on all the elements in the nav to send the data up to Snowplow. +You can test that they're working by [setting up snowplow on your GDK](https://gitlab.com/gitlab-org/gitlab-development-kit/-/blob/main/doc/howto/snowplow_micro.md). + +| Field | Data attribute | Notes | Example | +| -- | -- | -- | -- | +| Category | `data-tracking-category` | The page that the user was on when the item was clicked. | `groups:show` | +| Action | `data-tracking-action` | The action taken. In most cases this is `click_link` or `click_menu_item` | `click_link` | +| Label | `data-tracking-label` | A descriptor for what was clicked on. This is inferred by the ID of the item in most cases, but falls back to `item_without_id`. This is one to look out for. | `group_issue_list` | +| Property | `data-tracking-property` | This describes where in the nav the link was clicked. If it's in the main nav panel, then it needs to describe which panel. | `nav_panel_group` | |