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-2086, GH-2084, GH-2040: Update intro hub Get Plus, Midnight & Insights Modal CTA link #595

Merged
merged 8 commits into from Aug 14, 2020

Use ghostery root domain from globals

  • Loading branch information
benstrumeyer committed Aug 13, 2020
commit 21d398bbd3e012cbaef9f276f61584ca051fc484
@@ -23,7 +23,7 @@ import { sendMessage } from '../../panel/utils/msg';
import globals from '../../../src/classes/Globals';
import ModalExitButton from '../../panel/components/BuildingBlocks/ModalExitButton';

const DOMAIN = globals.DEBUG ? 'ghosterystage' : 'ghostery';
const { GHOSTERY_ROOT_DOMAIN } = globals;
This conversation was marked as resolved by fcjr

This comment has been minimized.

@fcjr

fcjr Aug 13, 2020
Member

you need to expand CHECKOUT_BASE_URL here to use it below

This comment has been minimized.

@wlycdgr

wlycdgr Aug 13, 2020
Member

@fcjr @benstrumeyer we actually should also use GHOSTERY_ROOT_DOMAIN / GHOSTERY_ROOT_URL here, as per #594

This comment has been minimized.

@fcjr

fcjr Aug 13, 2020
Member

@wlycdgr We might as well close #594 and just update this link in this PR as well then.

This comment has been minimized.

@wlycdgr

wlycdgr Aug 13, 2020
Member

@fcjr good idea

This comment has been minimized.

@benstrumeyer

benstrumeyer Aug 13, 2020
Author Contributor

I missed that! Added, and also updated the insights link, as per #594

const INSIGHTS = 'insights';
const PLUS = 'plus';
const PREMIUM = 'premium';
@@ -69,14 +69,14 @@ class PromoModal extends React.Component {
let url;
switch (product) {
case PLUS:
url = `https://www.ghostery.com/products/plus?utm_source=gbe&utm_campaign=${utm_campaign}`;
url = `https://www.${GHOSTERY_ROOT_DOMAIN}/products/plus?utm_source=gbe&utm_campaign=${utm_campaign}`;
break;
case PREMIUM:
url = `https://www.ghostery.com/midnight?utm_source=gbe&utm_campaign=${utm_campaign}`;
url = `https://www.${GHOSTERY_ROOT_DOMAIN}/midnight?utm_source=gbe&utm_campaign=${utm_campaign}`;
This conversation was marked as resolved by fcjr

This comment has been minimized.

@fcjr

fcjr Aug 13, 2020
Member

it would also be nice to add a GHOSTERY_WEBSITE_BASE_URL global to avoid managing the protocol and subdomain throughout the code.

This comment has been minimized.

@benstrumeyer

benstrumeyer Aug 13, 2020
Author Contributor

Great idea, added that variable and used it here

break;
case INSIGHTS:
sendMessage('ping', 'promo_modals_insights_upgrade_cta');
url = `https://checkout.${DOMAIN}.com/insights?utm_source=gbe&utm_campaign=${utm_campaign}`;
url = `https://checkout.${GHOSTERY_ROOT_DOMAIN}/insights?utm_source=gbe&utm_campaign=${utm_campaign}`;
This conversation was marked as resolved by fcjr

This comment has been minimized.

@fcjr

fcjr Aug 13, 2020
Member

please use CHECKOUT_BASE_URL here

This comment has been minimized.

@benstrumeyer

benstrumeyer Aug 13, 2020
Author Contributor

Good catch! Changed to use CHECKOUT_BASE_URL

break;
default:
}
ProTip! Use n and p to navigate between commits in a pull request.