@nbcom/services
v0.2.27
Published
[![N|Solid](https://svgshare.com/i/nwR.svg)](nbcomputers.ru)
Downloads
77
Readme
Services
Installation
@nbcom/services requires Node.js v16+ to run.
Install the package
npm install @nbcom/services
1. 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()
}, []);
...