ngx-google-analytics
Version:
A simple ng-9 wrapper to load Google Analytics dependency by angular way
13 lines (12 loc) • 560 B
TypeScript
import { InjectionToken } from '@angular/core';
import { GtagFn } from '../types/gtag.type';
import { DataLayer } from '../types/data-layer.type';
import { GaWindow } from './ngx-google-analytics-window';
/**
* Check if there is some global function called gtag on Window object, or create an empty function to doesn't brake codes...
*/
export declare function getGtagFn(window: GaWindow, dataLayer: DataLayer): GtagFn;
/**
* Provides an injection token to access Google Analytics Gtag Function
*/
export declare const NGX_GTAG_FN: InjectionToken<GtagFn>;