@apstal/analytics 1.0.2 โ 1.0.4
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 +12 -4
- package/index.js +2 -2
- package/package.json +1 -1
- package/src/apstal.js +12 -4
package/README.md
CHANGED
|
@@ -52,10 +52,18 @@ Deploy your website, open a few pages, and click a few buttons. Go back to [apst
|
|
|
52
52
|
|
|
53
53
|
## ๐ก๏ธ Privacy & Compliance
|
|
54
54
|
|
|
55
|
-
Apstal
|
|
56
|
-
|
|
57
|
-
- ๐ช๐บ **GDPR
|
|
58
|
-
-
|
|
55
|
+
Apstal processes data in compliance with applicable data protection laws, including the GDPR and CCPA:
|
|
56
|
+
|
|
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).
|
|
62
|
+
|
|
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)
|
|
59
67
|
|
|
60
68
|
## License
|
|
61
69
|
|
package/index.js
CHANGED
|
@@ -15,6 +15,6 @@ export function initApstal(projectId, options = {}) {
|
|
|
15
15
|
window.APSTAL_ENDPOINT = options.endpoint;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
// Dynamically load the tracking script logic
|
|
19
|
-
|
|
18
|
+
// Dynamically load the tracking script logic using standard ESM import
|
|
19
|
+
import('./src/apstal.js');
|
|
20
20
|
}
|
package/package.json
CHANGED
package/src/apstal.js
CHANGED
|
@@ -6,14 +6,22 @@ import { gzipSync, strToU8 } from "fflate";
|
|
|
6
6
|
(function () {
|
|
7
7
|
"use strict";
|
|
8
8
|
var script = document.currentScript;
|
|
9
|
-
if (!script)
|
|
10
|
-
|
|
9
|
+
if (!script) {
|
|
10
|
+
var scripts = document.getElementsByTagName('script');
|
|
11
|
+
for (var i = 0; i < scripts.length; i++) {
|
|
12
|
+
if (scripts[i].src && scripts[i].src.indexOf('/apstal') !== -1) {
|
|
13
|
+
script = scripts[i];
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
var PROJECT_ID = window.APSTAL_PROJECT_ID || (script && script.getAttribute("data-project"));
|
|
11
19
|
if (!PROJECT_ID) {
|
|
12
20
|
return;
|
|
13
21
|
}
|
|
14
|
-
var scriptSrc = script.src;
|
|
22
|
+
var scriptSrc = (script && script.src) || "https://apstal.com/apstal";
|
|
15
23
|
var API_URL = scriptSrc.substring(0, scriptSrc.lastIndexOf("/")) + "/api/v1/m";
|
|
16
|
-
var customEndpoint = script.getAttribute("data-endpoint");
|
|
24
|
+
var customEndpoint = window.APSTAL_ENDPOINT || (script && script.getAttribute("data-endpoint"));
|
|
17
25
|
if (customEndpoint) API_URL = customEndpoint;
|
|
18
26
|
var BATCH_INTERVAL = 5e3;
|
|
19
27
|
var MAX_BATCH_SIZE = 25;
|