From f296a074c2a4bd192e68b6c2f003a69eea6a9fe3 Mon Sep 17 00:00:00 2001 From: Alex Gibson Date: Fri, 26 Jul 2024 11:01:13 +0100 Subject: [PATCH] Remove VPN headline experiment code (Fixes #14721) --- .../products/vpn/landing-refresh.html | 25 -------- bedrock/products/views.py | 4 +- .../vpn/landing-experiment-headlines.es6.js | 64 ------------------- media/static-bundles.json | 6 -- 4 files changed, 2 insertions(+), 97 deletions(-) delete mode 100644 media/js/products/vpn/landing-experiment-headlines.es6.js diff --git a/bedrock/products/templates/products/vpn/landing-refresh.html b/bedrock/products/templates/products/vpn/landing-refresh.html index 5a5d3c1b366..30fd13666b9 100644 --- a/bedrock/products/templates/products/vpn/landing-refresh.html +++ b/bedrock/products/templates/products/vpn/landing-refresh.html @@ -32,12 +32,6 @@ {% set _utm_campaign = 'vpn-product-page' %} {% set _params = '?utm_source=' ~ _utm_source ~ '&utm_medium=referral&utm_campaign=' ~ _utm_campaign %} -{% block experiments %} - {% if switch('experiment-vpn-headlines', ['en-US', 'en-CA', 'en-GB', 'fr', 'de']) %} - {{ js_bundle('mozilla-vpn-landing-headlines-experiment') }} - {% endif %} -{% endblock %} - {% block page_css %} {{ css_bundle('protocol-split') }} {{ css_bundle('protocol-picto')}} @@ -51,17 +45,6 @@ {% endwith %} {% endblock %} -{% if LANG == "de" %} - {% set headline_exp_v2_sub = 'Schalte den Rundumschutz für Webaktivitäten und Standort vor Hackern und Trackern ein.' %} - {% set headline_exp_v3_sub = 'Schütze deine Online-Aktivitäten und deinen Standort mit nur einem Klick.' %} -{% elif LANG == "fr" %} - {% set headline_exp_v2_sub = 'Masquez intégralement vos activités sur le Web et votre emplacement aux yeux des hackers et des traqueurs.' %} - {% set headline_exp_v3_sub = 'Protégez vos activités numériques et votre emplacement en un seul clic.' %} -{% else %} - {% set headline_exp_v2_sub = 'Switch on complete web activity and location protection from hackers and trackers.' %} - {% set headline_exp_v3_sub = 'Protect your digital activity and physical location with just one click.' %} -{% endif %} - {% block content %}
{% call split( @@ -87,15 +70,7 @@ media_class='mzp-l-split-h-center', media_after=True ) %} - {% if entrypoint_experiment == 'vpn-headlines' and entrypoint_variation == '2' %} -

{{ ftl('vpn-landing-powerful-privacy-for-peace') }}

-

{{ headline_exp_v2_sub }}

- {% elif entrypoint_experiment == 'vpn-headlines' and entrypoint_variation == '3' %} -

Mozilla VPN

-

{{ headline_exp_v3_sub }}

- {% else %}

{{ ftl('vpn-landing-powerful-privacy-for-peace') }}

- {% endif %} {% if vpn_available %}

diff --git a/bedrock/products/views.py b/bedrock/products/views.py index 5c5d0c9b9e9..8b5cc916e25 100644 --- a/bedrock/products/views.py +++ b/bedrock/products/views.py @@ -57,10 +57,10 @@ def vpn_landing_page(request): entrypoint_variation = request.GET.get("entrypoint_variation", None) # ensure experiment parameters matches pre-defined values - if entrypoint_variation not in ["1", "2", "3"]: + if entrypoint_variation not in []: entrypoint_variation = None - if entrypoint_experiment not in ["vpn-headlines"]: + if entrypoint_experiment not in []: entrypoint_experiment = None if ftl_file_is_active("products/vpn/landing-2023") and experience != "legacy": diff --git a/media/js/products/vpn/landing-experiment-headlines.es6.js b/media/js/products/vpn/landing-experiment-headlines.es6.js deleted file mode 100644 index db993685a03..00000000000 --- a/media/js/products/vpn/landing-experiment-headlines.es6.js +++ /dev/null @@ -1,64 +0,0 @@ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ - -import TrafficCop from '@mozmeao/trafficcop'; -import { isApprovedToRun } from '../../base/experiment-utils.es6.js'; - -const href = window.location.href; - -const initTrafficCop = () => { - if (href.indexOf('entrypoint_variation=1') !== -1) { - // UA - window.dataLayer.push({ - 'data-ex-variant': 'vpn-headline-v1', - 'data-ex-name': 'vpn-landing-headlines-test' - }); - // GA4 - window.dataLayer.push({ - event: 'experiment_view', - id: 'vpn-landing-headlines-test', - variant: 'vpn-headline-v1' - }); - } else if (href.indexOf('entrypoint_variation=2') !== -1) { - // UA - window.dataLayer.push({ - 'data-ex-variant': 'vpn-headline-v2', - 'data-ex-name': 'vpn-landing-headlines-test' - }); - // GA4 - window.dataLayer.push({ - event: 'experiment_view', - id: 'vpn-landing-headlines-test', - variant: 'vpn-headline-v2' - }); - } else if (href.indexOf('entrypoint_variation=3') !== -1) { - // UA - window.dataLayer.push({ - 'data-ex-variant': 'vpn-headline-v3', - 'data-ex-name': 'vpn-landing-headlines-test' - }); - // GA4 - window.dataLayer.push({ - event: 'experiment_view', - id: 'vpn-landing-headlines-test', - variant: 'vpn-headline-v3' - }); - } else if (TrafficCop) { - // Avoid entering automated tests into random experiments. - if (isApprovedToRun()) { - const fife = new TrafficCop({ - variations: { - 'entrypoint_experiment=vpn-headlines&entrypoint_variation=1': 33, // control - 'entrypoint_experiment=vpn-headlines&entrypoint_variation=2': 33, // v2 - 'entrypoint_experiment=vpn-headlines&entrypoint_variation=3': 33 // v3 - } - }); - fife.init(); - } - } -}; - -initTrafficCop(); diff --git a/media/static-bundles.json b/media/static-bundles.json index 004e49d939c..fd89d2ecbd2 100644 --- a/media/static-bundles.json +++ b/media/static-bundles.json @@ -1768,12 +1768,6 @@ ], "name": "mozilla-vpn-landing" }, - { - "files": [ - "js/products/vpn/landing-experiment-headlines.es6.js" - ], - "name": "mozilla-vpn-landing-headlines-experiment" - }, { "files": [ "js/products/shared/affiliate-init.es6.js"