react-tracking-sdk
v1.0.12
Published
A lightweight SDK for tracking user events in React applications.
Downloads
2
Readme
import SDK from 'react-tracking-sdk'; const endpoint = 'XXXXXXXXXXXXXXXXXXXX';
useEffect(() => { const sdk = new SDK(endpoint); const tracker = sdk.getTracker(); tracker.trackPageView('Home Page'); }, []);
const handleButtonClick = () => { const sdk = new SDK(endpoint); const tracker = sdk.getTracker(); tracker.trackButtonClick('Sample Button'); };