Skip to content

Track unique visits to group VSD

Felipe Artur requested to merge issue_384010-add_unique_visits into master

What does this MR do and why?

Measure unique visits to group value stream dashboards

  • time_frame: monthly, weekly
  • name: analytics_unique_visits.g_metrics_comparison_page
  • both SaaS and self-manage

How to set up and validate locally

  1. Make sure you have an ultimate license
  2. Enable the feature flag with Feature.enable(:group_analytics_dashboards_page)
  3. Create a group and visit value streams dashboard page using the URL http://127.0.0.1:3000/groups/GROUP_PATH/-/analytics/dashboards/value_streams_dashboard
  4. Open rails console and use the following snippet to check if event got recorded:
# This should error out, but still creates a new 'RawUsageData' record
GitlabServicePingWorker.new.perform('triggered_from_cron' => false) 

result = RawUsageData.last
# Both should be > 0
result.payload['redis_hll_counters']['analytics']['g_metrics_comparison_page_weekly']
result.payload['redis_hll_counters']['analytics']['g_metrics_comparison_page_monthly']

MR acceptance checklist

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

Edited by Felipe Artur

Merge request reports