This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
website/src/utils/gtag.ts

20 lines
339 B
TypeScript

import { Event } from 'config/analytics';
type GTagFN = (
type: 'event',
event: Event,
params: { [key: string]: string }
) => void;
interface customWindow extends Window {
gtag: GTagFN;
}
declare const window: customWindow;
const gtag: GTagFN = (t, event, params) => {
window.gtag(t, event, params);
};
export default gtag;