From c75d1c62b14e346a8474392393c113c9d7d4d9b7 Mon Sep 17 00:00:00 2001 From: AshGDS <8880610+AshGDS@users.noreply.github.com> Date: Fri, 17 Nov 2023 14:48:38 +0000 Subject: [PATCH] Remove old GA4 code This is no longer needed, the GA4 data attributes are handled within the component --- app/presenters/service_manual_topic_presenter.rb | 11 +---------- .../presenters/service_manual_topic_presenter_test.rb | 9 --------- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/app/presenters/service_manual_topic_presenter.rb b/app/presenters/service_manual_topic_presenter.rb index 7162579ec..c7c327475 100644 --- a/app/presenters/service_manual_topic_presenter.rb +++ b/app/presenters/service_manual_topic_presenter.rb @@ -50,17 +50,8 @@ def accordion_content # This method returns the content in the required shape from the hash # supplied by the `groups` method. - groups.each.with_index(1).map do |section, index| + groups.each.map do |section| { - data_attributes: { - ga4: { - event_name: "select_content", - type: "accordion", - text: section.name, - index:, - index_total: groups.length, - }, - }, heading: { text: section.name, }, diff --git a/test/presenters/service_manual_topic_presenter_test.rb b/test/presenters/service_manual_topic_presenter_test.rb index f4759258f..fc70dcd9b 100644 --- a/test/presenters/service_manual_topic_presenter_test.rb +++ b/test/presenters/service_manual_topic_presenter_test.rb @@ -33,15 +33,6 @@ def schema_name test "returns accordion content data" do accordion_content = presented_item.accordion_content first_accordion_section = { - data_attributes: { - ga4: { - event_name: "select_content", - type: "accordion", - text: "Group 1", - index: 1, - index_total: 2, - }, - }, heading: { text: "Group 1" }, summary: { text: "The first group" }, content: { html: "" },