From f0201fbcd64fea96c7fc033f2f48d7cbed90d8e5 Mon Sep 17 00:00:00 2001 From: isabellaenriquez Date: Tue, 14 Oct 2025 11:10:42 -0400 Subject: [PATCH 1/5] chore(sub v3): prep for EA --- .../components/subscriptionSettingsLayout.tsx | 41 ++++++++++++++++++- .../subscriptionPage/billingInformation.tsx | 7 ---- .../components/subscriptionPageContainer.tsx | 13 +++++- .../views/subscriptionPage/notifications.tsx | 4 -- .../gsApp/views/subscriptionPage/overview.tsx | 6 --- .../views/subscriptionPage/paymentHistory.tsx | 7 +--- .../views/subscriptionPage/usageHistory.tsx | 7 +--- .../gsApp/views/subscriptionPage/usageLog.tsx | 7 +--- static/gsApp/views/subscriptionPage/utils.tsx | 12 ------ 9 files changed, 54 insertions(+), 50 deletions(-) diff --git a/static/gsApp/components/subscriptionSettingsLayout.tsx b/static/gsApp/components/subscriptionSettingsLayout.tsx index f231cba9e7b51f..2320bb752f27c2 100644 --- a/static/gsApp/components/subscriptionSettingsLayout.tsx +++ b/static/gsApp/components/subscriptionSettingsLayout.tsx @@ -1,12 +1,18 @@ import styled from '@emotion/styled'; +import {Button} from '@sentry/scraps/button'; + import {Flex} from 'sentry/components/core/layout'; +import {IconMegaphone} from 'sentry/icons'; +import {t} from 'sentry/locale'; +import {useFeedbackForm} from 'sentry/utils/useFeedbackForm'; import {useLocation} from 'sentry/utils/useLocation'; import useOrganization from 'sentry/utils/useOrganization'; import {useParams} from 'sentry/utils/useParams'; import useRouter from 'sentry/utils/useRouter'; import {useRoutes} from 'sentry/utils/useRoutes'; import SettingsBreadcrumb from 'sentry/views/settings/components/settingsBreadcrumb'; +import type {RouteWithName} from 'sentry/views/settings/components/settingsBreadcrumb/types'; import SettingsHeader from 'sentry/views/settings/components/settingsHeader'; import SettingsSearch from 'sentry/views/settings/components/settingsSearch'; import OrganizationSettingsLayout from 'sentry/views/settings/organization/organizationSettingsLayout'; @@ -20,13 +26,21 @@ type Props = { function SubscriptionSettingsLayout(props: Props) { const organization = useOrganization(); const isNewBillingUI = hasNewBillingUI(organization); + const openFeedbackForm = useFeedbackForm(); const location = useLocation(); const params = useParams(); const routes = useRoutes(); const router = useRouter(); const {children} = props; - + let feedbackSource = location.pathname; + for (let i = routes.length - 1; i >= 0; i--) { + const route = routes[i] as RouteWithName; + if (route?.name) { + feedbackSource = route.name; + break; + } + } if (!isNewBillingUI) { return ( - + + {openFeedbackForm ? ( + + ) : null} + + diff --git a/static/gsApp/views/subscriptionPage/billingInformation.tsx b/static/gsApp/views/subscriptionPage/billingInformation.tsx index 57ef68e3188a6d..36d8fddec78955 100644 --- a/static/gsApp/views/subscriptionPage/billingInformation.tsx +++ b/static/gsApp/views/subscriptionPage/billingInformation.tsx @@ -20,7 +20,6 @@ import SubscriptionPageContainer from 'getsentry/views/subscriptionPage/componen import RecurringCredits from 'getsentry/views/subscriptionPage/recurringCredits'; import SubscriptionHeader from './subscriptionHeader'; -import {trackSubscriptionView} from './utils'; type Props = { location: Location; @@ -32,12 +31,6 @@ type Props = { * Update Billing Information view. */ function BillingInformation({organization, subscription, location}: Props) { - useEffect(() => { - if (!organization || !subscription) return; - - trackSubscriptionView(organization, subscription, 'details'); - }, [organization, subscription]); - const isNewBillingUI = hasNewBillingUI(organization); const hasBillingPerms = organization.access?.includes('org:billing'); diff --git a/static/gsApp/views/subscriptionPage/components/subscriptionPageContainer.tsx b/static/gsApp/views/subscriptionPage/components/subscriptionPageContainer.tsx index ed7e60807851ee..d95f66394364ff 100644 --- a/static/gsApp/views/subscriptionPage/components/subscriptionPageContainer.tsx +++ b/static/gsApp/views/subscriptionPage/components/subscriptionPageContainer.tsx @@ -1,8 +1,10 @@ -import {Fragment} from 'react'; +import {Fragment, useEffect} from 'react'; +import * as Sentry from '@sentry/react'; import {Container} from 'sentry/components/core/layout'; import type {ContainerProps} from 'sentry/components/core/layout/container'; import type {Organization} from 'sentry/types/organization'; +import useRouteAnalyticsParams from 'sentry/utils/routeAnalytics/useRouteAnalyticsParams'; import {hasNewBillingUI} from 'getsentry/utils/billing'; @@ -23,7 +25,16 @@ function SubscriptionPageContainer({ paddingOverride?: ContainerProps['padding']; useBorderTopLogic?: boolean; }) { + useEffect(() => { + // record replays for all usage and billing settings pages + Sentry.getReplay()?.start(); + }, []); + const isNewBillingUI = hasNewBillingUI(organization); + useRouteAnalyticsParams({ + is_new_billing_ui: isNewBillingUI, + }); + if (!isNewBillingUI) { if (dataTestId) { return {children}; diff --git a/static/gsApp/views/subscriptionPage/notifications.tsx b/static/gsApp/views/subscriptionPage/notifications.tsx index 314db165f2141a..f3b98e56498b1c 100644 --- a/static/gsApp/views/subscriptionPage/notifications.tsx +++ b/static/gsApp/views/subscriptionPage/notifications.tsx @@ -36,7 +36,6 @@ import ContactBillingMembers from 'getsentry/views/contactBillingMembers'; import SubscriptionPageContainer from 'getsentry/views/subscriptionPage/components/subscriptionPageContainer'; import SubscriptionHeader from './subscriptionHeader'; -import {trackSubscriptionView} from './utils'; interface SubscriptionNotificationsProps extends RouteComponentProps { subscription: Subscription; @@ -66,9 +65,6 @@ function isThresholdsEqual(value: ThresholdsType, other: ThresholdsType): boolea function SubscriptionNotifications({subscription}: SubscriptionNotificationsProps) { const organization = useOrganization(); const api = useApi(); - useEffect(() => { - trackSubscriptionView(organization, subscription, 'notifications'); - }, [organization, subscription]); const isNewBillingUI = hasNewBillingUI(organization); const { diff --git a/static/gsApp/views/subscriptionPage/overview.tsx b/static/gsApp/views/subscriptionPage/overview.tsx index c768a4ab1ac8bc..4000b78186087f 100644 --- a/static/gsApp/views/subscriptionPage/overview.tsx +++ b/static/gsApp/views/subscriptionPage/overview.tsx @@ -47,7 +47,6 @@ import ReservedUsageChart from './reservedUsageChart'; import SubscriptionHeader from './subscriptionHeader'; import UsageAlert from './usageAlert'; import {CombinedUsageTotals, UsageTotals} from './usageTotals'; -import {trackSubscriptionView} from './utils'; type Props = { location: Location; @@ -146,11 +145,6 @@ function Overview({location, subscription, promotionData}: Props) { } }, [organization, location.query, subscription, promotionData, api, navigate]); - useEffect( - () => trackSubscriptionView(organization, subscription, 'overview'), - [subscription, organization] - ); - // Sales managed accounts do not allow members to view the billing page. // Whilst self-serve accounts do. if (!hasBillingPerms && !subscription.canSelfServe) { diff --git a/static/gsApp/views/subscriptionPage/paymentHistory.tsx b/static/gsApp/views/subscriptionPage/paymentHistory.tsx index be53d52cbe6ebf..14288d5f4eaf7d 100644 --- a/static/gsApp/views/subscriptionPage/paymentHistory.tsx +++ b/static/gsApp/views/subscriptionPage/paymentHistory.tsx @@ -1,4 +1,4 @@ -import {Fragment, useEffect} from 'react'; +import {Fragment} from 'react'; import {useTheme} from '@emotion/react'; import moment from 'moment-timezone'; @@ -36,7 +36,6 @@ import ContactBillingMembers from 'getsentry/views/contactBillingMembers'; import SubscriptionPageContainer from 'getsentry/views/subscriptionPage/components/subscriptionPageContainer'; import SubscriptionHeader from './subscriptionHeader'; -import {trackSubscriptionView} from './utils'; type Props = { organization: Organization; @@ -57,10 +56,6 @@ function PaymentHistory({organization, subscription}: Props) { const isNewBillingUI = hasNewBillingUI(organization); const location = useLocation(); - useEffect(() => { - trackSubscriptionView(organization, subscription, 'receipts'); - }, [organization, subscription]); - const { data: payments, isPending, diff --git a/static/gsApp/views/subscriptionPage/usageHistory.tsx b/static/gsApp/views/subscriptionPage/usageHistory.tsx index dc78a3a9c47bdd..66d20765882b93 100644 --- a/static/gsApp/views/subscriptionPage/usageHistory.tsx +++ b/static/gsApp/views/subscriptionPage/usageHistory.tsx @@ -1,4 +1,4 @@ -import {Fragment, useEffect, useState} from 'react'; +import {Fragment, useState} from 'react'; import styled from '@emotion/styled'; import moment from 'moment-timezone'; @@ -48,7 +48,6 @@ import SubscriptionPageContainer from 'getsentry/views/subscriptionPage/componen import {StripedTable} from './styles'; import SubscriptionHeader from './subscriptionHeader'; -import {trackSubscriptionView} from './utils'; interface Props extends RouteComponentProps { subscription: Subscription; @@ -91,10 +90,6 @@ function UsageHistory({subscription}: Props) { const location = useLocation(); const isNewBillingUI = hasNewBillingUI(organization); - useEffect(() => { - trackSubscriptionView(organization, subscription, 'usage'); - }, [organization, subscription]); - const { data: usageList, isPending, diff --git a/static/gsApp/views/subscriptionPage/usageLog.tsx b/static/gsApp/views/subscriptionPage/usageLog.tsx index 75779cd5363218..513c7cf8517a7e 100644 --- a/static/gsApp/views/subscriptionPage/usageLog.tsx +++ b/static/gsApp/views/subscriptionPage/usageLog.tsx @@ -1,4 +1,4 @@ -import {Fragment, useEffect} from 'react'; +import {Fragment} from 'react'; import styled from '@emotion/styled'; import type {Location} from 'history'; import upperFirst from 'lodash/upperFirst'; @@ -32,7 +32,6 @@ import trackGetsentryAnalytics from 'getsentry/utils/trackGetsentryAnalytics'; import SubscriptionPageContainer from 'getsentry/views/subscriptionPage/components/subscriptionPageContainer'; import SubscriptionHeader from './subscriptionHeader'; -import {trackSubscriptionView} from './utils'; const avatarStyle = { width: 36, @@ -151,10 +150,6 @@ function UsageLog({location, subscription}: Props) { }); }; - useEffect(() => { - trackSubscriptionView(organization, subscription, 'usagelog'); - }, [organization, subscription]); - const eventNameOptions = eventNames?.map(type => ({ label: formatEntryTitle(type), diff --git a/static/gsApp/views/subscriptionPage/utils.tsx b/static/gsApp/views/subscriptionPage/utils.tsx index 2517dc2cfb618d..1aa3c31622b3cf 100644 --- a/static/gsApp/views/subscriptionPage/utils.tsx +++ b/static/gsApp/views/subscriptionPage/utils.tsx @@ -10,23 +10,11 @@ import { } from 'getsentry/types'; import {isAmPlan, isDeveloperPlan} from 'getsentry/utils/billing'; import {isPartOfReservedBudget} from 'getsentry/utils/dataCategory'; -import trackGetsentryAnalytics from 'getsentry/utils/trackGetsentryAnalytics'; import {getBucket} from 'getsentry/views/amCheckout/utils'; export const hasPermissions = ({access}: Organization, scope: Scope) => access?.includes(scope); -export const trackSubscriptionView = ( - organization: Organization, - subscription: Subscription, - page: string -) => - trackGetsentryAnalytics('subscription_page.viewed', { - organization, - subscription, - page_tab: page, - }); - export function calculateCategorySpend( subscription: Subscription, category: DataCategory From e1a0ef9e1206f8a680b78b7de4dfcae1396977ca Mon Sep 17 00:00:00 2001 From: isabellaenriquez Date: Tue, 14 Oct 2025 11:25:25 -0400 Subject: [PATCH 2/5] payg analytics --- .../gsApp/utils/trackGetsentryAnalytics.tsx | 21 +++++++++++++------ static/gsApp/views/onDemandBudgets/utils.tsx | 14 +++++++++++-- .../subscriptionPage/headerCards/paygCard.tsx | 10 +++++++-- 3 files changed, 35 insertions(+), 10 deletions(-) diff --git a/static/gsApp/utils/trackGetsentryAnalytics.tsx b/static/gsApp/utils/trackGetsentryAnalytics.tsx index 61dea67457b9cb..e3d923a198d417 100644 --- a/static/gsApp/utils/trackGetsentryAnalytics.tsx +++ b/static/gsApp/utils/trackGetsentryAnalytics.tsx @@ -155,8 +155,12 @@ type GetsentryEventParameters = { 'growth.upsell_feature.clicked': UpsellProvider; 'growth.upsell_feature.confirmed': UpsellProvider; 'learn_more_link.clicked': {source?: string}; - 'ondemand_budget_modal.ondemand_budget.turned_off': Record; - 'ondemand_budget_modal.ondemand_budget.update': OnDemandBudgetUpdate; + 'ondemand_budget_modal.ondemand_budget.turned_off': Record & { + isNewBillingUI: boolean; + }; + 'ondemand_budget_modal.ondemand_budget.update': OnDemandBudgetUpdate & { + isNewBillingUI: boolean; + }; 'partner_billing_migration.banner.clicked_cta': { daysLeft: number; partner: undefined | string; @@ -172,6 +176,8 @@ type GetsentryEventParameters = { partner: undefined | string; } & HasSub; 'past_due_modal.seen': HasSub; + 'payg_inline_form.ondemand_budget.turned_off': Record; + 'payg_inline_form.ondemand_budget.update': OnDemandBudgetUpdate; 'performance.quota_exceeded_alert.displayed': { referrer: string; traceItemDataset: string; @@ -312,10 +318,13 @@ const getsentryEventMap: Record = { 'disabled_member_view.clicked_upgrade_request': 'Disabled Member View: Clicked Upgrade Request', 'disabled_member_view.clicked_leave_org': 'Disabled Member View: Clicked Leave Org', - 'ondemand_budget_modal.ondemand_budget.turned_off': 'Disabled On-demand Budget', - 'ondemand_budget_modal.ondemand_budget.update': 'Update On-demand Budget', - 'checkout.ondemand_budget.turned_off': 'Checkout: Disabled On-demand Budget', - 'checkout.ondemand_budget.update': 'Checkout: Update On-demand Budget', + 'ondemand_budget_modal.ondemand_budget.turned_off': 'Disabled PAYG Budget', + 'ondemand_budget_modal.ondemand_budget.update': 'Update PAYG Budget', + 'payg_inline_form.ondemand_budget.turned_off': + 'PAYG In-line Form: Disabled PAYG Budget', + 'payg_inline_form.ondemand_budget.update': 'PAYG In-line Form: Update PAYG Budget', + 'checkout.ondemand_budget.turned_off': 'Checkout: Disabled PAYG Budget', + 'checkout.ondemand_budget.update': 'Checkout: Update PAYG Budget', 'trial_reset_notification.modal_dismissed': 'Trial Reset Notification: Modal Dismissed', 'growth.disabled_dashboard.viewed': 'Growth: Disabled Dashboard Viewed', 'product_unavailable_upsell_alert.viewed': 'Product Unavailable Upsell: Viewed Alert', diff --git a/static/gsApp/views/onDemandBudgets/utils.tsx b/static/gsApp/views/onDemandBudgets/utils.tsx index a5bc080cf0d10e..395c09904ac737 100644 --- a/static/gsApp/views/onDemandBudgets/utils.tsx +++ b/static/gsApp/views/onDemandBudgets/utils.tsx @@ -13,7 +13,11 @@ import type { SubscriptionOnDemandBudgets, } from 'getsentry/types'; import {BillingType, OnDemandBudgetMode} from 'getsentry/types'; -import {displayBudgetName, getOnDemandCategories} from 'getsentry/utils/billing'; +import { + displayBudgetName, + getOnDemandCategories, + hasNewBillingUI, +} from 'getsentry/utils/billing'; import { getCategoryInfoFromPlural, getPlanCategoryName, @@ -183,7 +187,10 @@ export function trackOnDemandBudgetAnalytics( organization: Organization, previousBudget: OnDemandBudgets, newBudget: OnDemandBudgets, - prefix: 'ondemand_budget_modal' | 'checkout' = 'ondemand_budget_modal' + prefix: + | 'ondemand_budget_modal' + | 'checkout' + | 'payg_inline_form' = 'ondemand_budget_modal' ) { const previousTotalBudget = getTotalBudget(previousBudget); const totalBudget = getTotalBudget(newBudget); @@ -194,6 +201,9 @@ export function trackOnDemandBudgetAnalytics( if (prefix === 'checkout') { const isNewCheckout = hasNewCheckout(organization); analyticsParams.isNewCheckout = isNewCheckout; + } else if (prefix === 'ondemand_budget_modal') { + const isNewBillingUI = hasNewBillingUI(organization); + analyticsParams.isNewBillingUI = isNewBillingUI; } if (totalBudget > 0 && previousTotalBudget !== totalBudget) { diff --git a/static/gsApp/views/subscriptionPage/headerCards/paygCard.tsx b/static/gsApp/views/subscriptionPage/headerCards/paygCard.tsx index c990a9ab7a3edc..109b23de332d37 100644 --- a/static/gsApp/views/subscriptionPage/headerCards/paygCard.tsx +++ b/static/gsApp/views/subscriptionPage/headerCards/paygCard.tsx @@ -16,7 +16,11 @@ import {useMutation} from 'sentry/utils/queryClient'; import useApi from 'sentry/utils/useApi'; import SubscriptionStore from 'getsentry/stores/subscriptionStore'; -import {OnDemandBudgetMode, type Subscription} from 'getsentry/types'; +import { + OnDemandBudgetMode, + type OnDemandBudgets, + type Subscription, +} from 'getsentry/types'; import {displayBudgetName} from 'getsentry/utils/billing'; import {displayPrice} from 'getsentry/views/amCheckout/utils'; import {openOnDemandBudgetEditModal} from 'getsentry/views/onDemandBudgets/editOnDemandButton'; @@ -24,6 +28,7 @@ import { getTotalBudget, getTotalSpend, parseOnDemandBudgetsFromSubscription, + trackOnDemandBudgetAnalytics, } from 'getsentry/views/onDemandBudgets/utils'; import {openSpendLimitsPricingModal} from 'getsentry/views/spendLimits/modal'; import SubscriptionHeaderCard from 'getsentry/views/subscriptionPage/headerCards/subscriptionHeaderCard'; @@ -59,7 +64,8 @@ function PaygCard({ }, }); }, - onSuccess: () => { + onSuccess: (_data: OnDemandBudgets) => { + trackOnDemandBudgetAnalytics(organization, paygBudget, _data, 'payg_inline_form'); SubscriptionStore.loadData(subscription.slug); setIsEditing(false); }, From 62f8ecc235b142225095f30086cf5b7df6b240d7 Mon Sep 17 00:00:00 2001 From: isabellaenriquez Date: Tue, 14 Oct 2025 11:55:31 -0400 Subject: [PATCH 3/5] clean up analytics --- .../gsApp/components/billingDetails/form.tsx | 4 +- .../intentForms/paymentIntentForm.tsx | 3 -- static/gsApp/utils/rawTrackAnalyticsEvent.tsx | 8 ++++ .../gsApp/utils/trackGetsentryAnalytics.tsx | 41 +++++++------------ static/gsApp/views/amCheckout/index.tsx | 3 +- .../amCheckout/reserveAdditionalVolume.tsx | 1 - .../views/amCheckout/steps/planSelect.tsx | 1 - .../views/amCheckout/steps/setPayAsYouGo.tsx | 1 - .../views/amCheckout/steps/setSpendLimit.tsx | 1 - .../views/amCheckout/steps/volumeSliders.tsx | 1 - static/gsApp/views/amCheckout/utils.tsx | 5 --- .../views/invoiceDetails/paymentForm.tsx | 4 +- 12 files changed, 25 insertions(+), 48 deletions(-) diff --git a/static/gsApp/components/billingDetails/form.tsx b/static/gsApp/components/billingDetails/form.tsx index 6bb2f32f95d489..cb34fac8f05c72 100644 --- a/static/gsApp/components/billingDetails/form.tsx +++ b/static/gsApp/components/billingDetails/form.tsx @@ -19,7 +19,7 @@ import {useLocation} from 'sentry/utils/useLocation'; import LegacyBillingDetailsForm from 'getsentry/components/billingDetails/legacyForm'; import StripeWrapper from 'getsentry/components/stripeWrapper'; import type {BillingDetails} from 'getsentry/types'; -import {hasNewBillingUI, hasStripeComponentsFeature} from 'getsentry/utils/billing'; +import {hasStripeComponentsFeature} from 'getsentry/utils/billing'; import {countryCodes} from 'getsentry/utils/ISO3166codes'; import type {TaxFieldInfo} from 'getsentry/utils/salesTax'; import { @@ -167,7 +167,6 @@ function BillingDetailsForm({ !!initialData?.taxNumber || countryHasSalesTax(initialData?.countryCode), }); const hasStripeComponents = hasStripeComponentsFeature(organization); - const isNewBillingUI = hasNewBillingUI(organization); const location = useLocation(); const taxFieldInfo = useMemo( @@ -228,7 +227,6 @@ function BillingDetailsForm({ if (analyticsEvent) { trackGetsentryAnalytics(analyticsEvent, { organization, - isNewBillingUI, isStripeComponent: hasStripeComponents, referrer: decodeScalar(location.query?.referrer), }); diff --git a/static/gsApp/components/creditCardEdit/intentForms/paymentIntentForm.tsx b/static/gsApp/components/creditCardEdit/intentForms/paymentIntentForm.tsx index d90571cff61cac..47602a076ae845 100644 --- a/static/gsApp/components/creditCardEdit/intentForms/paymentIntentForm.tsx +++ b/static/gsApp/components/creditCardEdit/intentForms/paymentIntentForm.tsx @@ -11,12 +11,10 @@ import {decodeScalar} from 'sentry/utils/queryString'; import InnerIntentForm from 'getsentry/components/creditCardEdit/intentForms/innerIntentForm'; import type {StripeIntentFormProps} from 'getsentry/components/creditCardEdit/intentForms/types'; import {usePaymentIntentData} from 'getsentry/hooks/useIntentData'; -import {hasNewBillingUI} from 'getsentry/utils/billing'; import trackGetsentryAnalytics from 'getsentry/utils/trackGetsentryAnalytics'; function StripePaymentIntentForm(props: StripeIntentFormProps) { const {organization, referrer, onSuccess} = props; - const isNewBillingUI = hasNewBillingUI(organization); const [errorMessage, setErrorMessage] = useState(undefined); const [isSubmitting, setIsSubmitting] = useState(false); @@ -76,7 +74,6 @@ function StripePaymentIntentForm(props: StripeIntentFormProps) { organization, referrer: decodeScalar(referrer), isStripeComponent: true, - isNewBillingUI, }); addSuccessMessage(t('Payment sent successfully.')); onSuccess?.(); diff --git a/static/gsApp/utils/rawTrackAnalyticsEvent.tsx b/static/gsApp/utils/rawTrackAnalyticsEvent.tsx index fbdf16938ec016..520f98b8284265 100644 --- a/static/gsApp/utils/rawTrackAnalyticsEvent.tsx +++ b/static/gsApp/utils/rawTrackAnalyticsEvent.tsx @@ -10,6 +10,9 @@ import localStorage from 'sentry/utils/localStorage'; import sessionStorage from 'sentry/utils/sessionStorage'; import type {Subscription} from 'getsentry/types'; +import {hasNewBillingUI} from 'getsentry/utils/billing'; +import {GETSENTRY_EVENT_MAP} from 'getsentry/utils/trackGetsentryAnalytics'; +import {hasNewCheckout} from 'getsentry/views/amCheckout/utils'; import trackAmplitudeEvent from './trackAmplitudeEvent'; import trackMarketingEvent from './trackMarketingEvent'; @@ -179,6 +182,11 @@ export default function rawTrackAnalyticsEvent( // pass in properties if we have the full organization if (isFullOrganization(organization)) { data.role = organization.orgRole; + + if (eventKey in GETSENTRY_EVENT_MAP) { + data.isNewCheckout = hasNewCheckout(organization); + data.isNewBillingUI = hasNewBillingUI(organization); + } } // add in plan information diff --git a/static/gsApp/utils/trackGetsentryAnalytics.tsx b/static/gsApp/utils/trackGetsentryAnalytics.tsx index e3d923a198d417..8e9b258fc9d0bf 100644 --- a/static/gsApp/utils/trackGetsentryAnalytics.tsx +++ b/static/gsApp/utils/trackGetsentryAnalytics.tsx @@ -22,11 +22,7 @@ type AddEventCTA = HasSub & { source: string; event_types?: string; }; -type CheckoutUI = { - isNewCheckout: boolean; -}; type BillingInfoUpdateEvent = { - isNewBillingUI: boolean; isStripeComponent: boolean; referrer?: string; }; @@ -51,7 +47,7 @@ export type ProductUnavailableUpsellAlert = { type GetsentryEventParameters = { 'add_event_cta.clicked_cta': AddEventCTA; - 'am_checkout.viewed': HasSub & CheckoutUI; + 'am_checkout.viewed': HasSub; 'billing_details.updated_billing_details': BillingInfoUpdateEvent; 'billing_details.updated_cc': BillingInfoUpdateEvent; 'billing_failure.button_clicked': { @@ -80,16 +76,15 @@ type GetsentryEventParameters = { 'checkout.change_contract': Checkout; 'checkout.change_plan': Checkout; 'checkout.click_continue': {step_number: number; step_id?: string} & Checkout; - 'checkout.data_slider_changed': {data_type: string; quantity: number} & CheckoutUI; + 'checkout.data_slider_changed': {data_type: string; quantity: number}; // no sub here; - 'checkout.data_sliders_viewed': Record & CheckoutUI; + 'checkout.data_sliders_viewed': Record; // only used for checkout v3 'checkout.exit': HasSub; - 'checkout.ondemand_budget.turned_off': Record & CheckoutUI; - 'checkout.ondemand_budget.update': OnDemandBudgetUpdate & CheckoutUI; + 'checkout.ondemand_budget.turned_off': Record; + 'checkout.ondemand_budget.update': OnDemandBudgetUpdate; 'checkout.ondemand_changed': {cents: number} & Checkout; - 'checkout.payg_changed': {cents: number; method?: 'button' | 'textbox'} & Checkout & - CheckoutUI; + 'checkout.payg_changed': {cents: number; method?: 'button' | 'textbox'} & Checkout; 'checkout.product_select': Partial< Record< AddOnCategory, @@ -99,8 +94,7 @@ type GetsentryEventParameters = { } > > & - HasSub & - CheckoutUI; + HasSub; 'checkout.transactions_upgrade': { previous_transactions: number; transactions: number; @@ -110,8 +104,7 @@ type GetsentryEventParameters = { // no sub here 'checkout.upgrade': Partial< Record - > & {previous_plan: string} & Checkout & - CheckoutUI; + > & {previous_plan: string} & Checkout; 'data_consent_modal.learn_more': Record; 'data_consent_priority.viewed': Record; 'data_consent_settings.updated': {setting: string; value: FieldValue}; @@ -155,12 +148,8 @@ type GetsentryEventParameters = { 'growth.upsell_feature.clicked': UpsellProvider; 'growth.upsell_feature.confirmed': UpsellProvider; 'learn_more_link.clicked': {source?: string}; - 'ondemand_budget_modal.ondemand_budget.turned_off': Record & { - isNewBillingUI: boolean; - }; - 'ondemand_budget_modal.ondemand_budget.update': OnDemandBudgetUpdate & { - isNewBillingUI: boolean; - }; + 'ondemand_budget_modal.ondemand_budget.turned_off': Record; + 'ondemand_budget_modal.ondemand_budget.update': OnDemandBudgetUpdate; 'partner_billing_migration.banner.clicked_cta': { daysLeft: number; partner: undefined | string; @@ -169,8 +158,7 @@ type GetsentryEventParameters = { applyNow: boolean; daysLeft: number; partner: undefined | string; - } & HasSub & - CheckoutUI; + } & HasSub; 'partner_billing_migration.modal.clicked_cta': { daysLeft: number; partner: undefined | string; @@ -202,8 +190,7 @@ type GetsentryEventParameters = { 'replay.list_page.viewed': UpdateProps; 'sales.contact_us_clicked': { source: string; - } & HasSub & - CheckoutUI; + } & HasSub; 'spend_allocations.open_form': {create_or_edit: string} & HasSub; 'spend_allocations.submit': {create_or_edit: string} & HasSub; 'subscription_page.display_mode.changed': { @@ -246,7 +233,7 @@ type UpdateProps = Pick & export type GetsentryEventKey = keyof GetsentryEventParameters; -const getsentryEventMap: Record = { +export const GETSENTRY_EVENT_MAP: Record = { 'power_icon.clicked': 'Clicked Power Icon', 'github.multi_org.upsell': 'Github Multi-Org Upsell Clicked', 'growth.clicked_enter_sandbox': 'Growth: Clicked Enter Sandbox', @@ -366,6 +353,6 @@ const getsentryEventMap: Record = { const trackGetsentryAnalytics = makeAnalyticsFunction< GetsentryEventParameters, {organization: Organization} ->(getsentryEventMap); +>(GETSENTRY_EVENT_MAP); export default trackGetsentryAnalytics; diff --git a/static/gsApp/views/amCheckout/index.tsx b/static/gsApp/views/amCheckout/index.tsx index 2e03be21642061..4e336c21cc30ba 100644 --- a/static/gsApp/views/amCheckout/index.tsx +++ b/static/gsApp/views/amCheckout/index.tsx @@ -196,7 +196,7 @@ class AMCheckout extends Component { state: State; componentDidMount() { - const {subscription, organization, isNewCheckout} = this.props; + const {subscription, organization} = this.props; /** * Preload Stripe so it's ready when the subscription + cc form becomes * available. `loadStripe` ensures Stripe is not loaded multiple times @@ -213,7 +213,6 @@ class AMCheckout extends Component { trackGetsentryAnalytics('am_checkout.viewed', { organization, subscription, - isNewCheckout: !!isNewCheckout, }); } Sentry.getReplay()?.start(); diff --git a/static/gsApp/views/amCheckout/reserveAdditionalVolume.tsx b/static/gsApp/views/amCheckout/reserveAdditionalVolume.tsx index 8c0c1b5a8d075c..cb4235fabe8657 100644 --- a/static/gsApp/views/amCheckout/reserveAdditionalVolume.tsx +++ b/static/gsApp/views/amCheckout/reserveAdditionalVolume.tsx @@ -74,7 +74,6 @@ function ReserveAdditionalVolume({ organization, data_type: category, quantity: value, - isNewCheckout: true, }); } }, diff --git a/static/gsApp/views/amCheckout/steps/planSelect.tsx b/static/gsApp/views/amCheckout/steps/planSelect.tsx index 6360e52efc99a0..98f47d0ada5755 100644 --- a/static/gsApp/views/amCheckout/steps/planSelect.tsx +++ b/static/gsApp/views/amCheckout/steps/planSelect.tsx @@ -246,7 +246,6 @@ function PlanSelect({ organization, subscription, source: 'checkout.plan_select', - isNewCheckout: false, }); }} /> diff --git a/static/gsApp/views/amCheckout/steps/setPayAsYouGo.tsx b/static/gsApp/views/amCheckout/steps/setPayAsYouGo.tsx index b7ad379e3c0466..092064c50d72ef 100644 --- a/static/gsApp/views/amCheckout/steps/setPayAsYouGo.tsx +++ b/static/gsApp/views/amCheckout/steps/setPayAsYouGo.tsx @@ -95,7 +95,6 @@ function SetPayAsYouGo({ plan: formData.plan, cents: totalBudget || 0, method: fromButton ? 'button' : 'textbox', - isNewCheckout: false, }); } setCurrentBudget(totalBudget); diff --git a/static/gsApp/views/amCheckout/steps/setSpendLimit.tsx b/static/gsApp/views/amCheckout/steps/setSpendLimit.tsx index e2c912c5db249b..4b94fca11af7b9 100644 --- a/static/gsApp/views/amCheckout/steps/setSpendLimit.tsx +++ b/static/gsApp/views/amCheckout/steps/setSpendLimit.tsx @@ -43,7 +43,6 @@ function SetSpendCap({ plan: formData.plan, cents: totalBudget || 0, method: 'textbox', - isNewCheckout: true, }); } }, diff --git a/static/gsApp/views/amCheckout/steps/volumeSliders.tsx b/static/gsApp/views/amCheckout/steps/volumeSliders.tsx index 5815aa8fb44751..5f4441f078face 100644 --- a/static/gsApp/views/amCheckout/steps/volumeSliders.tsx +++ b/static/gsApp/views/amCheckout/steps/volumeSliders.tsx @@ -95,7 +95,6 @@ function VolumeSliders({ organization, data_type: category, quantity: value, - isNewCheckout: !!isNewCheckout, }); } }; diff --git a/static/gsApp/views/amCheckout/utils.tsx b/static/gsApp/views/amCheckout/utils.tsx index 09c71259e99c29..6f2e4d8bf09c16 100644 --- a/static/gsApp/views/amCheckout/utils.tsx +++ b/static/gsApp/views/amCheckout/utils.tsx @@ -395,8 +395,6 @@ function recordAnalytics( isMigratingPartnerAccount: boolean ) { trackMarketingEvent('Upgrade', {plan: data.plan}); - const isNewCheckout = hasNewCheckout(organization); - const currentData: CheckoutData = { plan: data.plan, }; @@ -440,14 +438,12 @@ function recordAnalytics( subscription, ...previousData, ...currentData, - isNewCheckout, }); trackGetsentryAnalytics('checkout.product_select', { organization, subscription, ...productSelectAnalyticsData, - isNewCheckout, }); let {onDemandBudget} = data; @@ -485,7 +481,6 @@ function recordAnalytics( applyNow: data.applyNow ?? false, daysLeft: moment(subscription.contractPeriodEnd).diff(moment(), 'days'), partner: subscription.partner?.partnership.id, - isNewCheckout, }); } } diff --git a/static/gsApp/views/invoiceDetails/paymentForm.tsx b/static/gsApp/views/invoiceDetails/paymentForm.tsx index d3bfbeb7a1aa1a..95c921719e5d70 100644 --- a/static/gsApp/views/invoiceDetails/paymentForm.tsx +++ b/static/gsApp/views/invoiceDetails/paymentForm.tsx @@ -14,7 +14,7 @@ import {useLocation} from 'sentry/utils/useLocation'; import CreditCardForm from 'getsentry/components/creditCardEdit/form'; import type {SubmitData} from 'getsentry/components/creditCardEdit/legacyForm'; import type {Invoice, PaymentCreateResponse} from 'getsentry/types'; -import {hasNewBillingUI, hasStripeComponentsFeature} from 'getsentry/utils/billing'; +import {hasStripeComponentsFeature} from 'getsentry/utils/billing'; import trackGetsentryAnalytics from 'getsentry/utils/trackGetsentryAnalytics'; import {displayPriceWithCents} from 'getsentry/views/amCheckout/utils'; @@ -40,7 +40,6 @@ function InvoiceDetailsPaymentForm({ ); const location = useLocation(); const endpoint = `/organizations/${invoice.customer.slug}/payments/${invoice.id}/new/`; - const isNewBillingUI = hasNewBillingUI(organization); const hasStripeComponents = hasStripeComponentsFeature(organization); const loadData = useCallback(async () => { @@ -83,7 +82,6 @@ function InvoiceDetailsPaymentForm({ trackGetsentryAnalytics('billing_failure.paid_now', { organization, referrer: decodeScalar(location?.query?.referrer), - isNewBillingUI, isStripeComponent: hasStripeComponents, }); addSuccessMessage(t('Payment sent successfully.')); From 480a9de403a1152cee24125a3a2dde0a83e0044e Mon Sep 17 00:00:00 2001 From: isabellaenriquez Date: Tue, 14 Oct 2025 12:14:11 -0400 Subject: [PATCH 4/5] more events --- .../gsApp/utils/trackGetsentryAnalytics.tsx | 25 ++++++++++++++++--- .../components/categoryUsageDrawer.tsx | 15 ++++++++--- .../components/subscriptionPageContainer.tsx | 2 +- .../views/subscriptionPage/notifications.tsx | 6 +++++ .../views/subscriptionPage/paymentHistory.tsx | 7 +++++- .../views/subscriptionPage/usageHistory.tsx | 16 ++++++++++++ .../views/subscriptionPage/usageOverview.tsx | 25 ++++++++++++++++--- 7 files changed, 84 insertions(+), 12 deletions(-) diff --git a/static/gsApp/utils/trackGetsentryAnalytics.tsx b/static/gsApp/utils/trackGetsentryAnalytics.tsx index 8e9b258fc9d0bf..2fc444f9fda891 100644 --- a/static/gsApp/utils/trackGetsentryAnalytics.tsx +++ b/static/gsApp/utils/trackGetsentryAnalytics.tsx @@ -196,10 +196,20 @@ type GetsentryEventParameters = { 'subscription_page.display_mode.changed': { display_mode: 'usage' | 'cost'; } & HasSub; - 'subscription_page.usagelog_filter.clicked': {selection: string}; - 'subscription_page.viewed': { - page_tab: string; + 'subscription_page.download_reports.clicked': { + reportType: 'summary' | 'project_breakdown'; + }; + 'subscription_page.usage_overview.add_on_toggled': { + addOnCategory: AddOnCategory; + isOpen: boolean; + } & HasSub; + 'subscription_page.usage_overview.row_clicked': { + dataCategory: DataCategory; } & HasSub; + 'subscription_page.usage_overview.transform_changed': { + transform: string; + } & HasSub; + 'subscription_page.usagelog_filter.clicked': {selection: string}; 'trial_ended_notice.dismissed_understood': HasSub; 'trial_reset_notification.modal_dismissed': HasSub; 'upgrade_now.alert.dismiss': UpdateProps; @@ -299,7 +309,8 @@ export const GETSENTRY_EVENT_MAP: Record = { 'billing_failure.updated_cc': 'Billing Failure: Updated CC', 'add_event_cta.clicked_cta': 'Add Event CTA: Clicked CTA', 'subscription_page.usagelog_filter.clicked': 'Usage Log Filter: Clicked', - 'subscription_page.viewed': 'Subscription Page: Viewed', + 'subscription_page.download_reports.clicked': + 'Subscription Page: Download Reports Clicked', 'sales.contact_us_clicked': 'Clicked Contact Sales', 'disabled_member_view.loaded': 'Disabled Member View: Loaded', 'disabled_member_view.clicked_upgrade_request': @@ -348,6 +359,12 @@ export const GETSENTRY_EVENT_MAP: Record = { 'gen_ai_consent.in_drawer_clicked': 'Gen AI Consent: Clicked In Drawer', 'gen_ai_consent.view_in_settings_clicked': 'Gen AI Consent: View in Settings Clicked', 'subscription_page.display_mode.changed': 'Subscription Page: Display Mode Changed', + 'subscription_page.usage_overview.row_clicked': + 'Subscription Page: Usage Overview Row Clicked', + 'subscription_page.usage_overview.transform_changed': + 'Subscription Page: Usage Overview Transform Changed', + 'subscription_page.usage_overview.add_on_toggled': + 'Subscription Page: Usage Overview Add On Toggled', }; const trackGetsentryAnalytics = makeAnalyticsFunction< diff --git a/static/gsApp/views/subscriptionPage/components/categoryUsageDrawer.tsx b/static/gsApp/views/subscriptionPage/components/categoryUsageDrawer.tsx index ce6915cdb827bc..3557f9eb538b58 100644 --- a/static/gsApp/views/subscriptionPage/components/categoryUsageDrawer.tsx +++ b/static/gsApp/views/subscriptionPage/components/categoryUsageDrawer.tsx @@ -22,6 +22,7 @@ import { getPlanCategoryName, isContinuousProfiling, } from 'getsentry/utils/dataCategory'; +import trackGetsentryAnalytics from 'getsentry/utils/trackGetsentryAnalytics'; import { ProductUsageChart, selectedTransform, @@ -84,12 +85,20 @@ function CategoryUsageDrawer({ title={t('Type')} selected={transform} options={CHART_OPTIONS_DATA_TRANSFORM} - onChange={(val: string) => + onChange={(val: string) => { + trackGetsentryAnalytics( + 'subscription_page.usage_overview.transform_changed', + { + organization, + subscription, + transform: val, + } + ); navigate({ pathname: location.pathname, query: {...location.query, transform: val}, - }) - } + }); + }} /> diff --git a/static/gsApp/views/subscriptionPage/components/subscriptionPageContainer.tsx b/static/gsApp/views/subscriptionPage/components/subscriptionPageContainer.tsx index d95f66394364ff..a5da577fadd508 100644 --- a/static/gsApp/views/subscriptionPage/components/subscriptionPageContainer.tsx +++ b/static/gsApp/views/subscriptionPage/components/subscriptionPageContainer.tsx @@ -32,7 +32,7 @@ function SubscriptionPageContainer({ const isNewBillingUI = hasNewBillingUI(organization); useRouteAnalyticsParams({ - is_new_billing_ui: isNewBillingUI, + isNewBillingUI, }); if (!isNewBillingUI) { diff --git a/static/gsApp/views/subscriptionPage/notifications.tsx b/static/gsApp/views/subscriptionPage/notifications.tsx index f3b98e56498b1c..061647176b6ff1 100644 --- a/static/gsApp/views/subscriptionPage/notifications.tsx +++ b/static/gsApp/views/subscriptionPage/notifications.tsx @@ -151,6 +151,7 @@ function SubscriptionNotifications({subscription}: SubscriptionNotificationsProp /> void; setNotificationThresholds: (newThresholds: ThresholdsType) => void; @@ -365,6 +369,7 @@ function NotificationButtons({ } setNotificationThresholds(backendThresholds); }} + analyticsParams={{isNewBillingUI}} > {t('Reset')} @@ -380,6 +385,7 @@ function NotificationButtons({ notificationThresholds.perProductOndemandPercent.length === 0) } onClick={onSubmit} + analyticsParams={{isNewBillingUI}} > {t('Save changes')} diff --git a/static/gsApp/views/subscriptionPage/paymentHistory.tsx b/static/gsApp/views/subscriptionPage/paymentHistory.tsx index 14288d5f4eaf7d..5197cb5e7a7568 100644 --- a/static/gsApp/views/subscriptionPage/paymentHistory.tsx +++ b/static/gsApp/views/subscriptionPage/paymentHistory.tsx @@ -146,6 +146,7 @@ function ReceiptGrid({ }) { const theme = useTheme(); const isMobile = useMedia(`(width < ${theme.breakpoints.md})`); + const isNewBillingUI = hasNewBillingUI(organization); const getTag = (payment: InvoiceBase) => { const status = payment.amountRefunded @@ -234,7 +235,11 @@ function ReceiptGrid({ {payment.id} - } href={payment.receipt.url}> + } + href={payment.receipt.url} + > {isMobile ? undefined : t('Download PDF')} diff --git a/static/gsApp/views/subscriptionPage/usageHistory.tsx b/static/gsApp/views/subscriptionPage/usageHistory.tsx index 66d20765882b93..e0e7d1176c4a94 100644 --- a/static/gsApp/views/subscriptionPage/usageHistory.tsx +++ b/static/gsApp/views/subscriptionPage/usageHistory.tsx @@ -42,6 +42,7 @@ import { hasNewBillingUI, } from 'getsentry/utils/billing'; import {getPlanCategoryName, sortCategories} from 'getsentry/utils/dataCategory'; +import trackGetsentryAnalytics from 'getsentry/utils/trackGetsentryAnalytics'; import {displayPriceWithCents} from 'getsentry/views/amCheckout/utils'; import ContactBillingMembers from 'getsentry/views/contactBillingMembers'; import SubscriptionPageContainer from 'getsentry/views/subscriptionPage/components/subscriptionPageContainer'; @@ -183,6 +184,7 @@ type RowProps = { }; function UsageHistoryRow({history, subscription}: RowProps) { + const organization = useOrganization(); const [expanded, setExpanded] = useState(history.isCurrent); function renderOnDemandUsage({ @@ -292,6 +294,13 @@ function UsageHistoryRow({history, subscription}: RowProps) { key: 'summary', label: t('Summary'), onAction: () => { + trackGetsentryAnalytics( + 'subscription_page.download_reports.clicked', + { + organization, + reportType: 'summary', + } + ); window.open(history.links.csv, '_blank'); }, }, @@ -299,6 +308,13 @@ function UsageHistoryRow({history, subscription}: RowProps) { key: 'project-breakdown', label: t('Project Breakdown'), onAction: () => { + trackGetsentryAnalytics( + 'subscription_page.download_reports.clicked', + { + organization, + reportType: 'project_breakdown', + } + ); window.open(history.links.csvPerProject, '_blank'); }, }, diff --git a/static/gsApp/views/subscriptionPage/usageOverview.tsx b/static/gsApp/views/subscriptionPage/usageOverview.tsx index ed8f7d4b18f97b..ef2fd09208fe06 100644 --- a/static/gsApp/views/subscriptionPage/usageOverview.tsx +++ b/static/gsApp/views/subscriptionPage/usageOverview.tsx @@ -53,6 +53,7 @@ import { getPlanCategoryName, sortCategories, } from 'getsentry/utils/dataCategory'; +import trackGetsentryAnalytics from 'getsentry/utils/trackGetsentryAnalytics'; import {displayPriceWithCents, getBucket} from 'getsentry/views/amCheckout/utils'; import CategoryUsageDrawer from 'getsentry/views/subscriptionPage/components/categoryUsageDrawer'; import {EMPTY_STAT_TOTAL} from 'getsentry/views/subscriptionPage/usageTotals'; @@ -486,9 +487,18 @@ function UsageOverviewTable({subscription, organization, usageData}: UsageOvervi ? t('Collapse %s details', product) : t('Expand %s details', product) } - onClick={() => - setOpenState(prev => ({...prev, [toggleKey as string]: !isOpen})) - } + onClick={() => { + setOpenState(prev => ({...prev, [toggleKey as string]: !isOpen})); + trackGetsentryAnalytics( + 'subscription_page.usage_overview.add_on_toggled', + { + organization, + subscription, + addOnCategory: toggleKey as AddOnCategory, + isOpen: !!isOpen, + } + ); + }} > {title} @@ -657,6 +667,11 @@ function UsageOverviewTable({subscription, organization, usageData}: UsageOvervi if (row.dataCategory) { const categoryInfo = getCategoryInfoFromPlural(row.dataCategory); if (categoryInfo?.tallyType === 'usage') { + trackGetsentryAnalytics('subscription_page.usage_overview.row_clicked', { + organization, + subscription, + dataCategory: row.dataCategory, + }); navigate({ pathname: location.pathname, query: {...location.query, drawer: row.dataCategory}, @@ -722,6 +737,10 @@ function UsageOverview({subscription, organization, usageData}: UsageOverviewPro aria-label={t('Download as CSV')} disabled={isPending || isError} onClick={() => { + trackGetsentryAnalytics('subscription_page.download_reports.clicked', { + organization, + reportType: 'summary', + }); if (currentHistory) { window.open(currentHistory.links.csv, '_blank'); } From 5e47aaabb1f774cadae17c313f8871fa95c8b180 Mon Sep 17 00:00:00 2001 From: isabellaenriquez Date: Tue, 14 Oct 2025 12:20:28 -0400 Subject: [PATCH 5/5] fix tests --- .../amCheckout/steps/reviewAndConfirm.spec.tsx | 8 -------- static/gsApp/views/onDemandBudgets/utils.tsx | 14 +------------- .../views/subscriptionPage/billingInformation.tsx | 1 - 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/static/gsApp/views/amCheckout/steps/reviewAndConfirm.spec.tsx b/static/gsApp/views/amCheckout/steps/reviewAndConfirm.spec.tsx index 7e4698a2fd1cb2..62875c701a82a9 100644 --- a/static/gsApp/views/amCheckout/steps/reviewAndConfirm.spec.tsx +++ b/static/gsApp/views/amCheckout/steps/reviewAndConfirm.spec.tsx @@ -281,7 +281,6 @@ describe('AmCheckout > ReviewAndConfirm', () => { replays: updatedData.reserved.replays, monitorSeats: updatedData.reserved.monitorSeats, uptime: 1, - isNewCheckout: false, }); expect(trackGetsentryAnalytics).toHaveBeenCalledWith('checkout.product_select', { @@ -291,7 +290,6 @@ describe('AmCheckout > ReviewAndConfirm', () => { enabled: true, previously_enabled: false, }, - isNewCheckout: false, }); expect(trackGetsentryAnalytics).toHaveBeenCalledWith( @@ -404,7 +402,6 @@ describe('AmCheckout > ReviewAndConfirm', () => { spans: updatedData.reserved.spans, profileDuration: updatedData.reserved.profileDuration, uptime: updatedData.reserved.uptime, - isNewCheckout: false, }); expect(trackGetsentryAnalytics).toHaveBeenCalledWith( @@ -415,7 +412,6 @@ describe('AmCheckout > ReviewAndConfirm', () => { applyNow: false, daysLeft: 7, partner: 'FOO', - isNewCheckout: false, } ); }); @@ -504,7 +500,6 @@ describe('AmCheckout > ReviewAndConfirm', () => { monitorSeats: updatedData.reserved.monitorSeats, spans: updatedData.reserved.spans, previous_uptime: 1, - isNewCheckout: false, }); expect(trackGetsentryAnalytics).toHaveBeenCalledWith( @@ -515,7 +510,6 @@ describe('AmCheckout > ReviewAndConfirm', () => { applyNow: true, daysLeft: 20, partner: 'FOO', - isNewCheckout: false, } ); }); @@ -718,7 +712,6 @@ describe('AmCheckout > ReviewAndConfirm', () => { monitorSeats: updatedData.reserved.monitorSeats, uptime: updatedData.reserved.uptime, spans: undefined, - isNewCheckout: false, }); expect(trackGetsentryAnalytics).not.toHaveBeenCalledWith( 'checkout.transactions_upgrade' @@ -786,7 +779,6 @@ describe('AmCheckout > ReviewAndConfirm', () => { monitorSeats: updatedData.reserved.monitorSeats, uptime: updatedData.reserved.uptime, spans: undefined, - isNewCheckout: false, }); expect(trackGetsentryAnalytics).not.toHaveBeenCalledWith( diff --git a/static/gsApp/views/onDemandBudgets/utils.tsx b/static/gsApp/views/onDemandBudgets/utils.tsx index 395c09904ac737..07e1d7edef112c 100644 --- a/static/gsApp/views/onDemandBudgets/utils.tsx +++ b/static/gsApp/views/onDemandBudgets/utils.tsx @@ -13,18 +13,13 @@ import type { SubscriptionOnDemandBudgets, } from 'getsentry/types'; import {BillingType, OnDemandBudgetMode} from 'getsentry/types'; -import { - displayBudgetName, - getOnDemandCategories, - hasNewBillingUI, -} from 'getsentry/utils/billing'; +import {displayBudgetName, getOnDemandCategories} from 'getsentry/utils/billing'; import { getCategoryInfoFromPlural, getPlanCategoryName, } from 'getsentry/utils/dataCategory'; import formatCurrency from 'getsentry/utils/formatCurrency'; import trackGetsentryAnalytics from 'getsentry/utils/trackGetsentryAnalytics'; -import {hasNewCheckout} from 'getsentry/views/amCheckout/utils'; export function parseOnDemandBudgetsFromSubscription( subscription: Subscription @@ -198,13 +193,6 @@ export function trackOnDemandBudgetAnalytics( const newBudgetMode = newBudget.budgetMode; const analyticsParams: Record = {}; - if (prefix === 'checkout') { - const isNewCheckout = hasNewCheckout(organization); - analyticsParams.isNewCheckout = isNewCheckout; - } else if (prefix === 'ondemand_budget_modal') { - const isNewBillingUI = hasNewBillingUI(organization); - analyticsParams.isNewBillingUI = isNewBillingUI; - } if (totalBudget > 0 && previousTotalBudget !== totalBudget) { const newBudgets: Partial> = {}; diff --git a/static/gsApp/views/subscriptionPage/billingInformation.tsx b/static/gsApp/views/subscriptionPage/billingInformation.tsx index 36d8fddec78955..47ca891197ba42 100644 --- a/static/gsApp/views/subscriptionPage/billingInformation.tsx +++ b/static/gsApp/views/subscriptionPage/billingInformation.tsx @@ -1,4 +1,3 @@ -import {useEffect} from 'react'; import type {Location} from 'history'; import {Flex} from 'sentry/components/core/layout';