Skip to content

Commit

Permalink
Merge pull request #2976 from alphagov/remove-scroll-tracking
Browse files Browse the repository at this point in the history
Remove scroll tracking
  • Loading branch information
andysellick authored Nov 1, 2023
2 parents 12397f7 + e773bf2 commit 94620cb
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions app/views/content_items/guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,13 @@
"/apply-to-come-to-the-uk",
]

ga4_scroll_track_headings_paths = [
"/skilled-worker-visa/your-partner-and-children",
"/penalty-points-endorsements/endorsement-codes-and-penalty-points",
"/universal-credit/other-financial-support",
]

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 %>

<% if ga4_scroll_track_headings_paths.include?(full_url) %>
<meta name="govuk:scroll-tracker" content="" data-module="ga4-scroll-tracker" data-ga4-track-type="headings"/>
<% end %>
<% end %>

<% unless @content_item.requesting_a_part? %>
Expand Down

0 comments on commit 94620cb

Please sign in to comment.