@shopana/ga
Version:
Type-safe Google Analytics 4 (GA4) tracking library for React and Next.js with ecommerce support, event batching, and SSR compatibility
20 lines • 472 B
JavaScript
import {} from '../types/common';
export class DebugChannel {
constructor() {
this.listeners = new Set();
}
emit(event) {
this.listeners.forEach((listener) => {
try {
listener(event);
}
catch {
}
});
}
subscribe(listener) {
this.listeners.add(listener);
return () => this.listeners.delete(listener);
}
}
//# sourceMappingURL=debugChannel.js.map