@burst/react-gtm
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

@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:

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @burst/react-gtm

Weekly Downloads

15

Version

0.2.0

License

MIT

Unpacked Size

16.9 kB

Total Files

11

Last publish

Collaborators

  • joriregter
  • burst-bot
  • carinhansen
  • perryjanssen
  • fvanharreveld
  • robinheij
  • dennistimmers