@nbcom/services
v0.2.29
Published
[](nbcomputers.ru)
Downloads
10
Readme
Services
Installation
@nbcom/services requires Node.js v16+ to run.
Install the package
npm install @nbcom/services1. Gtm - Google Tag Manager API
Usage
import { GTM } from "@nbcom/services"
const gtm = new GTM(`GTM_ID`);
...
useEffect(() => {
// Downloading and initializing GTM
gtm.init();
// Pushing some datalayer to GTM
gtm.push({ ... })
// Remove GTM from page
return () => gtm.destroy()
}, []);
...