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

Update comment. Wrap ternary in (), update subscripton_interval ping …

…param name
  • Loading branch information
benstrumeyer committed Jul 27, 2020
commit f554c7de60a4c8397a3da9975102fb85e855b85b
@@ -167,12 +167,12 @@ const UpgradePlanView = (props) => {
};

// UTM and Query Params
// Subscription_interval is the query param to show monthly/yearly pricing in checkout web
// interval is the query param to show monthly/yearly pricing in checkout web
const interval = show_yearly_prices ? 'year' : 'month';
const params = `utm_source=gbe&interval=${interval}`;

const plusCTAButton = (position) => {
const utm_campaign = position === 'top' ? 'c_1' : 'c_2';
const utm_campaign = (position === 'top' ? 'c_1' : 'c_2');
const plusCheckoutLink = `${globals.CHECKOUT_BASE_URL}/plus?${params}&utm_campaign=intro_hub_${utm_campaign}`;

return (
@@ -183,7 +183,7 @@ const UpgradePlanView = (props) => {
};

const premiumCTAButton = (position) => {
const utm_campaign = position === 'top' ? 'c_3' : 'c_4';
const utm_campaign = (position === 'top' ? 'c_3' : 'c_4');
const premiumCheckoutLink = `${globals.CHECKOUT_BASE_URL}/premium?${params}&utm_campaign=intro_hub_${utm_campaign}`;

return (
@@ -823,7 +823,7 @@ function onMessageHandler(request, sender, callback) {
.catch((err) => {
log('LOGIN ERROR', err);
callback({ errors: _getJSONAPIErrorsObject(err) });
});
})
return true;
}
if (name === 'account.register') {
@@ -372,7 +372,7 @@ class Metrics {
// Hub Promo variant
`&hp=${encodeURIComponent(Metrics._getHubPromoVariant().toString())}` +
// Subscription Interval
`&si=${encodeURIComponent(Metrics._getSubscriptionInterval().toString())}`;
`&subscription_interval=${encodeURIComponent(Metrics._getSubscriptionInterval().toString())}`;

if (CAMPAIGN_METRICS.includes(type)) {
// only send campaign attribution when necessary
ProTip! Use n and p to navigate between commits in a pull request.