mirror of
https://github.com/jjbrunton/Sauci.git
synced 2026-10-31 18:19:43 +00:00
fix(web): redact invite analytics URLs
This commit is contained in:
1 parent
ff2cf09170
commit
ade2c42d51
3 files changed
+50
-11
No files matched your search
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user