UNPKG

@dotcms/analytics

Version:

Official JavaScript library for Content Analytics with DotCMS.

21 lines (19 loc) 991 B
import { DotCMSAnalyticsConfig } from '../../dotAnalytics/shared/dot-content-analytics.model'; import { ReactElement, ReactNode } from 'react'; interface DotContentAnalyticsProviderProps { children?: ReactNode; config: DotCMSAnalyticsConfig; } /** * Provider component that initializes and manages DotCMSAnalytics instance. * It makes the analytics functionality available to all child components through React Context. * This component is responsible for: * - Initializing the DotCMSAnalytics singleton instance with the provided config * - Making the instance accessible via useContext hook to child components * - Managing the lifecycle of the analytics instance * * @param {DotContentAnalyticsProviderProps} props - Configuration and children to render * @returns {ReactElement} Provider component that enables analytics tracking */ export declare const DotContentAnalyticsProvider: ({ children, config }: DotContentAnalyticsProviderProps) => ReactElement; export {};