From b4640e26805cf0cce17c053f854f79d3b7c0c0de Mon Sep 17 00:00:00 2001 From: Adam Bowker Date: Thu, 16 Jul 2026 13:30:29 -0400 Subject: [PATCH] chore(code): set billing redirect URL to scroll to phc item --- packages/ui/src/utils/urls.test.ts | 12 +++++++++--- packages/ui/src/utils/urls.ts | 5 ++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/ui/src/utils/urls.test.ts b/packages/ui/src/utils/urls.test.ts index a9e05a1fa6..97cacd95cb 100644 --- a/packages/ui/src/utils/urls.test.ts +++ b/packages/ui/src/utils/urls.test.ts @@ -28,10 +28,16 @@ describe("getPostHogUrl", () => { describe("getBillingUrl", () => { it.each([ - ["us", "https://us.posthog.com/organization/billing/overview"], - ["eu", "https://eu.posthog.com/organization/billing/overview"], + [ + "us", + "https://us.posthog.com/organization/billing/overview?products=posthog_code_usage", + ], + [ + "eu", + "https://eu.posthog.com/organization/billing/overview?products=posthog_code_usage", + ], ] as const)( - "points at /organization/billing/overview on %s", + "points at /organization/billing/overview?products=posthog_code_usage on %s", (region, expected) => { expect(getBillingUrl(region)).toBe(expected); }, diff --git a/packages/ui/src/utils/urls.ts b/packages/ui/src/utils/urls.ts index 669e2940b4..c7aae35811 100644 --- a/packages/ui/src/utils/urls.ts +++ b/packages/ui/src/utils/urls.ts @@ -16,5 +16,8 @@ export function getPostHogUrl( export function getBillingUrl( regionOverride?: CloudRegion | null, ): string | null { - return getPostHogUrl("/organization/billing/overview", regionOverride); + return getPostHogUrl( + "/organization/billing/overview?products=posthog_code_usage", + regionOverride, + ); }