diff --git a/app/views/shared/_ga4.html.erb b/app/views/shared/_ga4.html.erb index a533dd4e2..b4959c807 100644 --- a/app/views/shared/_ga4.html.erb +++ b/app/views/shared/_ga4.html.erb @@ -1,6 +1,7 @@ <%# OVERRIDE Hyrax 3.5.0 to handle multitenancy %> -<% ids = [Settings.google_analytics_id, current_account.google_analytics_id].compact.reject(&:empty?).uniq %> +<% tenant_ga_id = current_account.google_analytics_id if current_account.id %> +<% ids = [Settings.google_analytics_id, tenant_ga_id].compact.reject(&:empty?).uniq %>