eanalytics-react
v0.7.0
Published
Eulerian Technologies Analytics javascript library
Downloads
6
Readme
Eulerian Analytics
Installation
npm install eanalytics-react --save
Usage
import React from "react";
import EAnalytics from "eanalytics-react";
EAnalytics.initialize("domain.client.tld");
Track events
import React from "react";
import EAnalytics from "eanalytics-react";
function AddToCartButton() {
const handleClick = (e) => {
e.preventDefault();
EAnalytics.track([
"uid",
"73467",
"prdref",
"C4356",
"prdname",
"Veste_cuir_marqueA",
]);
// ...
};
return <button onClick={handleClick}>Add to cart</button>;
}