From 0c5ad05f8474c8ee50d0f67fb885f91089cb7a4b Mon Sep 17 00:00:00 2001 From: Ilya Zarembsky Date: Thu, 1 Oct 2020 09:46:19 -0400 Subject: [PATCH 1/4] Remove t2 code from Metrics --- src/classes/Metrics.js | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/src/classes/Metrics.js b/src/classes/Metrics.js index 84c9c23c8..e9c9cd31b 100644 --- a/src/classes/Metrics.js +++ b/src/classes/Metrics.js @@ -296,11 +296,6 @@ class Metrics { // AB tests enabled? `&ts=${encodeURIComponent(conf.enable_abtests ? '1' : '0')}`; - if (conf.enable_abtests) { - // Hub Layout A/B test. Added in 8.5.3. GH-2097, GH-2100 - metrics_url += `&t2=${encodeURIComponent(Metrics._getHubLayoutView().toString())}`; - } - if (CAMPAIGN_METRICS.includes(type)) { // only send campaign attribution when necessary metrics_url += @@ -451,25 +446,6 @@ class Metrics { } } - /** - * Get the Int associated with the Hub layout view shown on install - * @private - * @return {number} Int associated with the Hub layout view - */ - static _getHubLayoutView() { - const { hub_layout } = conf; - - switch (hub_layout) { - case 'default': - return 1; - case 'alternate': - return 2; - case 'not_yet_set': - default: - return 0; - } - } - /** * Get the Int associated with the users subscription interval * @private From 1010e637042d1a98ba116e03fde8f7d1b78ceda4 Mon Sep 17 00:00:00 2001 From: Ilya Zarembsky Date: Thu, 1 Oct 2020 09:58:52 -0400 Subject: [PATCH 2/4] Add utm_content --- app/hub/Views/UpgradePlanView/UpgradePlanView.jsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx b/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx index 0a226c0c9..c034e2409 100644 --- a/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx +++ b/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx @@ -17,6 +17,7 @@ import PropTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; import { BASIC, PLUS, PREMIUM } from './UpgradePlanViewConstants'; import globals from '../../../../src/classes/Globals'; +import QueryString from 'query-string'; const featureMatrixRow = (label, isBasic, isPlus, isSparkle) => ( @@ -113,8 +114,11 @@ const premiumAlreadyProtectedButton = () => ( ); +// Flag to display alternate hub view (used for A/B testing ticket GH-2097) +const ah = (QueryString.parse(window.location.search).ah === 'true') || false; + /** - * A React class component for rendering the Upgrade Plan View + * A React function component for rendering the Upgrade Plan View * @return {JSX} JSX for rendering the Upgrade Plan View of the Hub app * @memberof HubComponents */ @@ -178,7 +182,8 @@ const UpgradePlanView = (props) => { const plusCTAButton = (position) => { const utm_campaign = (position === 'top' ? 'c_1' : 'c_2'); - const plusCheckoutLink = `${globals.CHECKOUT_BASE_URL}/plus?${params}&utm_campaign=intro_hub_${utm_campaign}`; + const utm_content = (ah ? '2' : '1'); + const plusCheckoutLink = `${globals.CHECKOUT_BASE_URL}/plus?${params}&utm_campaign=intro_hub_${utm_campaign}&utm_content=${utm_content}`; return ( @@ -189,7 +194,8 @@ const UpgradePlanView = (props) => { const premiumCTAButton = (position) => { const utm_campaign = (position === 'top' ? 'c_3' : 'c_4'); - const premiumCheckoutLink = `${globals.CHECKOUT_BASE_URL}/premium?${params}&utm_campaign=intro_hub_${utm_campaign}`; + const utm_content = (ah ? '2' : '1'); + const premiumCheckoutLink = `${globals.CHECKOUT_BASE_URL}/premium?${params}&utm_campaign=intro_hub_${utm_campaign}&utm_content=${utm_content}`; return ( From 01bfeedd9d47e29aa00da80d1ea13577fbeacc3c Mon Sep 17 00:00:00 2001 From: Ilya Zarembsky Date: Thu, 1 Oct 2020 11:39:36 -0400 Subject: [PATCH 3/4] Pacify linter --- app/hub/Views/UpgradePlanView/UpgradePlanView.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx b/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx index c034e2409..441c1e154 100644 --- a/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx +++ b/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx @@ -15,9 +15,9 @@ import React, { Fragment, useRef, useEffect } from 'react'; import ClassNames from 'classnames'; import PropTypes from 'prop-types'; import { NavLink } from 'react-router-dom'; +import QueryString from 'query-string'; import { BASIC, PLUS, PREMIUM } from './UpgradePlanViewConstants'; import globals from '../../../../src/classes/Globals'; -import QueryString from 'query-string'; const featureMatrixRow = (label, isBasic, isPlus, isSparkle) => ( From 59b8981409d4247d43eab0ede0a4f0b21ad61fc8 Mon Sep 17 00:00:00 2001 From: Ilya Zarembsky Date: Thu, 1 Oct 2020 11:47:52 -0400 Subject: [PATCH 4/4] Modify ah comment in UpgradePlan --- app/hub/Views/UpgradePlanView/UpgradePlanView.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx b/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx index 441c1e154..f360977a6 100644 --- a/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx +++ b/app/hub/Views/UpgradePlanView/UpgradePlanView.jsx @@ -114,7 +114,7 @@ const premiumAlreadyProtectedButton = () => ( ); -// Flag to display alternate hub view (used for A/B testing ticket GH-2097) +// Whether we are displaying this Upgrade Plan view in the alternate or the default Hub layout (as per the A/B test in ticket GH-2097) const ah = (QueryString.parse(window.location.search).ah === 'true') || false; /**