MCPcopy Create free account
hub / github.com/FirebaseExtended/reactfire / MyPageViewLogger

Function MyPageViewLogger

example/withoutSuspense/Analytics.tsx:6–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4
5
6function MyPageViewLogger() {
7 const analytics = useAnalytics()
8
9 React.useEffect(() => {
10 logEvent(analytics, 'page_view', { page_location: location.href });
11 }, [location.href])
12
13 return null
14}
15
16export function Analytics() {
17 const app = useFirebaseApp();

Callers

nothing calls this directly

Calls 1

useAnalyticsFunction · 0.85

Tested by

no test coverage detected