0.2.0 • Published 4 years ago
@burst/react-gtm
Licence
MIT
Version
0.2.0
Deps
0
Size
17 kB
Vulns
0
Weekly
0
@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.