Skip to content

Commit

Permalink
feat(): ga can be disabled with local storage key ga_debug_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
hirsch88 committed Aug 22, 2024
1 parent 289bb13 commit 5ce1463
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/google-tag-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class BalGoogleTagManager {

public isEnabled(): boolean {
const win = window
return win && ((win as any)[DATA_LAYER] != null || win.localStorage.getItem('ga_debug_mode') === 'true');
return win && (win as any)[DATA_LAYER] != null && win.localStorage.getItem('ga_debug_mode') !== 'true';
}

public load(settings: GtmSettings): void {
Expand Down

0 comments on commit 5ce1463

Please sign in to comment.