ngx-google-analytics
Version:
A simple ng-9 wrapper to load Google Analytics dependency by angular way
13 lines (12 loc) • 650 B
TypeScript
import { Provider } from '@angular/core';
import { IGoogleAnalyticsSettings } from '../interfaces/i-google-analytics-settings';
import { GtagFn } from '../types/gtag.type';
/**
* Provide a DI Configuration to attach GA Initialization at Angular Startup Cycle.
*/
export declare const NGX_GOOGLE_ANALYTICS_INITIALIZER_PROVIDER: Provider;
/**
* Create a script element on DOM and link it to Google Analytics tracking code URI.
* After that, execute exactly same init process as tracking snippet code.
*/
export declare function GoogleAnalyticsInitializer(settings: IGoogleAnalyticsSettings, gtag: GtagFn, document: Document): () => Promise<void>;