UNPKG

@shopana/ga

Version:

Type-safe Google Analytics 4 (GA4) tracking library for React and Next.js with ecommerce support, event batching, and SSR compatibility

10 lines 382 B
import { BrowserGtagAdapter } from './browserGtag'; import { ServerNoopAdapter } from './serverNoop'; import {} from '../types/platform'; export function createPlatformAdapter() { if (typeof window === 'undefined' || typeof document === 'undefined') { return new ServerNoopAdapter(); } return new BrowserGtagAdapter(); } //# sourceMappingURL=createAdapter.js.map