Skip to content

Commit

Permalink
Remove old GA4 code
Browse files Browse the repository at this point in the history
This is no longer needed, the GA4 data attributes are handled within the component
  • Loading branch information
AshGDS committed Nov 17, 2023
1 parent 6d70c74 commit c75d1c6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
11 changes: 1 addition & 10 deletions app/presenters/service_manual_topic_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
9 changes: 0 additions & 9 deletions test/presenters/service_manual_topic_presenter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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: "<ul class=\"govuk-list\">\n<li><a class=\"govuk-link\" href=\"/service-manual/user-centred-design/accessibility\">Accessibility</a></li>\n<li><a class=\"govuk-link\" href=\"/service-manual/user-centred-design/resources/patterns/addresses\">Addresses</a></li>\n</ul>" },
Expand Down

0 comments on commit c75d1c6

Please sign in to comment.