diff --git a/CHANGELOG.md b/CHANGELOG.md index 72c7d87d1b..10131cf857 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ ## Unreleased +* Change GA4 contents list type ([PR #3635](https://github.com/alphagov/govuk_publishing_components/pull/3635)) * Change prev and next GA4 type ([PR #3631](https://github.com/alphagov/govuk_publishing_components/pull/3631)) * Remove timestamps from GA4 video urls ([PR #3632](https://github.com/alphagov/govuk_publishing_components/pull/3632)) * Add stylistic plugin for stylelint ([PR #3629](https://github.com/alphagov/govuk_publishing_components/pull/3629)) diff --git a/app/views/govuk_publishing_components/components/_contents_list.html.erb b/app/views/govuk_publishing_components/components/_contents_list.html.erb index a02092df8d..4e8f98e30e 100644 --- a/app/views/govuk_publishing_components/components/_contents_list.html.erb +++ b/app/views/govuk_publishing_components/components/_contents_list.html.erb @@ -15,7 +15,7 @@ ga4_tracking ||= false ga4_data = { event_name: "navigation", - type: "content", + type: "contents list", section: t("components.contents_list.contents", locale: :en) || "" } if ga4_tracking local_assigns[:aria] ||= {} diff --git a/spec/components/contents_list_spec.rb b/spec/components/contents_list_spec.rb index b0f2d4533c..8e5769eeba 100644 --- a/spec/components/contents_list_spec.rb +++ b/spec/components/contents_list_spec.rb @@ -130,7 +130,7 @@ def assert_tracking_link(name, value, total = 1) expected_ga4_json = { event_name: "navigation", - type: "content", + type: "contents list", section: "Contents", }