diff --git a/mattermost-plugin/webapp/src/components/cloudUpgradeNudge/cloudUpgradeNudge.tsx b/mattermost-plugin/webapp/src/components/cloudUpgradeNudge/cloudUpgradeNudge.tsx index 7b01fbcfa..f5cc977a0 100644 --- a/mattermost-plugin/webapp/src/components/cloudUpgradeNudge/cloudUpgradeNudge.tsx +++ b/mattermost-plugin/webapp/src/components/cloudUpgradeNudge/cloudUpgradeNudge.tsx @@ -8,7 +8,7 @@ const PostTypeCloudUpgradeNudge = (props: {post: Post}): JSX.Element => { const ctaHandler = (e: React.MouseEvent) => { e.preventDefault() const windowAny = (window as any) - windowAny?.openPricingModal()() + windowAny?.openPricingModal()('boards > click_view_upgrade_options_nudge') } // custom post type doesn't support styling via CSS stylesheet. diff --git a/webapp/src/components/cardDetail/cardDetail.tsx b/webapp/src/components/cardDetail/cardDetail.tsx index 8355edb71..6f0e74660 100644 --- a/webapp/src/components/cardDetail/cardDetail.tsx +++ b/webapp/src/components/cardDetail/cardDetail.tsx @@ -165,7 +165,7 @@ const CardDetail = (props: Props): JSX.Element|null => { role='button' onClick={() => { props.onClose(); - (window as any).openPricingModal()() + (window as any).openPricingModal()('boards > learn_more_about_our_plans_click') }} > { className='CardDetail__limited-button' onClick={() => { props.onClose(); - (window as any).openPricingModal()() + (window as any).openPricingModal()('boards > upgrade_click') }} emphasis='primary' size='large' diff --git a/webapp/src/components/cardLimitNotification.tsx b/webapp/src/components/cardLimitNotification.tsx index 041f08c97..0390983e1 100644 --- a/webapp/src/components/cardLimitNotification.tsx +++ b/webapp/src/components/cardLimitNotification.tsx @@ -119,7 +119,7 @@ const CardLimitNotification = (props: Props) => { }, [me?.id]) const onClick = useCallback(() => { - (window as any).openPricingModal()() + (window as any).openPricingModal()('boards > card_limit_notification_upgrade_to_a_paid_plan_click') TelemetryClient.trackEvent(TelemetryCategory, TelemetryActions.LimitCardLimitLinkOpen, {}) }, []) diff --git a/webapp/src/components/viewLImitDialog/viewLimitDialog.tsx b/webapp/src/components/viewLImitDialog/viewLimitDialog.tsx index 08d407978..7a6e6a919 100644 --- a/webapp/src/components/viewLImitDialog/viewLimitDialog.tsx +++ b/webapp/src/components/viewLImitDialog/viewLimitDialog.tsx @@ -80,7 +80,7 @@ export const ViewLimitModal = (props: Props): JSX.Element => { telemetryClient.trackEvent(TelemetryCategory, TelemetryActions.ViewLimitCTAPerformed, {board: board.id}) if (isAdmin) { - (window as any)?.openPricingModal()() + (window as any)?.openPricingModal()('boards > view_limit_dialog') } else { await octoClient.notifyAdminUpgrade() props.showNotifyAdminSuccess() diff --git a/webapp/src/types/index.d.ts b/webapp/src/types/index.d.ts index 019348717..c49d39a1a 100644 --- a/webapp/src/types/index.d.ts +++ b/webapp/src/types/index.d.ts @@ -8,7 +8,7 @@ export interface IAppWindow extends Window { msCrypto: Crypto openInNewBrowser?: ((href: string) => void) | null webkit?: {messageHandlers: {nativeApp?: {postMessage: (message: T) => void}}} - openPricingModal?: () => () => void + openPricingModal?: () => (callerInfo: string) => void } // SuiteWindow documents all custom properties