diff --git a/src/google-tag-manager.ts b/src/google-tag-manager.ts index 293d13f..fa6b2c5 100644 --- a/src/google-tag-manager.ts +++ b/src/google-tag-manager.ts @@ -19,8 +19,11 @@ export class BalGoogleTagManager { this.runGtmScript(settings.apiKey); } } - - // should be avoided + + /** + * @deprecated this method should not be used + * @param settings GTM settings for application + */ public loadForce(settings: GtmSettings): void { this.runGtmScript(settings.apiKey); } @@ -36,6 +39,12 @@ export class BalGoogleTagManager { } }; + public sendCustomEvent(event: any): void { + if (event) { + this.googleAnalyticsSendEvent(event); + } + } + /* eslint-disable @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call */ private runGtmScript(apiKey: string): void { const w: any = window;