fix(web): redact invite analytics URLs

This commit is contained in:
jjbrunton committed 2026-09-06 12:45:28 +01:00
1 parent ff2cf09170
commit ade2c42d51
3 files changed
+50 -11

No files matched your search

+8 -4
View File
@@ -7,10 +7,14 @@ import { usePostHog } from 'posthog-js/react'
function PostHogPageViewInner() {
const pathname = usePathname()
const searchParams = useSearchParams()
const posthog = usePostHog()
useEffect(() => {
if (pathname && posthog) {
const posthog = usePostHog()
useEffect(() => {
// Invite codes are bearer-like tokens. The join route emits its own
// aggregate-only event, so it must never produce a URL-bearing page view.
if (pathname?.startsWith('/join/')) return
if (pathname && posthog) {
let url = window.origin + pathname
if (searchParams.toString()) {
url = url + '?' + searchParams.toString()