Skip to content

Commit

Permalink
Merge pull request #3720 from alphagov/ga4-search-signin
Browse files Browse the repository at this point in the history
Add GA4 tracking to search on sign in page
  • Loading branch information
andysellick authored Aug 15, 2023
2 parents bb59df5 + 5902b14 commit b6f5c48
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/views/help/sign_in.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@

<p class="govuk-body"><%= t('help.sign_in.service_not_listed_text') %></p>

<form action="/search/all" method="GET" role="search">
<form
action="/search/all"
method="GET"
role="search"
data-module="ga4-form-tracker"
data-ga4-form="<%= { event_name: 'search', type: 'content', url: '/search/all', section: t('help.sign_in.service_not_listed_heading', locale: :en), action: 'search' }.to_json %>"
data-ga4-form-include-text
>
<% @search_services_facets.each do |facet| %>
<input type="hidden" name="<%= facet[:key] %>" value="<%= facet[:value] %>">
<% end %>
Expand Down

0 comments on commit b6f5c48

Please sign in to comment.