2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-11-24 15:15:51 +05:30
|
|
|
class Admin::CohortsController < Admin::ApplicationController
|
2022-10-11 01:57:18 +05:30
|
|
|
include ProductAnalyticsTracking
|
2021-09-04 01:27:46 +05:30
|
|
|
|
2021-02-22 17:27:13 +05:30
|
|
|
feature_category :devops_reports
|
2021-01-03 14:25:43 +05:30
|
|
|
|
2022-05-07 20:08:51 +05:30
|
|
|
urgency :low
|
|
|
|
|
2022-10-11 01:57:18 +05:30
|
|
|
track_custom_event :index,
|
|
|
|
name: 'i_analytics_cohorts',
|
|
|
|
action: 'perform_analytics_usage_action',
|
|
|
|
label: 'redis_hll_counters.analytics.analytics_total_unique_counts_monthly',
|
|
|
|
destinations: %i[redis_hll snowplow]
|
|
|
|
|
2017-08-17 22:00:37 +05:30
|
|
|
def index
|
2021-09-04 01:27:46 +05:30
|
|
|
@cohorts = load_cohorts
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def load_cohorts
|
|
|
|
cohorts_results = Rails.cache.fetch('cohorts', expires_in: 1.day) do
|
|
|
|
CohortsService.new.execute
|
|
|
|
end
|
|
|
|
|
|
|
|
CohortsSerializer.new.represent(cohorts_results)
|
|
|
|
end
|
|
|
|
|
2022-10-11 01:57:18 +05:30
|
|
|
def tracking_namespace_source
|
|
|
|
nil
|
|
|
|
end
|
|
|
|
|
|
|
|
def tracking_project_source
|
|
|
|
nil
|
2017-08-17 22:00:37 +05:30
|
|
|
end
|
|
|
|
end
|