Skip to content

Commit

Permalink
Merge pull request #3053 from alphagov/remove-scroll-tracking
Browse files Browse the repository at this point in the history
Remove scroll tracking
  • Loading branch information
andysellick authored Jan 22, 2024
2 parents deaab9f + c1973df commit 13c1cdb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 143 deletions.
19 changes: 0 additions & 19 deletions app/views/content_items/answer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,13 @@
scroll_track_percent_paths = [
"/get-coronavirus-test",
]
ga4_scroll_track_headings_paths = [
"/personal-tax-account",
"/log-in-file-self-assessment-tax-return",
"/benefits-calculators",
"/national-minimum-wage-rates",
"/order-coronavirus-rapid-lateral-flow-tests",
"/contact-hmrc",
"/dbs-update-service",
"/tax-free-childcare",
"/check-income-tax-current-year",
"/apply-apprenticeship",
"/report-covid19-result",
"/order-copy-birth-death-marriage-certificate",
"/global-health-insurance-card"
]
%>
<% if scroll_track_headings_paths.include?(@content_item.base_path) %>
<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?(@content_item.base_path) %>
<meta name="govuk:scroll-tracker" content="" data-module="ga4-scroll-tracker"/>
<% end %>

<%= @requested_variant.analytics_meta_tag.html_safe if @requested_variant.present? %>
<% end %>

Expand Down
124 changes: 0 additions & 124 deletions app/views/content_items/guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,126 +21,6 @@
"/apply-to-come-to-the-uk",
]

ga4_scroll_track_headings_paths = [
"/log-in-register-hmrc-online-services",
"/universal-credit",
"/pay-dartford-crossing-charge",
"/prove-right-to-work/get-a-share-code-online",
"/prove-right-to-work",
"/renew-adult-passport/renew",
"/change-address-driving-licence",
"/self-assessment-tax-returns",
"/vehicle-log-book",
"/income-tax-rates",
"/the-warm-home-discount-scheme",
"/winter-fuel-payment",
"/pay-self-assessment-tax-bill",
"/log-in-register-hmrc-online-services/register",
"/pip/how-much-youll-get",
"/help-with-childcare-costs",
"/pip/eligibility",
"/pension-credit",
"/child-maintenance-service",
"/child-benefit/how-to-claim",
"/carers-allowance",
"/photos-for-passports",
"/budgeting-help-benefits/how-to-apply",
"/update-uk-visas-immigration-account-details",
"/renew-adult-passport",
"/new-state-pension/what-youll-get",
"/get-a-passport-urgently",
"/power-of-attorney",
"/child-trust-funds/find-a-child-trust-fund",
"/student-finance",
"/apply-national-insurance-number/how-to-apply",
"/inheritance-tax",
"/child-benefit-tax-charge",
"/power-of-attorney/make-lasting-power",
"/prove-right-to-rent",
"/attendance-allowance/how-to-claim",
"/prove-right-to-rent/get-a-share-code-online",
"/new-state-pension",
"/self-assessment-tax-returns/sending-return",
"/limited-company-formation/register-your-company",
"/electoral-register",
"/biometric-residence-permits",
"/winter-fuel-payment/how-to-claim",
"/self-assessment-tax-returns/who-must-send-a-tax-return",
"/apply-national-insurance-number",
"/get-a-passport-urgently/1-week-fast-track-service",
"/life-in-the-uk-test",
"/jobseekers-allowance",
"/the-warm-home-discount-scheme/low-income-England-Wales",
"/cold-weather-payment",
"/pay-corporation-tax",
"/repaying-your-student-loan",
"/carers-allowance/how-to-claim",
"/attendance-allowance/eligibility",
"/national-insurance",
"/applying-for-probate",
"/contact-pension-service",
"/employment-support-allowance/eligibility",
"/holiday-entitlement-rights",
"/get-a-child-passport",
"/paye-online",
"/national-insurance/your-national-insurance-number",
"/get-a-passport-urgently/online-premium-service",
"/log-in-register-hmrc-online-services/problems-signing-in",
"/pay-vat",
"/jobseekers-allowance/eligibility",
"/tax-overpayments-and-underpayments/if-youre-due-a-refund",
"/help-with-childcare-costs/free-childcare-2-year-olds",
"/applying-for-probate/apply-for-probate",
"/pension-credit/how-to-claim",
"/report-changes-child-benefit",
"/tax-codes/how-to-update-your-tax-code",
"/get-help-savings-low-income",
"/disability-living-allowance-children",
"/jobseekers-allowance/apply-new-style-jsa",
"/change-name-deed-poll",
"/statutory-sick-pay/what-youll-get",
"/get-information-about-property-and-land/copies-of-deeds",
"/schools-admissions/how-to-apply",
"/financial-help-disabled",
"/redundancy-your-rights/redundancy-pay",
"/tax-overpayments-and-underpayments",
"/tax-codes/emergency-tax-codes",
"/access-to-work",
"/skilled-worker-visa/apply-from-outside-the-uk",
"/disability-living-allowance-children/how-to-claim",
"/statutory-sick-pay/eligibility",
"/health-conditions-and-driving",
"/tax-relief-for-employees/working-at-home",
"/vehicle-log-book/if-you-cannot-apply-online",
"/what-different-qualification-levels-mean/list-of-qualification-levels",
"/tb-test-visa",
"/apply-to-come-to-the-uk/prepare-your-application",
"/apply-citizenship-indefinite-leave-to-remain/how-to-apply",
"/child-car-seats-the-rules",
"/pip/change-of-circumstances",
"/child-benefit-tax-charge/pay-the-charge",
"/uk-visa-sponsorship-employers",
"/personalised-vehicle-registration-numbers",
"/renew-adult-passport/replace",
"/apply-boiler-upgrade-scheme/check-if-youre-eligible",
"/council-housing",
"/carers-allowance/effect-on-other-benefits",
"/income-tax",
"/voluntary-national-insurance-contributions",
"/inheritance-tax/passing-on-home",
"/repaying-your-student-loan/which-repayment-plan-you-are-on",
"/changing-passport-information",
"/change-circumstances-visa-brp",
"/standard-visitor",
"/apply-to-come-to-the-uk",
"/change-address-v5c",
"/pip",
"/skilled-worker-visa",
"/child-benefit",
"/vehicle-tax-rate-tables",
"/tax-codes"
]

full_url = [@content_item.base_path, @content_item.part_slug].compact.join('/')
%>
<% if scroll_track_headings_paths.include?(full_url) %>
Expand All @@ -149,10 +29,6 @@
<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"/>
<% end %>

<%= @requested_variant.analytics_meta_tag.html_safe if @requested_variant.present? %>
<% end %>

Expand Down

0 comments on commit 13c1cdb

Please sign in to comment.