declare interface gWindow extends Window {
  dataLayer: any[];
}

declare let window: gWindow;

export class GtmModule {
  public static push(obj: any, clearEcommerce: boolean = true) {
    if (clearEcommerce) {
      GtmModule.push({ ecommerce: null }, false);
    }

    window.dataLayer.push(obj);
  }
}
