Skip to content

Commit

Permalink
chore: add credits cta dismissed report (#25288)
Browse files Browse the repository at this point in the history
  • Loading branch information
zlwaterfield authored Sep 30, 2024
1 parent 8056a7c commit 761c6ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frontend/src/scenes/billing/CreditCTAHero.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const CreditCTAHero = (): JSX.Element | null => {
onClick={() => showPurchaseCreditsModal(true)}
className="mt-4"
>
Buy credits
Learn more
</LemonButton>
{creditOverview.estimated_monthly_credit_amount_usd > 1 && (
<>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/scenes/billing/PurchaseCreditsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ export const PurchaseCreditsModal = (): JSX.Element | null => {
text:
creditInputValue >= 100000 ? (
<>
<IconCheckCircle className="text-success" /> 30% off
<IconCheckCircle className="text-success" /> 35% off
</>
) : (
'30% off'
'35% off'
),
prefix: '$',
value: 100000,
Expand Down
7 changes: 6 additions & 1 deletion frontend/src/scenes/billing/billingLogic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,11 @@ export const billingLogic = kea<billingLogicType>([
estimated_monthly_credit_amount_usd: creditOverview.estimated_monthly_credit_amount_usd,
})
},
toggleCreditCTAHeroDismissed: ({ isDismissed }) => {
if (isDismissed) {
posthog.capture('credits cta hero dismissed')
}
},
loadBillingSuccess: () => {
if (
router.values.location.pathname.includes('/organization/billing') &&
Expand Down Expand Up @@ -635,7 +640,7 @@ export const billingLogic = kea<billingLogicType>([
const spend = +value
let discount = 0
if (spend >= 100000) {
discount = 0.3
discount = 0.35
} else if (spend >= 60000) {
discount = 0.25
} else if (spend >= 20000) {
Expand Down

0 comments on commit 761c6ce

Please sign in to comment.