@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.
Files changed (2) hide show
  1. package/README.md +41 -27
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,55 +1,69 @@
1
- # apstal-analytics
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
- ## Features
5
+ ---
6
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.
7
+ ## ๐Ÿš€ Quick Start Guide (Step-by-Step)
11
8
 
12
- ## Installation
9
+ Follow these steps to integrate Apstal AI Web Analytics into your website:
13
10
 
14
- Install via npm:
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-analytics
22
+ npm install @apstal/analytics
18
23
  ```
19
24
 
20
- ## Integration
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
- ### 1. HTML Script Method (Recommended)
33
+ // Initialize the tracker
34
+ initApstal('YOUR_PROJECT_ID'); // Replace with the Project ID from Step 2
35
+ ```
23
36
 
24
- Insert the tracker into your HTML using the package script (or a self-hosted bundle):
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/apstal-analytics/src/apstal.js">
44
+ src="/node_modules/@apstal/analytics/src/apstal.js">
31
45
  </script>
32
46
  ```
33
47
 
34
- ### 2. Single Page Applications (React, Vue, Next.js, Nuxt)
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
- For modern JS frameworks, import the package in your entry point:
51
+ ---
37
52
 
38
- ```javascript
39
- // Import the tracker
40
- import 'apstal-analytics';
53
+ ## ๐Ÿ›ก๏ธ Privacy & Compliance
41
54
 
42
- // Make sure window configuration is set before import or initialized in script
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
- For advanced settings, you can override the API endpoint:
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
- ```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
- ```
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apstal/analytics",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "Official tracking library for Apstal โ€” the conversational AI Web Analyst.",
5
5
  "main": "index.js",
6
6
  "repository": {