diff --git a/app/controllers/hyrax/admin/analytics/collection_reports_controller.rb b/app/controllers/hyrax/admin/analytics/collection_reports_controller.rb index d1f95a19a1..82744b3584 100644 --- a/app/controllers/hyrax/admin/analytics/collection_reports_controller.rb +++ b/app/controllers/hyrax/admin/analytics/collection_reports_controller.rb @@ -5,7 +5,7 @@ module Analytics class CollectionReportsController < AnalyticsController include Hyrax::BreadcrumbsForCollectionAnalytics def index - return unless Hyrax.config.analytics? + return unless Hyrax.config.analytics? && Hyrax.config.analytics_provider != 'ga4' @pageviews = Hyrax::Analytics.daily_events('collection-page-view') @work_page_views = Hyrax::Analytics.daily_events('work-in-collection-view') @@ -21,7 +21,7 @@ def index end def show - return unless Hyrax.config.analytics? + return unless Hyrax.config.analytics? && Hyrax.config.analytics_provider != 'ga4' @document = ::SolrDocument.find(params[:id]) @pageviews = Hyrax::Analytics.daily_events_for_id(@document.id, 'collection-page-view') @work_page_views = Hyrax::Analytics.daily_events_for_id(@document.id, 'work-in-collection-view') diff --git a/app/controllers/hyrax/admin/analytics/work_reports_controller.rb b/app/controllers/hyrax/admin/analytics/work_reports_controller.rb index 4e5306e36b..3ae9558061 100644 --- a/app/controllers/hyrax/admin/analytics/work_reports_controller.rb +++ b/app/controllers/hyrax/admin/analytics/work_reports_controller.rb @@ -6,7 +6,7 @@ class WorkReportsController < AnalyticsController include Hyrax::BreadcrumbsForWorksAnalytics def index - return unless Hyrax.config.analytics? + return unless Hyrax.config.analytics? && Hyrax.config.analytics_provider != 'ga4' @accessible_works ||= accessible_works @accessible_file_sets ||= accessible_file_sets diff --git a/app/views/hyrax/admin/analytics/collection_reports/index.html.erb b/app/views/hyrax/admin/analytics/collection_reports/index.html.erb index 2f48cb57e3..1fcd4b5474 100644 --- a/app/views/hyrax/admin/analytics/collection_reports/index.html.erb +++ b/app/views/hyrax/admin/analytics/collection_reports/index.html.erb @@ -8,7 +8,7 @@