Skip to content

Commit

Permalink
Add additional guide page scroll tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
gclssvglx committed May 26, 2022
1 parent f026106 commit bfd1830
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/views/content_items/guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,17 @@
"/driving-abroad/international-driving-permit",
"/taking-goods-out-uk-temporarily/get-an-ata-carnet",
]
scroll_track_percent_paths = [
"/skilled-worker-visa",
"/apply-to-come-to-the-uk",
]

full_url = [@content_item.base_path, @content_item.part_slug].compact.join('/')
%>
<% if scroll_track_headings_paths.include?(full_url) %>
<meta name="govuk:scroll-tracker" content="" data-module="auto-scroll-tracker" data-track-type="headings"/>
<% elsif scroll_track_percent_paths.include?(@content_item.base_path) %>
<meta name="govuk:scroll-tracker" content="" data-module="auto-scroll-tracker"/>
<% end %>
<% end %>

Expand Down

0 comments on commit bfd1830

Please sign in to comment.