# @burst/react-gtm

> react-gtm

Latest version **0.2.0** (published 2022-01-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @burst/react-gtm
pnpm add @burst/react-gtm
yarn add @burst/react-gtm
bun add @burst/react-gtm
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.0 |
| Published | 2022-01-28 |
| First published | 2021-10-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Burst Digital |
| Maintainers | joriregter, burst-bot, carinhansen, perryjanssen, fvanharreveld, robinheij, dennistimmers |

## Links

- npm: https://www.npmjs.com/package/@burst/react-gtm
- npm.io page: https://npm.io/package/@burst/react-gtm

## Recent versions

- 0.2.0 (latest) — 2022-01-28
- 0.1.6 — 2021-10-18
- 0.1.5 — 2021-10-14
- 0.1.4 — 2021-10-14

## README

# `@burst/react-gtm`

The React Google Tag Manager module is great for implementing all GTM stuff.

## Usage

First in `_document.tsx`, add these 2 components:

```js
import { GtmBody, GtmHead } from "@burst/react-gtm";
const containerId = "GTM-XXXXXX";

render(
  <Html>
    <Head>
      <GtmHead containerId={containerId} />
    </Head>
    <body>
      <GtmBody containerId={containerId} />
    </body>
  </Html>
);
```

After this, use the `track` function to track any preconfigured event.

---
_Source: https://npm.io/package/@burst/react-gtm · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
