gtag-ga
Version:
Google Analytics 4 (gtag.js) for NodeJS ES Module. Simple installation to send page views or event tracking.
17 lines (16 loc) • 576 B
TypeScript
/// <reference types="gtag.js" />
import ControlParams = Gtag.ControlParams;
import EventParams = Gtag.EventParams;
import ConfigParams = Gtag.ConfigParams;
import CustomParams = Gtag.CustomParams;
declare global {
interface Window {
dataLayer: any[];
}
}
export default class GtagGA {
static initializeGtag(trackingId: string, config?: ControlParams | EventParams | ConfigParams | CustomParams): void;
static gtag(...args: any[]): void;
}
export { GtagGA };
export declare const initializeGtag: typeof GtagGA.initializeGtag, gtag: typeof GtagGA.gtag;