@apstal/analytics 1.0.1 โ 1.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 +41 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,55 +1,69 @@
|
|
|
1
|
-
# apstal
|
|
1
|
+
# @apstal/analytics
|
|
2
2
|
|
|
3
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
4
|
|
|
5
|
-
|
|
5
|
+
---
|
|
6
6
|
|
|
7
|
-
|
|
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.
|
|
7
|
+
## ๐ Quick Start Guide (Step-by-Step)
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
Follow these steps to integrate Apstal AI Web Analytics into your website:
|
|
13
10
|
|
|
14
|
-
|
|
11
|
+
### Step 1: Sign Up & Log In
|
|
12
|
+
1. Go to [apstal.com/chat](https://apstal.com/chat).
|
|
13
|
+
2. Log in using your Google account or email.
|
|
14
|
+
|
|
15
|
+
### Step 2: Enter Your Website URL
|
|
16
|
+
On the onboarding screen, enter your website's URL (e.g., `yoursite.com`) and click **"Continue"**. Apstal will automatically create your project, detect your website's tech stack, and generate your unique **Project ID** (looks like `xxxx-xxxx-xxxx`).
|
|
17
|
+
|
|
18
|
+
### Step 3: Install the Package
|
|
19
|
+
Run the following command in your website project's root folder:
|
|
15
20
|
|
|
16
21
|
```bash
|
|
17
|
-
npm install apstal
|
|
22
|
+
npm install @apstal/analytics
|
|
18
23
|
```
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
### Step 4: Initialize Apstal in Your Code
|
|
26
|
+
|
|
27
|
+
#### For Single Page Applications (React, Next.js, Vue, Nuxt)
|
|
28
|
+
Import the initialization function in your main entry file (e.g., `layout.tsx`, `App.js`, or `index.js`) and run it:
|
|
29
|
+
|
|
30
|
+
```javascript
|
|
31
|
+
import { initApstal } from '@apstal/analytics';
|
|
21
32
|
|
|
22
|
-
|
|
33
|
+
// Initialize the tracker
|
|
34
|
+
initApstal('YOUR_PROJECT_ID'); // Replace with the Project ID from Step 2
|
|
35
|
+
```
|
|
23
36
|
|
|
24
|
-
|
|
37
|
+
#### For Classic HTML Pages
|
|
38
|
+
If you are building a static landing page or a WordPress site, add this code block before the closing `</body>` tag of your HTML:
|
|
25
39
|
|
|
26
40
|
```html
|
|
27
41
|
<script
|
|
28
42
|
defer
|
|
29
43
|
data-project="YOUR_PROJECT_ID"
|
|
30
|
-
src="/node_modules/
|
|
44
|
+
src="/node_modules/@apstal/analytics/src/apstal.js">
|
|
31
45
|
</script>
|
|
32
46
|
```
|
|
33
47
|
|
|
34
|
-
###
|
|
48
|
+
### Step 5: Start Talking to Your AI Analyst
|
|
49
|
+
Deploy your website, open a few pages, and click a few buttons. Go back to [apstal.com/chat](https://apstal.com/chat). The system will automatically detect the installation, and you can start asking the AI assistant conversational questions about your visitors' behavior (e.g., *"why did mobile users drop off today?"*).
|
|
35
50
|
|
|
36
|
-
|
|
51
|
+
---
|
|
37
52
|
|
|
38
|
-
|
|
39
|
-
// Import the tracker
|
|
40
|
-
import 'apstal-analytics';
|
|
53
|
+
## ๐ก๏ธ Privacy & Compliance
|
|
41
54
|
|
|
42
|
-
|
|
43
|
-
window.APSTAL_PROJECT_ID = "YOUR_PROJECT_ID";
|
|
44
|
-
```
|
|
55
|
+
Apstal processes data in compliance with applicable data protection laws, including the GDPR and CCPA:
|
|
45
56
|
|
|
46
|
-
|
|
57
|
+
- ๐ช๐บ **GDPR & CCPA Compliant**: Apstal processes data strictly as a **Data Processor** on behalf of the Customer (the **Data Controller**), ensuring full compliance with GDPR and CCPA under our Data Processing Addendum (DPA).
|
|
58
|
+
- ๐ต๏ธโโ๏ธ **Cookieless Telemetry**: Does not use cookies, LocalStorage, or SessionStorage to track users across domains, minimizing legal compliance overhead.
|
|
59
|
+
- ๐งผ **Client-Side PII Masking**: Forcefully replaces all Personally Identifiable Information (PII), passwords, and form inputs with asterisks (`***`) directly inside the visitor's browser *before* any transmission to the servers.
|
|
60
|
+
- ๐ **IP Anonymization**: Momentarily processes IP addresses for geolocation and network classification. The raw IP address string is **never stored** in the database and is discarded immediately.
|
|
61
|
+
- โ๏ธ **Consent & CMP Support**: Fully supports external Consent Management Platforms (CMPs). The implementation of appropriate cookie banners and consent mechanisms remains the sole responsibility of the site owner (Data Controller).
|
|
47
62
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
```
|
|
63
|
+
For more details, please review our official legal documents:
|
|
64
|
+
- ๐ [Data Processing Addendum (DPA)](https://apstal.com/dpa)
|
|
65
|
+
- ๐ [Privacy Policy](https://apstal.com/privacy)
|
|
66
|
+
- ๐ [Terms of Service](https://apstal.com/terms)
|
|
53
67
|
|
|
54
68
|
## License
|
|
55
69
|
|