@burst/react-gtm
v0.2.0
Published
react-gtm
Downloads
63
Keywords
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:
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.