@apstal/analytics 1.0.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,6 @@
1
+ # Changelog
2
+
3
+ All notable changes to the Apstal tracker will be documented here.
4
+
5
+ ## [1.0.0] - 2026-04-26
6
+
package/README.md ADDED
@@ -0,0 +1,56 @@
1
+ # apstal-analytics
2
+
3
+ Official open-source tracking library for [Apstal](https://apstal.com) — the autonomous conversational AI Web Analyst that helps you find and explain user drop-offs, rage clicks, and conversion leaks in plain language.
4
+
5
+ ## Features
6
+
7
+ - 🕵️‍♂️ **Cookieless Tracking**: No user-identifiable cookies stored.
8
+ - ⚡ **Lightweight & Fast**: Extremely minimal overhead, optimized payload sizing.
9
+ - 🤖 **AI-Ready Telemetry**: Collects detailed interaction data (dead clicks, rage clicks, hesitation, and scroll speed) for the AI Analyst.
10
+ - 🛡️ **PII Redaction**: Automatical scrubbing of emails, cards, SSNs, and passwords before sending.
11
+
12
+ ## Installation
13
+
14
+ Install via npm:
15
+
16
+ ```bash
17
+ npm install apstal-analytics
18
+ ```
19
+
20
+ ## Integration
21
+
22
+ ### 1. HTML Script Method (Recommended)
23
+
24
+ Insert the tracker into your HTML using the package script (or a self-hosted bundle):
25
+
26
+ ```html
27
+ <script
28
+ defer
29
+ data-project="YOUR_PROJECT_ID"
30
+ src="/node_modules/apstal-analytics/src/apstal.js">
31
+ </script>
32
+ ```
33
+
34
+ ### 2. Single Page Applications (React, Vue, Next.js, Nuxt)
35
+
36
+ For modern JS frameworks, import the package in your entry point:
37
+
38
+ ```javascript
39
+ // Import the tracker
40
+ import 'apstal-analytics';
41
+
42
+ // Make sure window configuration is set before import or initialized in script
43
+ window.APSTAL_PROJECT_ID = "YOUR_PROJECT_ID";
44
+ ```
45
+
46
+ For advanced settings, you can override the API endpoint:
47
+
48
+ ```javascript
49
+ window.APSTAL_PROJECT_ID = "YOUR_PROJECT_ID";
50
+ window.APSTAL_ENDPOINT = "https://your-custom-proxy.com/api/v1/m";
51
+ import 'apstal-analytics';
52
+ ```
53
+
54
+ ## License
55
+
56
+ AGPL-3.0. Copyright (c) 2025-2026 Apstal.
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@apstal/analytics",
3
+ "version": "1.0.0",
4
+ "description": "Official tracking library for Apstal — the conversational AI Web Analyst.",
5
+ "main": "src/apstal.js",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "git+https://github.com/apstal/analytics.git"
9
+ },
10
+ "keywords": [
11
+ "analytics",
12
+ "cookieless",
13
+ "ai-analyst",
14
+ "conversion",
15
+ "telemetry",
16
+ "user-behavior"
17
+ ],
18
+ "author": "Apstal Team <hello@apstal.com>",
19
+ "license": "AGPL-3.0",
20
+ "bugs": {
21
+ "url": "https://apstal.com/contact"
22
+ },
23
+ "homepage": "https://apstal.com",
24
+ "dependencies": {
25
+ "fflate": "^0.8.2",
26
+ "rrweb": "^2.0.0-alpha.20"
27
+ }
28
+ }