UNPKG

admesh-ui-sdk

Version:

Beautiful, modern React components for displaying AI-powered product recommendations with citation-based conversation ads, auto-triggered widgets, floating chat, conversational interfaces, persistent sidebar, and built-in tracking. Includes zero-code SDK

58 lines 1.97 kB
import { default as React } from 'react'; import { ViewabilityTrackerConfig } from '../types/analytics'; export interface AdMeshViewabilityTrackerProps { /** Ad ID */ adId: string; /** Product ID */ productId?: string; /** Offer ID */ offerId?: string; /** Agent ID */ agentId?: string; /** Recommendation ID (for exposure tracking) */ recommendationId?: string; /** Exposure URL (for MRC-compliant exposure pixel firing) */ exposureUrl?: string; /** Session ID (for exposure tracking) */ sessionId?: string; /** Children to wrap with viewability tracking */ children: React.ReactNode; /** Custom viewability tracker configuration */ config?: Partial<ViewabilityTrackerConfig>; /** CSS class name */ className?: string; /** Inline styles */ style?: React.CSSProperties; /** Callback when viewability state changes */ onViewabilityChange?: (isViewable: boolean) => void; /** Callback when ad becomes visible */ onVisible?: () => void; /** Callback when ad becomes viewable (meets MRC threshold) */ onViewable?: () => void; /** Callback when ad is clicked */ onClick?: () => void; } /** * AdMeshViewabilityTracker Component * * Wraps ad components with comprehensive MRC viewability tracking. * Automatically tracks: * - Viewability (50% visible for 1 second) * - Time metrics (time to viewable, total visible duration, etc.) * - Engagement metrics (hover, focus, clicks, scroll depth) * - Context metrics (device type, viewport size, ad position) * * @example * ```tsx * <AdMeshViewabilityTracker * adId="ad_123" * productId="prod_456" * offerId="offer_789" * onViewable={() => console.log('Ad is viewable!')} * > * <YourAdComponent /> * </AdMeshViewabilityTracker> * ``` */ export declare const AdMeshViewabilityTracker: React.FC<AdMeshViewabilityTrackerProps>; //# sourceMappingURL=AdMeshViewabilityTracker.d.ts.map