@metricasboss/typescript-datalayer
v1.2.1
Published
TypeScript package for Google Tag Manager's dataLayer implementation
Downloads
1,685
Readme
dataLayer
TypeScript package for Google Tag Manager's dataLayer implementation
Instalation
Using npm:
$ npm i @metricasboss/typescript-datalayer
or.
$ yarn add @metricasboss/typescript-datalayer
Usage
You can see more in the example folder
//App.ts
import dataLayer from "@metricasboss/typescript-datalayer";
function App() {
const countClick = () => {
dataLayer.customEvent("countClicked", { name: "test" });
};
return (
<div className="App">
<button type="button" onClick={countClick}>
{`Click me`}
</button>
</div>
);
}