@twinalyze/web-analytics 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ <img src="https://twinnettechnologies.com/twinalyze.com/assets/main-logo.png" alt="Twinalyze Logo" width="200"/>
2
+
3
+ # @twinalyze/web-analytics
4
+
5
+ **Twinalyze Web Analytics SDK** for tracking events, sessions, users, and performance in modern web applications.
6
+
7
+ ## Installation and Quick Start
8
+ To get started with using Twinalyze Web SDK, install the package to your project via npm, yarn or script loader.
9
+
10
+ **Using npm CLI:**
11
+ ```bash
12
+ npm install @twinalyze/web-analytics
13
+ ```
14
+
15
+ <!-- **Using yarn CLI:**
16
+ ```bash
17
+ yarn add @twinalyze/web-analytics
18
+ ``` -->
19
+
20
+ Import the package into your project and initialize it with your API key.
21
+ ```bash
22
+ import { Twinalyze } from '@twinalyze/web-analytics';
23
+
24
+ TwinalyzeAnalytics.init({ apiKey: 'YOUR_API_KEY' , organization: 'YOUR_ORG_KEY' });
25
+ ```
26
+
27
+ Installing via script loader
28
+ ```bash
29
+ <script src="https://cdn.jsdelivr.net/npm/@twinalyze/web-analytics@1.0.6/dist/cdn.global.min.js"></script>
30
+ ```
31
+
32
+ ## Tracking events
33
+ Once the SDK is initialize, you can start tracking events.
34
+ ```bash
35
+ TwinalyzeAnalytics.track('Custom_Event_Name', { label: 'Event Label' , value: 100 })
36
+ ```