Skip to content

Commit 9ed8211

Browse files
committed
Update view to
- enable GA4 on `accordion` component - add `data-attributes` to "Add new chapter" link
1 parent 88dd9be commit 9ed8211

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

app/views/editions/secondary_nav_tabs/edit/editable/_guide.html.erb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
secondary_solid: true,
1010
href: new_edition_guide_part_path(edition),
1111
margin_bottom: 6,
12+
data_attributes: {
13+
module: "ga4-link-tracker",
14+
ga4_link: '{ "event_name": "navigation", "type": "accordion", "index_link": 1, "index_section": 1, "index_section_count": 1 }',
15+
},
1216
} %>
1317

1418
<%= render "govuk_publishing_components/components/radio", {

app/views/editions/secondary_nav_tabs/edit/editable/components/_guide_chapter_list.html.erb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
<% if edition.parts.presence %>
99
<%= render "govuk_publishing_components/components/accordion", {
10-
disable_ga4: true,
1110
heading_level: 4,
1211
items: edition.parts.sort_by(&:order).map do |part|
1312
{

0 commit comments

Comments
 (0)