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-2220: Onboarding - Telemetry #650

Merged
merged 7 commits into from Jan 4, 2021

Update gb_onboarding setup_step to index 0-4 instead of 1-5

  • Loading branch information
benstrumeyer committed Dec 31, 2020
commit 2f247013e498992c6b884bd5e69a35313d1edb1b
@@ -13,7 +13,7 @@

import React from 'react';
import { NavLink } from 'react-router-dom';
import { LOGIN, ONBOARDING } from '../../OnboardingView/OnboardingConstants';
import { LOGIN, WELCOME } from '../../OnboardingView/OnboardingConstants';

/**
* A Functional React component for rendering the Browser Welcome View
@@ -28,7 +28,7 @@ const WelcomeView = (props) => {
<div className="WelcomeView__title">{t('ghostery_browser_hub_onboarding_welcome')}</div>
<div className="WelcomeView__subtitle">{t('ghostery_browser_hub_onboarding_lets_begin')}</div>
<img className="WelcomeView__rocketShip" src="/app/images/hub/welcome/rocketShip.png" />
<NavLink className="WelcomeView__ctaButton" to="/onboarding/1" onClick={() => setSetupStep({ setup_step: LOGIN, origin: ONBOARDING })}>
<NavLink className="WelcomeView__ctaButton" to="/onboarding/1" onClick={() => setSetupStep({ setup_step: LOGIN, origin: WELCOME })}>
<span>{t('ghostery_browser_hub_onboarding_lets_do_this')}</span>
</NavLink>
</div>
@@ -21,7 +21,7 @@ const actionCreators = {
setToast,
register,
getUser,
handleEmailPreferencesCheckboxChange,
handleEmailPreferencesCheckboxChange
};

export default buildReduxHOC(stateSlices, actionCreators, Step1_CreateAccountFormContainer);
@@ -18,7 +18,7 @@ import ClassNames from 'classnames';
import Step1_LogInForm from '../Step1_LogInForm';
import Step1_CreateAccountForm from '../Step1_CreateAccountForm';
import globals from '../../../../../src/classes/Globals';
import { BLOCK_SETTINGS, ONBOARDING } from '../../OnboardingView/OnboardingConstants';
import { LOGIN, ONBOARDING } from '../../OnboardingView/OnboardingConstants';

const SIGN_IN = 'SIGN_IN';
const CREATE_ACCOUNT = 'CREATE_ACCOUNT';
@@ -95,7 +95,7 @@ const Step1_CreateAccountView = (props) => {
<div className="row align-center-middle">
<div className="columns small-10 medium-5" />
<div className="columns small-10 medium-5">
<NavLink className="Step1_CreateAccountView__skip" to="/onboarding/2" onClick={() => setSetupStep({ setup_step: BLOCK_SETTINGS, origin: ONBOARDING })}>
<NavLink className="Step1_CreateAccountView__skip" to="/onboarding/2" onClick={() => setSetupStep({ setup_step: LOGIN, origin: ONBOARDING })}>
<span>{t('ghostery_browser_hub_onboarding_skip')}</span>
</NavLink>
</div>
@@ -107,7 +107,7 @@ const Step1_CreateAccountView = (props) => {
<div className="Step1_CreateAccountView__title">{t('ghostery_browser_hub_onboarding_you_are_signed_in_as')}</div>
<div className="Step1_CreateAccountView__email">{email}</div>
<div className="Step1_CreateAccountView__ctaButtonContainer">
<NavLink className="Step1_CreateAccountView__ctaButton" to="/onboarding/2" onClick={() => setSetupStep({ setup_step: BLOCK_SETTINGS, origin: ONBOARDING })}>
<NavLink className="Step1_CreateAccountView__ctaButton" to="/onboarding/2" onClick={() => setSetupStep({ setup_step: LOGIN, origin: ONBOARDING })}>
<span>{t('next')}</span>
</NavLink>
</div>
@@ -18,7 +18,7 @@ import PropTypes from 'prop-types';
import RadioButton from '../../../../shared-components/RadioButton';
import globals from '../../../../../src/classes/Globals';
import { BASIC, PLUS, PREMIUM } from '../../../../hub/Views/UpgradePlanView/UpgradePlanViewConstants';
import { SUCCESS, ONBOARDING } from '../../OnboardingView/OnboardingConstants';
import { CHOOSE_PLAN, ONBOARDING } from '../../OnboardingView/OnboardingConstants';

const plusCheckoutLink = `${globals.CHECKOUT_BASE_URL}/en/plus`;
const premiumCheckoutLink = `${globals.CHECKOUT_BASE_URL}/en/premium`;
@@ -271,7 +271,7 @@ class ChoosePlanView extends React.Component {
</div>
</div>
{showCTAButton && (
<NavLink className="ChoosePlanView__searchCTAButton" to="/onboarding/5" onClick={() => setSetupStep({ setup_step: SUCCESS, origin: ONBOARDING })}>
<NavLink className="ChoosePlanView__searchCTAButton" to="/onboarding/5" onClick={() => setSetupStep({ setup_step: CHOOSE_PLAN, origin: ONBOARDING })}>
<span>{t('ghostery_browser_hub_onboarding_keep')}</span>
</NavLink>
)}
@@ -338,7 +338,7 @@ class ChoosePlanView extends React.Component {
{(isBasic && (
<div className="ChoosePlanView__ctaButtonContainer">
{(selectedPlan === BASIC) && (
<NavLink className="ChoosePlanView__searchCTAButton" to="/onboarding/5" onClick={() => setSetupStep({ setup_step: SUCCESS, origin: ONBOARDING })}>
<NavLink className="ChoosePlanView__searchCTAButton" to="/onboarding/5" onClick={() => setSetupStep({ setup_step: CHOOSE_PLAN, origin: ONBOARDING })}>
<span>{t('next')}</span>
</NavLink>
)}
@@ -351,7 +351,7 @@ class ChoosePlanView extends React.Component {
</div>
))}
{isPremium && (
<NavLink className="ChoosePlanView__searchCTAButton" to="/onboarding/5" onClick={() => setSetupStep({ setup_step: SUCCESS, origin: ONBOARDING })}>
<NavLink className="ChoosePlanView__searchCTAButton" to="/onboarding/5" onClick={() => setSetupStep({ setup_step: CHOOSE_PLAN, origin: ONBOARDING })}>
<span>{t('next')}</span>
</NavLink>
)}
@@ -184,7 +184,7 @@ class Metrics {
this._sendReq(type, ['all']);
break;

// Ghostery Browser Hub - Ghostery 8.5.4+
// Ghostery Browser Hub - Ghostery 8.5.5+
case 'gb_onboarding':
case 'gb_onboarding_success':
this._sendReq(type, ['all']);
ProTip! Use n and p to navigate between commits in a pull request.