From 7306ef3a39652d11d1356039ad63ade02251e171 Mon Sep 17 00:00:00 2001 From: wlycdgr Date: Tue, 29 Oct 2019 10:45:04 -0400 Subject: [PATCH 1/2] Show initial plus promo in Panel until user makes a choice. Up Insighst panel target to 7 opens on staging. --- app/panel/components/Panel.jsx | 12 ++++++++++-- src/classes/PromoModals.js | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/app/panel/components/Panel.jsx b/app/panel/components/Panel.jsx index 33b252314..75bc16e6f 100644 --- a/app/panel/components/Panel.jsx +++ b/app/panel/components/Panel.jsx @@ -229,12 +229,20 @@ class Panel extends React.Component { _handlePromoSelectBasicClick = () => { this.props.actions.togglePromoModal(); + // we do not mark the choice-required initial plus promo as 'seen' until + // the user has clicked Select Basic or Select Plus + sendMessage('promoModals.sawPlusPromo', {}); + sendMessage('ping', 'promo_modals_select_basic_panel'); }; _handlePromoSelectPlusClick = () => { this.props.actions.togglePromoModal(); + // we do not mark the choice-required initial plus promo as 'seen' until + // the user has clicked Select Basic or Select Plus + sendMessage('promoModals.sawPlusPromo', {}); + sendMessage('ping', 'promo_modals_select_plus_panel'); }; @@ -273,9 +281,9 @@ class Panel extends React.Component { _renderPlusPromoModal = () => { if (this._plusSubscriber() || this._insightsSubscriber()) return null; - sendMessage('promoModals.sawPlusPromo', {}); - if (this.props.promoModal === 'plus_upgrade') { + // the upgrade promo does not require the user to make a choice, so we mark it as 'seen' immediately + sendMessage('promoModals.sawPlusPromo', {}); sendMessage('ping', 'promo_modals_show_upgrade_plus'); return ( Date: Tue, 29 Oct 2019 10:56:44 -0400 Subject: [PATCH 2/2] Show first Insights modal as soon as engagement conditions are met --- src/classes/PromoModals.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/classes/PromoModals.js b/src/classes/PromoModals.js index 4ee487a45..57da78c0a 100644 --- a/src/classes/PromoModals.js +++ b/src/classes/PromoModals.js @@ -16,8 +16,8 @@ import globals from './Globals'; import panelData from './PanelData'; const DAYS_BETWEEN_PROMOS = { - plus: globals.DEBUG ? 0.00025 : 30, - insights: globals.DEBUG ? 0.00025 : 30 + plus: globals.DEBUG ? 0.0005 : 30, + insights: globals.DEBUG ? 0.0005 : 30 }; const WEEKLY_INSIGHTS_TARGET = globals.DEBUG ? 1 : 3; const DAILY_INSIGHTS_TARGET = globals.DEBUG ? 7 : 3; @@ -68,6 +68,11 @@ class PromoModals { return false; } + // don't wait 30 days to show the first Insights promo if user meets the criteria before then + if (type === INSIGHTS && lastSeenInsightsPromo === 0) { + return true; + } + return ( (Date.now() - lastSeenPromo) > (MSECS_IN_DAY * DAYS_BETWEEN_PROMOS[type])