Skip to content

Commit

Permalink
Merge pull request #2993 from alphagov/remove-old-ga4-code
Browse files Browse the repository at this point in the history
Remove old GA4 code
  • Loading branch information
AshGDS authored Nov 20, 2023
2 parents 6d70c74 + c75d1c6 commit 4cad974
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 4cad974

Please sign in to comment.