Skip to content

Early Access Program tracking init

What does this MR do and why?

Creates some base product usage activity tracking mechanism for future GitLab Early Access program initiative.

Issue for more details.

Screenshots or screen recordings

Negative scenario 1

Example check for each existing user that didn't do anything:

Screenshot_2024-04-10_at_17.40.00

Negative scenario 2

Example check for each existing user that didn't do anything but feature flag is enabled:

Screenshot_2024-04-10_at_17.42.20

Positive scenario

Example check for user that participates in Early access program AND agreed on product usage data collection AND feature flag is enabled:

Screenshot_2024-04-10_at_17.43.32

How to set up and validate locally

Negative scenario 1

Example check for each existing user that didn't do anything:

  1. As signed in user go to some owned project page.
  2. On left-sidebar click on Code > Snippets > New snippet.
  3. Create snippet with any code you like.
  4. In rails console check that no tracking event created: EarlyAccessProgram::TrackingEvent.none? should return true.
Negative scenario 2

Example check for each existing user that didn't do anything but feature flag is enabled:

  1. In rails console enable feature flag for your user Feature.enable(:early_access_program, User.find(<your-id>))
  2. As signed in user go to some owned project page.
  3. On left-sidebar click on Code > Snippets > New snippet.
  4. Create snippet with any code you like. (optionally you can edit existing one)
  5. In rails console check that no tracking event created: EarlyAccessProgram::TrackingEvent.none? should return true.
Positive scenario

Example check for user that participates in Early access program AND agreed on product usage data collection AND feature flag is enabled:

  1. In rails console enable feature flag for your user Feature.enable(:early_access_program, User.find(<your-id>))
  2. In rails console mark your user as Early access program participant and agreed on product usage data collection by User.find(<your-id>).user_preference.update!(early_access_program_participant: true, early_access_program_tracking: true)
  3. As signed in user go to some owned project page.
  4. On left-sidebar click on Code > Snippets > New snippet.
  5. Create snippet with any code you like. (optionally you can edit existing one)
  6. In rails console check that no tracking event created: EarlyAccessProgram::TrackingEvent.none? should return false.
  7. See list of tracking events by typing EarlyAccessProgram::TrackingEvent.all in rails console.
Edited by Rostyslav Safonov

Merge request reports

Loading