UNPKG

ngx-google-analytics

Version:

A simple ng-9 wrapper to load Google Analytics dependency by angular way

29 lines (28 loc) 2.01 kB
import { ModuleWithProviders } from '@angular/core'; import { IGoogleAnalyticsCommand } from './interfaces/i-google-analytics-command'; import * as i0 from "@angular/core"; import * as i1 from "./directives/ga-event.directive"; import * as i2 from "./directives/ga-event-category.directive"; import * as i3 from "./directives/ga-event-form-input.directive"; /** * Install Google Analytics Tracking code on your environment and configure tracking ID. * * This module should be a dependency on the highest level module of the application, i.e. AppModule in most use cases. */ export declare class NgxGoogleAnalyticsModule { /** * You should provide a valid Google TrackingCode. This code will be provided to the entire application by * `NGX_GOOGLE_ANALYTICS_SETTINGS_TOKEN` token. You can inject this code in you components if you like by * use the following injection code `@Inject(NGX_GOOGLE_ANALYTICS_SETTINGS_TOKEN) gaConfig: IGoogleAnalyticsSettings` * * @param trackingCode The Google Tracking Code * @param initCommands When placed, it will run any GA Commands in sequence after setup GA environment. * @param uri When placed, it will change the default js URI to the provided one. * @param enableTracing When true, trace GA tracking errors on production mode. * @param nonce When placed, nonce will be added to script tag. */ static forRoot(trackingCode: string, initCommands?: IGoogleAnalyticsCommand[], uri?: string, enableTracing?: boolean, nonce?: string): ModuleWithProviders<NgxGoogleAnalyticsModule>; static ɵfac: i0.ɵɵFactoryDeclaration<NgxGoogleAnalyticsModule, never>; static ɵmod: i0.ɵɵNgModuleDeclaration<NgxGoogleAnalyticsModule, [typeof i1.GaEventDirective, typeof i2.GaEventCategoryDirective, typeof i3.GaEventFormInputDirective], never, [typeof i1.GaEventDirective, typeof i2.GaEventCategoryDirective, typeof i3.GaEventFormInputDirective]>; static ɵinj: i0.ɵɵInjectorDeclaration<NgxGoogleAnalyticsModule>; }