diff --git a/src/google-maps.ts b/src/google-maps.ts deleted file mode 100644 index 41c8893..0000000 --- a/src/google-maps.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any */ - -const GOOGLE = 'google'; -const getGoogleMapsSrc = (version: string, apiKey: string) => - `//maps.googleapis.com/maps/api/js?libraries=places&v=${version}&key=${apiKey}`; - -export default class BalGoogleMaps { - public static isEnabled(): boolean { - return (window as any)[GOOGLE] != null - && (window as any)[GOOGLE].maps != null; - } - - - public static load(settings: { version: string, apiKey: string }): void { - if (!this.isEnabled()) { - this.loadScript(getGoogleMapsSrc(settings.version, settings.apiKey)); - } else { - throw new Error('Google Maps API loaded already'); - } - } - - - private static loadScript(src: string): void { - const node = document.createElement('script'); - node.src = src; - node.type = 'text/javascript'; - node.async = false; - document.getElementsByTagName('head')[0].appendChild(node); - } -} diff --git a/src/google-tag-manager.ts b/src/google-tag-manager.ts index d839eb3..c7aca51 100644 --- a/src/google-tag-manager.ts +++ b/src/google-tag-manager.ts @@ -1,5 +1,4 @@ const DATA_LAYER = 'dataLayer'; -const VIRTUAL_FUNNEL_CLICK = 'VirtualFunnelClick'; /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any */ export interface GtmSettings { @@ -29,17 +28,6 @@ export class BalGoogleTagManager { this.runGtmScript(settings.apiKey); } - public sendClickEvent(label: string): void { - if (label) { - this.googleAnalyticsSendEvent({ - event: VIRTUAL_FUNNEL_CLICK, - VirtualClickCategory: VIRTUAL_FUNNEL_CLICK, - VirtualClickAction: this.applicationName, - VirtualClickLabel: label - }); - } - }; - public sendCustomEvent(event: any): void { if (event) { this.googleAnalyticsSendEvent(event); diff --git a/src/index.ts b/src/index.ts index 594161c..48a417f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,3 +1,2 @@ -export * from './google-maps'; export * from './google-tag-manager'; export * from './gtm.model';