Skip to content

Commit

Permalink
Merge pull request #3923 from alphagov/header-menu-ga4-indexes
Browse files Browse the repository at this point in the history
Change navigation header GA4 indexes
  • Loading branch information
andysellick authored Mar 15, 2024
2 parents bb285e7 + 03f5ae4 commit 03f8ba1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@
"type": "header menu bar",
"index_section": column_index + 1,
"index_link": index + 1,
"index_section_count": 4,
"index_section_count": 3,
"index_total": index_total,
"section": column[:label],
}
Expand All @@ -343,7 +343,7 @@
id: "super-search-menu",
hidden: "",
class: dropdown_menu_classes,
}) do %>
}) do %>
<div class="govuk-width-container gem-c-layout-super-navigation-header__search-container gem-c-layout-super-navigation-header__search-items">
<h3 class="govuk-visually-hidden">
<%= navigation_search_subheading %>
Expand Down
8 changes: 4 additions & 4 deletions spec/components/layout_super_navigation_header_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ def component_name
assert_select "header[data-module='gem-track-click ga4-event-tracker ga4-link-tracker']"
assert_select "a[data-ga4-link]", count: 23
assert_select 'a[data-ga4-link=\'{"event_name":"navigation","type":"header menu bar","external":"false","text":"GOV.UK","section":"Logo","index_link":1,"index_section":0,"index_section_count":2,"index_total":1}\']'
assert_select 'a[data-ga4-link=\'{"event_name":"navigation","type":"header menu bar","index_section":1,"index_link":1,"index_section_count":4,"index_total":16,"section":"Services and information"}\']'
assert_select 'a[data-ga4-link=\'{"event_name":"navigation","type":"header menu bar","index_section":1,"index_link":16,"index_section_count":4,"index_total":16,"section":"Services and information"}\']'
assert_select 'a[data-ga4-link=\'{"event_name":"navigation","type":"header menu bar","index_section":2,"index_link":1,"index_section_count":4,"index_total":6,"section":"Government activity"}\']'
assert_select 'a[data-ga4-link=\'{"event_name":"navigation","type":"header menu bar","index_section":2,"index_link":6,"index_section_count":4,"index_total":6,"section":"Government activity"}\']'
assert_select 'a[data-ga4-link=\'{"event_name":"navigation","type":"header menu bar","index_section":1,"index_link":1,"index_section_count":3,"index_total":16,"section":"Services and information"}\']'
assert_select 'a[data-ga4-link=\'{"event_name":"navigation","type":"header menu bar","index_section":1,"index_link":16,"index_section_count":3,"index_total":16,"section":"Services and information"}\']'
assert_select 'a[data-ga4-link=\'{"event_name":"navigation","type":"header menu bar","index_section":2,"index_link":1,"index_section_count":3,"index_total":6,"section":"Government activity"}\']'
assert_select 'a[data-ga4-link=\'{"event_name":"navigation","type":"header menu bar","index_section":2,"index_link":6,"index_section_count":3,"index_total":6,"section":"Government activity"}\']'
end
end

0 comments on commit 03f8ba1

Please sign in to comment.