From 69c8f15e25659c459d29f3cc45cbca815756c7ae Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Mon, 26 Jun 2023 16:22:19 +0100 Subject: [PATCH] Add GA4 to licence not online page --- .../licence/_licensify_unavailable.html.erb | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/app/views/licence/_licensify_unavailable.html.erb b/app/views/licence/_licensify_unavailable.html.erb index f76772e557..a0b1812155 100644 --- a/app/views/licence/_licensify_unavailable.html.erb +++ b/app/views/licence/_licensify_unavailable.html.erb @@ -1,3 +1,16 @@ -<%= render "govuk_publishing_components/components/warning_text", { - text: sanitize("You cannot apply for this licence online. #{link_to('Contact your local council', '/find-local-council', class: "govuk-link")}.") -} %> +<% + ga4_attributes = { + event_name: "form complete", + type: "licence", + text: "You cannot apply for this licence online", + action: "complete", + tool_name: publication.title, + }.to_json +%> +
+ <%= render "govuk_publishing_components/components/warning_text", { + text: sanitize("You cannot apply for this licence online. #{link_to('Contact your local council', '/find-local-council', class: "govuk-link")}.") + } %> +