@shopana/ga
Version:
Type-safe Google Analytics 4 (GA4) tracking library for React and Next.js with ecommerce support, event batching, and SSR compatibility
23 lines • 669 B
JavaScript
import {} from '../types/common';
import {} from '../types/events';
export function buildLoginEvent(params) {
if (!params.measurementId) {
throw new Error('measurementId is required for login');
}
return {
name: 'login',
measurementId: params.measurementId,
params: { method: params.method },
};
}
export function buildSignUpEvent(params) {
if (!params.measurementId) {
throw new Error('measurementId is required for sign_up');
}
return {
name: 'sign_up',
measurementId: params.measurementId,
params: { method: params.method },
};
}
//# sourceMappingURL=authTracking.js.map