// biome-ignore lint/suspicious/noExplicitAny: <explanation>
type EventParams<T = any> = {
	[key: string]: T;
};

export function logEvent(action: string, params?: EventParams) {
	if (typeof window === "undefined" || !window.gtag) return;
	window.gtag("event", action, params || {});
}
