mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 01:45:10 +03:00
* clean circular deps in telemetry * clean circular deps in command * fix commandmenu circular deps * rm deps.json * fix consent circular dep * fix TOC circular deps * fix wrong import path * fix test types * fix missing fn * undo let change * fix consent component * empty
18 lines
625 B
TypeScript
18 lines
625 B
TypeScript
import { isBrowser } from './helpers'
|
|
|
|
export function getSharedTelemetryData(pathname?: string) {
|
|
return {
|
|
page_url: isBrowser ? window.location.href : '',
|
|
page_title: isBrowser ? document?.title : '',
|
|
pathname: pathname ? pathname : isBrowser ? window.location.pathname : '',
|
|
ph: {
|
|
referrer: isBrowser ? document?.referrer : '',
|
|
language: navigator.language ?? 'en-US',
|
|
user_agent: navigator.userAgent,
|
|
search: isBrowser ? window.location.search : '',
|
|
viewport_height: isBrowser ? window.innerHeight : 0,
|
|
viewport_width: isBrowser ? window.innerWidth : 0,
|
|
},
|
|
}
|
|
}
|