diff --git a/app/assets/stylesheets/components/_blue-box-campaign.scss b/app/assets/stylesheets/components/_blue-box-campaign.scss deleted file mode 100644 index 9153a2b27..000000000 --- a/app/assets/stylesheets/components/_blue-box-campaign.scss +++ /dev/null @@ -1,43 +0,0 @@ -.app-c-native-blue-box-campaign__container { - border-top: 1px solid $border-colour; - padding-top: 20px; -} - -.app-c-native-blue-box-campaign__link { - @include bold-24; - position: relative; - display: block; - background: $govuk-blue; - width: 100%; - min-height: 280px; - color: $white; - text-decoration: none; - text-align: left; - box-sizing: border-box; - padding: 15px; -} - -.app-c-native-blue-box-campaign__title { - display: block; - color: $white; - font-weight: bold; - - &:hover { - text-decoration: underline; - } -} - -.app-c-native-blue-box-campaign__description { - @include core-19; - display: block; - font-weight: normal; - padding: 10px 10px 10px 0; - color: $white; - position: absolute; - bottom: 10px; -} - -.app-c-native-blue-box-campaign__link:focus .app-c-native-blue-box-campaign__title, -.app-c-native-blue-box-campaign__link:focus .app-c-native-blue-box-campaign__description { - color: $black; -} diff --git a/app/assets/stylesheets/components/_native-campaign.scss b/app/assets/stylesheets/components/_native-campaign.scss deleted file mode 100644 index c2590bc3d..000000000 --- a/app/assets/stylesheets/components/_native-campaign.scss +++ /dev/null @@ -1,31 +0,0 @@ -$dark-grey: #999; - -.app-c-native-campaign__container { - border-top: 1px solid $border-colour; - padding-top: 20px; -} - -.app-c-native-campaign__header { - @include core-14; - color: $dark-grey; - display: inline-block; - padding: 4px 6px 1px; - border: 1px solid $border-colour; - border-radius: 4px; -} - -.app-c-native-campaign__link { - margin-top: 15px; - display: block; - text-decoration: none; - @include bold-19; - - &:hover { - text-decoration: underline; - } -} - -.app-c-native-campaign__description { - @include core-14; - padding-top: 5px; -} diff --git a/app/controllers/concerns/contextual_comms_ab_testable.rb b/app/controllers/concerns/contextual_comms_ab_testable.rb deleted file mode 100644 index 3587386b8..000000000 --- a/app/controllers/concerns/contextual_comms_ab_testable.rb +++ /dev/null @@ -1,176 +0,0 @@ -module ContextualCommsAbTestable - GOOGLE_ANALYTICS_CUSTOM_DIMENSION = 70 - CAMPAIGN_DATA = { - get_in_go_far: { - title: "Get In Go Far", - description: "Search thousands of apprenticeships from great companies, with more added every day.", - link: "https://www.getingofar.gov.uk/", - }, - eating: { - title: "How healthy is your food?", - description: "Find out more about calories, the benefits of eating well and simple ways you can make a change.", - link: "https://www.nhs.uk/oneyou/eating", - }, - check_your_pay: { - title: "Check Your Pay", - description: "Are you being underpaid? Find out if your employer is giving you less than the legal minimum.", - link: "https://checkyourpay.campaign.gov.uk", - }, - your_pension: { - title: "Get to know your state pension", - description: "Get an online forecast to tell you how much you might get, and the earliest you can claim it.", - link: "https://www.yourpension.gov.uk/", - } - }.freeze - - def self.included(base) - base.helper_method( - :campaign_description, - :campaign_link, - :campaign_title, - :contextual_comms_test_variant, - :show_blue_box_campaign?, - :show_contextual_comms_campaign?, - :show_native_campaign?, - :whitelisted_campaign_page?, - ) - base.after_action :set_test_response_header - end - - def contextual_comms_test - @contextual_comms_test ||= GovukAbTesting::AbTest.new( - "ContextualComms", - dimension: GOOGLE_ANALYTICS_CUSTOM_DIMENSION, - allowed_variants: %w(NoCampaign BlueBoxCampaign NativeCampaign), - control_variant: "NoCampaign" - ) - end - - def contextual_comms_test_variant - @contextual_comms_test_variant ||= contextual_comms_test.requested_variant(request.headers) - end - - def set_test_response_header - contextual_comms_test_variant.configure_response(response) if whitelisted_campaign_page? - end - - def show_contextual_comms_campaign? - !contextual_comms_test_variant.variant?("NoCampaign") && whitelisted_campaign_page? - end - - def show_blue_box_campaign? - contextual_comms_test_variant.variant?("BlueBoxCampaign") - end - - def show_native_campaign? - contextual_comms_test_variant.variant?("NativeCampaign") - end - - def whitelisted_campaign_page? - campaign_name.present? - end - - def campaign_name - @campaign_name ||= - if EATING_PAGES.include?(content_item_path) - :eating - elsif CHECK_YOUR_PAY_PAGES.include?(content_item_path) - :check_your_pay - elsif YOUR_PENSION_PAGES.include?(content_item_path) - :your_pension - end - end - - def campaign_link - CAMPAIGN_DATA[campaign_name][:link] + - "?utm_source=#{content_item_path}" + - "&utm_content=#{contextual_comms_test_variant.variant_name}" + - "&utm_campaign=ukgov-promo&utm_medium=referral" - end - - def campaign_title - CAMPAIGN_DATA[campaign_name][:title] - end - - def campaign_description - CAMPAIGN_DATA[campaign_name][:description] - end - - GET_IN_GO_FAR_PAGES = %w( - /career-skills-and-training - /mature-student-university-funding - /higher-education-courses-find-and-apply - /what-different-qualification-levels-mean - /what-different-qualification-levels-mean/list-of-qualification-levels - /what-different-qualification-levels-mean/compare-different-qualification-levels - /further-education-courses - /improve-english-maths-it-skills - /further-education-courses - /further-education-courses/financial-help - /further-education-courses/find-a-course - /looking-for-work-if-disabled - /exoffenders-and-employment - ).freeze - - EATING_PAGES = %w( - /free-school-transport - /healthy-start - /healthy-start/eligibility - /healthy-start/how-to-claim - /healthy-start/what-youll-get - /help-with-childcare-costs - /help-with-childcare-costs/childcare-vouchers - /help-with-childcare-costs/free-childcare-2-year-olds - /help-with-childcare-costs/free-childcare-2-year-olds-benefits - /help-with-childcare-costs/free-childcare-and-education-for-2-to-4-year-olds - /help-with-childcare-costs/support-while-you-study - /help-with-childcare-costs/tax-credits - /help-with-childcare-costs/tax-free-childcare - /help-with-childcare-costs/universal-credit - /school-uniform - ).freeze - - CHECK_YOUR_PAY_PAGES = %w( - /pay-and-work-rights - /payslips - /report-cash-in-hand-pay - /student-jobs-paying-tax - /tips-at-work - /tips-at-work/tips-and-tax - /understanding-your-pay/deductions-from-your-pay - /understanding-your-pay/pay-calculations-if-you-work-shifts-or-get-bonuses - /understanding-your-pay/working-out-your-pay - /employment-contracts-and-conditions - /employment-contracts-and-conditions/collective-agreements - /employment-contracts-and-conditions/contract-terms - /employment-contracts-and-conditions/written-statement-of-employment-particulars - /employment-status - /employment-status/employee - /employment-status/worker - /flexible-working - /flexible-working/types-of-flexible-working - /maximum-weekly-working-hours - /maximum-weekly-working-hours/calculating-your-working-hours - /maximum-weekly-working-hours/weekly-maximum-working-hours-and-opting-out - /night-working-hours - /overtime-your-rights - /rest-breaks-work - /rest-breaks-work/compensatory-rest - /rest-breaks-work/exceptions - /rest-breaks-work/taking-breaks - /rest-breaks-work/young-workers - ).freeze - - YOUR_PENSION_PAGES = %w( - /armed-forces-pension-calculator - /personal-pensions-your-rights - /transferring-your-pension - /pension-types - /workplace-pensions - /employers-workplace-pensions-rules - /carers-credit - /national-insurance-credits - /voluntary-national-insurance-contributions - /plan-retirement-income - ).freeze -end diff --git a/app/controllers/content_items_controller.rb b/app/controllers/content_items_controller.rb index d0f97ff65..a27a37f02 100644 --- a/app/controllers/content_items_controller.rb +++ b/app/controllers/content_items_controller.rb @@ -1,5 +1,4 @@ class ContentItemsController < ApplicationController - include ContextualCommsAbTestable rescue_from GdsApi::HTTPForbidden, with: :error_403 rescue_from GdsApi::HTTPNotFound, with: :error_notfound diff --git a/app/views/components/_blue-box-campaign.html.erb b/app/views/components/_blue-box-campaign.html.erb deleted file mode 100644 index e367df548..000000000 --- a/app/views/components/_blue-box-campaign.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
diff --git a/app/views/components/_native-campaign.html.erb b/app/views/components/_native-campaign.html.erb deleted file mode 100644 index b0ab1c669..000000000 --- a/app/views/components/_native-campaign.html.erb +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 9ae1711ac..362150682 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -44,7 +44,6 @@ <% end %> - <%= contextual_comms_test_variant.analytics_meta_tag.html_safe if whitelisted_campaign_page? %> <%= yield :extra_head_content %> diff --git a/app/views/shared/_sidebar_navigation.html.erb b/app/views/shared/_sidebar_navigation.html.erb index 5dabffc12..887450c4e 100644 --- a/app/views/shared/_sidebar_navigation.html.erb +++ b/app/views/shared/_sidebar_navigation.html.erb @@ -1,12 +1,3 @@