UNPKG

umami-analytics-react

Version:

React hooks (useUmami, useUmamiView) and UmamiProvider for seamless Umami analytics integration, supporting page views, custom event tracking, and session identification.

10 lines (9 loc) 247 B
import { createContext } from "react"; const initialState = { umamiRef: null, register: () => null, track: () => null, identify: () => null, view: () => null, }; export const UmamiProviderContext = createContext(initialState);