1.1.0 • Published 9 months ago
@datafloww/analytics v1.1.0
Installation
To install the @datafloww/analytics package, run:
npm install @datafloww/analyticsInitialization
To initialize the analytics library, import the Analytics class and call the init method with your write key:
import { Analytics } from "@datafloww/analytics";
const analytics = Analytics.init({ key: "YOUR_WRITE_KEY" });Usage
You can now use the analytics instance to track custom events. Here is an example:
// Example: Track a custom event
analytics.track("event_name", {
property1: "value1",
property2: "value2",
});