# @bravobit/ng-google-tag-manager

> The Angular Google Tag Manager library of the Bravobit team.

Latest version **1.15.0** (published 2026-06-14) · 0 weekly downloads

## Install

```sh
npm install @bravobit/ng-google-tag-manager
pnpm add @bravobit/ng-google-tag-manager
yarn add @bravobit/ng-google-tag-manager
bun add @bravobit/ng-google-tag-manager
```

## Health

**Score 55/100 (C)** — status: active.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.15.0 |
| Published | 2026-06-14 |
| First published | 2023-06-25 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 1 |
| Unpacked size | 24.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Stan van Heumen |
| Maintainers | stanvanheumen |

## Links

- npm: https://www.npmjs.com/package/@bravobit/ng-google-tag-manager
- npm.io page: https://npm.io/package/@bravobit/ng-google-tag-manager

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^2.8.1

## Recent versions

- 1.15.0 (latest) — 2026-06-14
- 1.14.0 — 2026-02-12
- 1.13.0 — 2025-11-20
- 1.12.0 — 2025-10-14
- 1.11.0 — 2025-01-01
- 1.10.0 — 2024-05-24
- 1.9.1 — 2024-04-07
- 1.9.0 — 2024-04-05
- 1.8.0 — 2023-11-14
- 1.7.1 — 2023-08-24
- 1.7.0 — 2023-08-24
- 1.6.0 — 2023-08-24
- 1.5.0 — 2023-08-08
- 1.4.1 — 2023-07-14
- 1.4.0 — 2023-07-14
- … 5 more at https://npm.io/package/@bravobit/ng-google-tag-manager/versions

## README

# @bravobit/ng-google-tag-manager

> The Angular Google Tag Manager library of the Bravobit team.

- Use <kbd>⌘ Command</kbd> + <kbd>F</kbd> or <kbd>ctrl</kbd> + <kbd>F</kbd> to search for a keyword.

## Installation

To use the Angular Google Tag Manager in your project install it via `npm`:

```bash
$ npm install @bravobit/ng-google-tag-manager --save
```

## Setup

You need to provide the Google Tag Manager config in your providers array in the `AppModule`.
You can do that by using the `provideGoogleTagManagerConfig()` method.

```typescript
import {provideGoogleTagManagerConfig} from '@bravobit/ng-google-tag-manager';
import {BrowserModule} from '@angular/platform-browser';
import {AppComponent} from './app.component';
import {NgModule} from '@angular/core';

@NgModule({
    imports: [BrowserModule],
    declarations: [AppComponent],
    bootstrap: [AppComponent],
    providers: [
        provideGoogleTagManagerConfig({id: 'GTM-XXXXXXX'})
    ]
})
export class AppModule {
}
```

## Usage

You can use the Tag Manager everywhere in your project. You can simply push any
object to the `window.dataLayer` by using the `.push(object)` method.

```typescript
import {GoogleTagManager} from '@bravobit/ng-google-tag-manager';
import {OnInit} from '@angular/core';

export class AppComponent implements OnInit {

    constructor(private _tagManager: GoogleTagManager) {
    }

    ngOnInit() {
        this._tagManager.push({event: 'app root event'});
    }

}
```

---
_Source: https://npm.io/package/@bravobit/ng-google-tag-manager · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
