From c7c3a967ebe3df5c5ef1ab386dc45334e8862e62 Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Thu, 21 Sep 2023 09:24:18 +0100 Subject: [PATCH] Restore missing GA4 attributes - tracking for the option select component in finders depends upon some JS to set the right attributes - this wasn't working properly owing to the migration of the component, this fixes that --- .../finders/_option_select_facet.html.erb | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/app/views/finders/_option_select_facet.html.erb b/app/views/finders/_option_select_facet.html.erb index ba45a803a..4540c4544 100644 --- a/app/views/finders/_option_select_facet.html.erb +++ b/app/views/finders/_option_select_facet.html.erb @@ -1,14 +1,15 @@ <% cache_if option_select_facet.cacheable?, option_select_facet.cache_key do %> - <%= render partial: 'govuk_publishing_components/components/option_select', locals: { - :key => option_select_facet.key, - :title => option_select_facet.name, - :aria_controls_id => "js-search-results-info", - :options_container_id => option_select_facet.key, - :options => option_select_facet.options("js-search-results-info", option_select_facet.key), - :closed_on_load => option_select_facet.closed_on_load?(option_select_facet_counter), - :closed_on_load_mobile => option_select_facet.closed_on_load_mobile?, - :show_filter => option_select_facet.show_option_select_filter, - :large => option_select_facet.large? - } - %> +
+ <%= render partial: 'govuk_publishing_components/components/option_select', locals: { + :key => option_select_facet.key, + :title => option_select_facet.name, + :aria_controls_id => "js-search-results-info", + :options_container_id => option_select_facet.key, + :options => option_select_facet.options("js-search-results-info", option_select_facet.key), + :closed_on_load => option_select_facet.closed_on_load?(option_select_facet_counter), + :closed_on_load_mobile => option_select_facet.closed_on_load_mobile?, + :show_filter => option_select_facet.show_option_select_filter, + :large => option_select_facet.large? + } %> +
<% end %>