Skip to content

Add extra snowplow tracking metadata for gitlab team members

What does this MR do and why?

Sets extra.gitlab_team_member to a true/false value in all of our client-side snowplow structured events to allow us to segregate user tracking data among GitLab team members from those of non GitLab team members.

Screenshots or screen recordings

CleanShot_2023-02-06_at_16.19.01_2x

How to set up and validate locally

  1. Enable snowplow-micro in your local GDK
  2. Install the snowplow debugger in Google Chrome
  3. Visit any page on your local GDK and click on a nav menu item
  4. Observe the structured event context data contains a field called "gitlab_team_member" under "extra"

If you'd like to test the true condition of this field, you can manually alter the GITLAB_COM_GROUP_ID in /lib/feature_groups/gitlab_team_members.rb#L5 to a group ID in your local GDK. The ID can be seen easily in the main group page:

CleanShot_2023-02-06_at_16.26.37_2x

Keep in mind the list of group members within FeatureGroups::GitlabTeamMembers is cached for 1 hour, so you'll may need to break the cache manually to see the result.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports