From ca58c43fe81076294452560efc316585aae5115b Mon Sep 17 00:00:00 2001 From: Graham Lewis <44037625+gclssvglx@users.noreply.github.com> Date: Thu, 15 Sep 2022 10:46:55 +0100 Subject: [PATCH] Accordions not working on manual pages --- app/views/content_items/manual_section.html.erb | 4 +++- app/views/content_items/manuals/_updates.html.erb | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/content_items/manual_section.html.erb b/app/views/content_items/manual_section.html.erb index 9f0dc9767..dd3e0031d 100644 --- a/app/views/content_items/manual_section.html.erb +++ b/app/views/content_items/manual_section.html.erb @@ -61,7 +61,6 @@ { data_attributes: { - module: "ga4-event-tracker", ga4: { event_name: "select_content", type: "accordion", @@ -90,6 +89,9 @@ data_attributes_show_all: { "ga4": ga4_attributes.to_json }, + data_attributes: { + module: "ga4-event-tracker", + }, anchor_navigation: true, items: items, } %> diff --git a/app/views/content_items/manuals/_updates.html.erb b/app/views/content_items/manuals/_updates.html.erb index 75f533b5f..5183d99d0 100644 --- a/app/views/content_items/manuals/_updates.html.erb +++ b/app/views/content_items/manuals/_updates.html.erb @@ -28,6 +28,9 @@ %> <%= render "govuk_publishing_components/components/accordion", { heading_level: 3, + data_attributes: { + module: "ga4-event-tracker", + }, data_attributes_show_all: { "ga4": show_all_attributes.to_json }, @@ -46,7 +49,6 @@ <% end { data_attributes: { - module: "ga4-event-tracker", ga4: { event_name: 'select_content', type: 'accordion',