Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-2100, GH-2097: Onboarding test 2 #603

Merged
merged 7 commits into from Sep 22, 2020
@@ -18,7 +18,7 @@ import { NavLink } from 'react-router-dom';
import QueryString from 'query-string';
import globals from '../../../../src/classes/Globals';

// Flag to display alternate hub view (used in A/B testing)
// Flag to display alternate hub view (used for A/B testing ticket GH-2097)
const ah = (QueryString.parse(window.location.search).ah === 'true') || false;

const { GHOSTERY_BASE_URL } = globals;
@@ -101,7 +101,7 @@ const SideNavigationView = (props) => {
disabled: disableNav,
});

const menuClassNames = ClassNames(`SideNavigation__menu ${!ah ? 'flex-child-grow' : ''} flex-container flex-dir-column`);
const menuClassNames = ClassNames(`SideNavigation__menu ${ah ? '' : 'flex-child-grow'} flex-container flex-dir-column`);

return (
<div className={containerClassNames}>
@@ -20,7 +20,7 @@ import globals from '../../../../src/classes/Globals';
const { IS_CLIQZ, BROWSER_INFO } = globals;
const IS_ANDROID = (BROWSER_INFO.os === 'android');

// Flag to display alternate hub view (used in A/B testing)
// Flag to display alternate hub view (used for A/B testing ticket GH-2097)
const ah = (QueryString.parse(window.location.search).ah === 'true') || false;

/**
@@ -35,7 +35,7 @@ import UpgradePlanView from './Views/UpgradePlanView';

const store = createStore();

// Flag to display alternate hub view (used in A/B testing)
// Flag to display alternate hub view (used for A/B testing ticket GH-2097)
const ah = (QueryString.parse(window.location.search).ah === 'true') || false;

/**
@@ -1759,7 +1759,7 @@ function initializeGhosteryModules() {
// because of an A/B test that determines which promo variant is shown in the Hub on install
if (globals.JUST_INSTALLED) {
const showAlternateHub = conf.hub_layout === 'alternate';
const route = conf.hub_layout === 'alternate' ? '#home' : '';
const route = showAlternateHub ? '#home' : '';
chrome.tabs.create({
url: chrome.runtime.getURL(`./app/templates/hub.html?$justInstalled=true&ah=${showAlternateHub}${route}`),
active: true
@@ -370,7 +370,7 @@ class Metrics {

// New parameters for Ghostery 8.5.2
// Hub Layout View
`&hp=${encodeURIComponent(Metrics._getHubLayoutView().toString())}` +
`&t2=${encodeURIComponent(Metrics._getHubLayoutView().toString())}` +
// Subscription Interval
`&si=${encodeURIComponent(Metrics._getSubscriptionInterval().toString())}` +
// Product ID Parameter
@@ -543,9 +543,9 @@ class Metrics {

switch (hub_layout) {
case 'default':
return 4;
return 1;
case 'alternate':
return 5;
return 2;
case 'not_yet_set':
default:
return 0;
ProTip! Use n and p to navigate between commits in a pull request.