@proyecta-ai/analytics 0.0.1 → 0.0.3
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 +32 -0
- package/package.json +12 -12
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @proyecta-ai/analytics
|
|
2
|
+
|
|
3
|
+
Client-side analytics for Proyecta apps. Captures page views, custom events, and web vitals with automatic session and device tracking.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @proyecta-ai/analytics
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { Analytics } from '@proyecta-ai/analytics';
|
|
15
|
+
|
|
16
|
+
const analytics = new Analytics({
|
|
17
|
+
apiKey: process.env.PROYECTA_API_KEY,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// Track events
|
|
21
|
+
analytics.track('button_clicked', { buttonId: 'signup' });
|
|
22
|
+
|
|
23
|
+
// Track page views
|
|
24
|
+
analytics.page('/dashboard');
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- Automatic session and device fingerprinting
|
|
30
|
+
- Web Vitals collection (LCP, FID, CLS)
|
|
31
|
+
- Batched event delivery
|
|
32
|
+
- Zero-config page view tracking
|
package/package.json
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proyecta-ai/analytics",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3",
|
|
4
4
|
"description": "Analytics client for Proyecta applications",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./
|
|
7
|
-
"types": "./
|
|
6
|
+
"main": "./index.js",
|
|
7
|
+
"types": "./index.js",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"types": "./
|
|
11
|
-
"import": "./
|
|
12
|
-
"default": "./
|
|
10
|
+
"types": "./index.js",
|
|
11
|
+
"import": "./index.js",
|
|
12
|
+
"default": "./index.js"
|
|
13
13
|
},
|
|
14
14
|
"./types": {
|
|
15
|
-
"types": "./
|
|
16
|
-
"import": "./
|
|
15
|
+
"types": "./types.js",
|
|
16
|
+
"import": "./types.js"
|
|
17
17
|
},
|
|
18
18
|
"./schema": {
|
|
19
|
-
"types": "./
|
|
20
|
-
"import": "./
|
|
19
|
+
"types": "./schema.js",
|
|
20
|
+
"import": "./schema.js"
|
|
21
21
|
},
|
|
22
22
|
"./utils": {
|
|
23
|
-
"types": "./
|
|
24
|
-
"import": "./
|
|
23
|
+
"types": "./utils.js",
|
|
24
|
+
"import": "./utils.js"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|