Skip to content

Put product analytics toggle behind a FF

What does this MR do and why?

The product analytics features are currently behind feature flags such as product_analytics_dashboards, product_analytics_admin_settings, etc. In addition, users need to enable a checkbox in the group setting page titled Enable product analytics.

In order to prevent this optin in case something goes wrong during beta release, the toggle should be behind it's own feature flag. This MR introduces this.

Feature flag name: product_analytics_beta_optin Rollout issue: #433344 (closed)

Screenshots or screen recordings

feature flag product analytics checkbox value checkbox visibility project level product analytics settings visibility builtin dashboards / onboarding visibility
disabled disabled Product analytics section is hidden Screenshot_2023-12-05_at_15.15.51 Data sources section is hidden Screenshot_2023-12-05_at_15.15.14 Audience and behavior dashboards not listed Screenshot_2023-12-05_at_15.14.32
disabled enabled Product analytics section is hidden Screenshot_2023-12-05_at_15.15.51 Data sources section is hidden Screenshot_2023-12-05_at_15.15.14 Audience and behavior dashboards not listed Screenshot_2023-12-05_at_15.14.32
enabled disabled Product analytics section is visibleScreenshot_2023-12-05_at_15.18.25 Data sources section is hidden Screenshot_2023-12-05_at_15.15.14 Audience and behavior dashboards not listed Screenshot_2023-12-05_at_15.14.32
enabled enabled Product analytics section is visible Screenshot_2023-12-05_at_15.19.10 Data sources section is visible Screenshot_2023-12-05_at_15.19.22 Audience and behavior dashboard listed Screenshot_2023-12-05_at_15.19.31

How to set up and validate locally

  1. In rails console enable the experiment fully
    Feature.enable(:product_analytics_beta_optin)
  2. Visit a root group settings page
  3. You should be able to see and enable product analytics checkbox
  4. You should be able to set up and view product analytics dashboards in a project belonging to this group
  5. In rails console enable the experiment fully
    Feature.disable(:product_analytics_beta_optin)
  6. You should not be able to see and enable product analytics checkbox
  7. You should not be able to set up and view product analytics dashboards in a project belonging to this group

MR acceptance checklist

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

Related to #433300 (closed)

Edited by Halil Coban

Merge request reports