UNPKG

view-analytics-js

Version:

A lightweight JavaScript/TypeScript library to track viewing analytics for web pages, with Supabase backend integration.

13 lines (11 loc) 461 B
/** * Initializes the library with the application owner’s API key and website ID. * @param websiteId - The unique identifier for the website. * @param baseUrl - The optional base URL for the analytics backend. */ declare function initializeAnalytics(websiteId: string, baseUrl?: string): void; /** * Tracks a page view by sending analytics data to the backend. */ declare function trackPageView(): void; export { initializeAnalytics, trackPageView };