@twinalyze/web-analytics 1.0.7 → 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 +23 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,26 +1,36 @@
|
|
|
1
|
+
<img src="https://twinnettechnologies.com/twinalyze.com/assets/main-logo.png" alt="Twinalyze Logo" width="200"/>
|
|
2
|
+
|
|
1
3
|
# @twinalyze/web-analytics
|
|
2
4
|
|
|
3
5
|
**Twinalyze Web Analytics SDK** for tracking events, sessions, users, and performance in modern web applications.
|
|
4
6
|
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
You can install the package via npm:
|
|
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.
|
|
8
9
|
|
|
10
|
+
**Using npm CLI:**
|
|
9
11
|
```bash
|
|
10
12
|
npm install @twinalyze/web-analytics
|
|
13
|
+
```
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
<!-- **Using yarn CLI:**
|
|
16
|
+
```bash
|
|
17
|
+
yarn add @twinalyze/web-analytics
|
|
18
|
+
``` -->
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
Import the package into your project and initialize it with your API key.
|
|
21
|
+
```bash
|
|
16
22
|
import { Twinalyze } from '@twinalyze/web-analytics';
|
|
17
23
|
|
|
18
|
-
Next, initialize the SDK with your API key:
|
|
19
24
|
TwinalyzeAnalytics.init({ apiKey: 'YOUR_API_KEY' , organization: 'YOUR_ORG_KEY' });
|
|
20
|
-
|
|
25
|
+
```
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twinalyze/web-analytics",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Twinalyze Web Analytics SDK for tracking events, sessions, users, and performance in modern web applications.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|