From 1b896886201898622e25a22f5e565e530090ea5d Mon Sep 17 00:00:00 2001 From: AshGDS <8880610+AshGDS@users.noreply.github.com> Date: Thu, 28 Sep 2023 12:00:13 +0100 Subject: [PATCH] Change GA4 type from 'content' to 'print page' on print links --- app/views/content_items/guide.html.erb | 2 +- app/views/content_items/travel_advice.html.erb | 2 +- test/integration/guide_test.rb | 2 +- test/integration/travel_advice_test.rb | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/content_items/guide.html.erb b/app/views/content_items/guide.html.erb index 67529f133..27fdb0ee2 100644 --- a/app/views/content_items/guide.html.erb +++ b/app/views/content_items/guide.html.erb @@ -95,7 +95,7 @@ data-module="ga4-link-tracker" data-ga4-link="<%= { event_name: "navigation", - type: "content", + type: "print page", section: "Footer", text: t("multi_page.print_entire_guide", locale: :en) }.to_json %>"> diff --git a/app/views/content_items/travel_advice.html.erb b/app/views/content_items/travel_advice.html.erb index e2f211a62..af7885bc3 100644 --- a/app/views/content_items/travel_advice.html.erb +++ b/app/views/content_items/travel_advice.html.erb @@ -66,7 +66,7 @@ data-module="ga4-link-tracker" data-ga4-link="<%= { event_name: "navigation", - type: "content", + type: "print page", section: "Footer", text: t("multi_page.print_entire_guide", locale: :en) }.to_json %>"><%= t("multi_page.print_entire_guide") %> diff --git a/test/integration/guide_test.rb b/test/integration/guide_test.rb index 097d4895a..38086ed88 100644 --- a/test/integration/guide_test.rb +++ b/test/integration/guide_test.rb @@ -174,7 +174,7 @@ class GuideTest < ActionDispatch::IntegrationTest expected_ga4_json = { event_name: "navigation", - type: "content", + type: "print page", section: "Footer", text: "View a printable version of the whole guide", }.to_json diff --git a/test/integration/travel_advice_test.rb b/test/integration/travel_advice_test.rb index bbcc8432b..1352b72c7 100644 --- a/test/integration/travel_advice_test.rb +++ b/test/integration/travel_advice_test.rb @@ -75,7 +75,7 @@ class TravelAdviceTest < ActionDispatch::IntegrationTest expected_ga4_json = { event_name: "navigation", - type: "content", + type: "print page", section: "Footer", text: "View a printable version of the whole guide", }.to_json