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

Add GHOSTERY_WEBSITE_BASE_URL to globals and use in PromoModal.jsx

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

const { GHOSTERY_ROOT_DOMAIN } = globals;
const { GHOSTERY_WEBSITE_BASE_URL, CHECKOUT_BASE_URL } = globals;
This conversation was marked as resolved by fcjr

This comment has been minimized.

@wlycdgr

wlycdgr Aug 13, 2020
Member

Let's use the GHOSTERY_BASE_URL value which we already have and which is the same as GHOSTERY_WEBSITE_BASE_URL

This comment has been minimized.

@benstrumeyer

benstrumeyer Aug 13, 2020
Author Contributor

Good catch, I didn't realize we had this already

const INSIGHTS = 'insights';
const PLUS = 'plus';
const PREMIUM = 'premium';
@@ -69,10 +69,10 @@ class PromoModal extends React.Component {
let url;
switch (product) {
case PLUS:
url = `https://www.${GHOSTERY_ROOT_DOMAIN}/products/plus?utm_source=gbe&utm_campaign=${utm_campaign}`;
url = `${GHOSTERY_WEBSITE_BASE_URL}/products/plus?utm_source=gbe&utm_campaign=${utm_campaign}`;
break;
case PREMIUM:
url = `https://www.${GHOSTERY_ROOT_DOMAIN}/midnight?utm_source=gbe&utm_campaign=${utm_campaign}`;
url = `${GHOSTERY_WEBSITE_BASE_URL}/midnight?utm_source=gbe&utm_campaign=${utm_campaign}`;
break;
case INSIGHTS:
sendMessage('ping', 'promo_modals_insights_upgrade_cta');
@@ -53,6 +53,7 @@ class Globals {
this.GHOSTERY_BASE_URL = `https://${this.GHOSTERY_ROOT_DOMAIN}`;
this.ACCOUNT_BASE_URL = `https://account.${this.GHOSTERY_ROOT_DOMAIN}`;
this.CHECKOUT_BASE_URL = `https://checkout.${this.GHOSTERY_ROOT_DOMAIN}`;
this.GHOSTERY_WEBSITE_BASE_URL = `https://${this.GHOSTERY_ROOT_DOMAIN}`;
this.METRICS_BASE_URL = `https://${this.DEBUG ? 'staging-d' : 'd'}.ghostery.com`;
this.CMP_BASE_URL = `https://${this.DEBUG ? 'staging-cmp-cdn' : 'cmp-cdn'}.ghostery.com`;
this.CDN_BASE_URL = `https://${this.DEBUG ? 'staging-cdn' : 'cdn'}.ghostery.com`;
ProTip! Use n and p to navigate between commits in a pull request.