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-2097/t2-to-utm-content-fix #612

Merged
merged 5 commits into from Oct 2, 2020
Merged
Changes from 1 commit
Commits
File filter
Filter file types
Jump to
Jump to file
Failed to load files.

Always

Just for now

Add utm_content

  • Loading branch information
wlycdgr committed Oct 1, 2020
commit 1010e637042d1a98ba116e03fde8f7d1b78ceda4
@@ -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) => (
<tr>
@@ -113,8 +114,11 @@ const premiumAlreadyProtectedButton = () => (
</NavLink>
);

// 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 (
<a className="button button-gold" href={plusCheckoutLink} target="_blank" rel="noopener noreferrer" title="Upgrade to Plus">
@@ -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 (
<a className="button button-premium" href={premiumCheckoutLink} target="_blank" rel="noopener noreferrer" title="Upgrade to Premium">
ProTip! Use n and p to navigate between commits in a pull request.