Allow users to connect their own Product Analytics stack at the project-level

Based on findings from the spike investigation, we should be able to build out integration points to connect separate Product Analytics stacks at the project-level.

Implementation

Current uses of instance settings for product analytics

Notes on usage

  • Common use cases "are product analytics enabled?" and "are product analytics configured?"
  • Logic for this is not centralized

Plan

  • Create ProductAnalytics::Settings class to centralize configuration logic
    • Have accessors for enabled? and configured?
    • Check ProjectSettings if a project is provided, otherwise check instance settings
  • Add settings to ProjectSettings for project-level product analytics
  • Add project settings UI for configuration of project-level settings
  • Modify backend usage to use new ProductAnalytics::Settings class instead of Gitlab::CurrentSettings
Edited by Dennis Tang