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 2125111
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
9 changes: 0 additions & 9 deletions app/presenters/service_manual_topic_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,6 @@ def accordion_content

groups.each.with_index(1).map do |section, index|

Check failure on line 53 in app/presenters/service_manual_topic_presenter.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Lint/UnusedBlockArgument: Unused block argument - `index`. If it's necessary, use `_` or `_index` as an argument name to indicate that it won't be used. (https://rubystyle.guide#underscore-unused-vars)
{
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 2125111

Please sign in to comment.