UNPKG

@dotcms/analytics

Version:

Official JavaScript library for Content Analytics with DotCMS.

15 lines (14 loc) 692 B
import { ReactElement } from 'react'; import { DotCMSAnalyticsConfig } from '../../core/shared/models'; /** * Client bootstrapper for dotCMS Analytics in React/Next. * - No UI: initializes the analytics singleton from props or env config. * - If auto tracking is enabled, hooks into Next App Router to send page views. * - Automatically wraps in Suspense boundary for Next.js App Router compatibility. * * @param props.config - Optional analytics configuration. If provided, overrides env config. */ export interface DotContentAnalyticsProps { config: DotCMSAnalyticsConfig; } export declare function DotContentAnalytics({ config }: DotContentAnalyticsProps): ReactElement | null;