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-2072: Add subscription interval to ping params and change UpgradePlan CTA link params #586

Merged
merged 8 commits into from Jul 27, 2020

Change variable name

  • Loading branch information
benstrumeyer committed Jul 27, 2020
commit 23fb87b2ccccaf67c8741e02c1c759f81b639d23
@@ -169,11 +169,11 @@ const UpgradePlanView = (props) => {
// UTM and Query Params
// Subscription_interval is the query param to show monthly/yearly pricing in checkout web
This conversation was marked as resolved by wlycdgr

This comment has been minimized.

@wlycdgr

wlycdgr Jul 27, 2020
Member

Let's update the comment to use the updated interval param name

This comment has been minimized.

@benstrumeyer

benstrumeyer Jul 27, 2020
Author Contributor

Nice catch!

const interval = show_yearly_prices ? 'year' : 'month';
const utmParams = `utm_source=gbe&interval=${interval}`;
const params = `utm_source=gbe&interval=${interval}`;

const plusCTAButton = (position) => {
const utm_campaign = position === 'top' ? 'c_1' : 'c_2';
This conversation was marked as resolved by wlycdgr

This comment has been minimized.

@wlycdgr

wlycdgr Jul 27, 2020
Member

Could you throw a set of parens around the rvalue to make this a little easier to parse visually?

This comment has been minimized.

@benstrumeyer

benstrumeyer Jul 27, 2020
Author Contributor

Yes, yes I can :D

const plusCheckoutLink = `${globals.CHECKOUT_BASE_URL}/plus?${utmParams}&utm_campaign=intro_hub_${utm_campaign}`;
const plusCheckoutLink = `${globals.CHECKOUT_BASE_URL}/plus?${params}&utm_campaign=intro_hub_${utm_campaign}`;

return (
<a className="button button-gold" href={plusCheckoutLink} target="_blank" rel="noopener noreferrer" title="Upgrade to Plus">
@@ -184,7 +184,7 @@ const UpgradePlanView = (props) => {

const premiumCTAButton = (position) => {
const utm_campaign = position === 'top' ? 'c_3' : 'c_4';
This conversation was marked as resolved by wlycdgr

This comment has been minimized.

@wlycdgr

wlycdgr Jul 27, 2020
Member

Same deal here, could you add a set of parens around the ternary on the right side of the assignment?

This comment has been minimized.

@benstrumeyer

benstrumeyer Jul 27, 2020
Author Contributor

Done!

const premiumCheckoutLink = `${globals.CHECKOUT_BASE_URL}/premium?${utmParams}&utm_campaign=intro_hub_${utm_campaign}`;
const premiumCheckoutLink = `${globals.CHECKOUT_BASE_URL}/premium?${params}&utm_campaign=intro_hub_${utm_campaign}`;

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.