aesirx-analytics 1.0.0-beta.1 → 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.
Files changed (2) hide show
  1. package/README.md +41 -21
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,32 +1,46 @@
1
- # Analytics
2
- # Setup 1st party server
3
- Please follow instruction: [https://github.com/aesirxio/analytics-1stparty](https://github.com/aesirxio/analytics-1stparty)
4
- # Tasks
5
- `npm run build`
1
+ # AesirX Analytics JS Collector
6
2
 
3
+ A powerful and compliant web Analytics platform (1st-party alternative to Google Analytics) that only collects 1st-party data to deliver meaningful customer insights for your organization.
7
4
 
8
- # Usage in SSR site:
9
- ##### download analytics.js:
10
- `https://github.com/aesirxio/analytics/releases/latest`
5
+ AesirX Analytics comes with a locally hosted JavaScript solution that gathers and stores data legally and compliantly in accordance with GDPR and other regional legislation including storage of citizens’ data in-country and 1st-party.
6
+
7
+ ## Setup instructions
8
+
9
+ ### Setup the 1st party server
10
+
11
+ Follow the instructions in: [https://github.com/aesirxio/analytics-1stparty](https://github.com/aesirxio/analytics-1stparty)
12
+
13
+ ### Setup the JS Collector
14
+
15
+ #### Usage in SSR site:
16
+
17
+ 1. Download analytics.js from [https://github.com/aesirxio/analytics/releases/latest](https://github.com/aesirxio/analytics/releases/latest)
18
+ 1. copy `analytics.js` to your project
19
+ 1. Add script to `<head>`:
11
20
 
12
- ##### copy `analytics.js` to your project
13
- ##### Add script to `<head>`
14
21
  ```
15
22
  <script>window.aesirx1stparty = "https://example.com"</script>
16
23
  <script async defer src="YOUR_PROJECT_PATH/analytics.js"></script>
17
24
  ```
18
- `(https://example.com is the link to your 1st party server)`
19
- # Usage in ReactJS
25
+
26
+ (`https://example.com` is the link to your 1st party server which must be installed)
27
+
28
+ #### Usage in ReactJS
20
29
 
21
30
  `npm i aesirx-analytics`
22
- ##### add environment variable (`.env`)
31
+
32
+ ##### Add the environment variable file (`.env`)
33
+
23
34
  ```
24
35
  REACT_APP_ENDPOINT_ANALYTICS_URL=https://example.com
25
36
 
26
37
  (https://example.com is the link to your 1st party server)
27
38
  ```
28
- ##### with react-router-dom v5:
29
- ###### create AnalyticsContainer component:
39
+
40
+ ###### With react-router-dom v5:
41
+
42
+ Create AnalyticsContainer component:
43
+
30
44
  ```
31
45
  import React from 'react';
32
46
  import { useLocation } from 'react-router-dom';
@@ -38,22 +52,28 @@ const AnalyticsContainer = () => {
38
52
 
39
53
  export default AnalyticsContainer;
40
54
  ```
41
- ###### using `<AnalyticsContainer />` inside `<Router>` component
42
55
 
43
- # Usage in NextJS
56
+ ###### Using `<AnalyticsContainer />` inside `<Router>` component
57
+
58
+ #### Usage in NextJS
44
59
 
45
60
  `npm i aesirx-analytics`
46
- ##### add environment variable (`.env`)
61
+
62
+ ##### Add the environment variable file (`.env`)
63
+
47
64
  ```
48
65
  NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL=https://example.com
49
66
 
50
67
  (https://example.com is the link to your 1st party server)
51
68
  ```
52
- ##### with next/router:
53
- ###### using in app.js:
69
+
70
+ ###### With next/router:
71
+
72
+ Added in app.js:
73
+
54
74
  ```
55
75
  import { useRouter } from "next/router";
56
76
  import { AnalyticsNext } from "aesirx-analytics";
57
77
 
58
78
  <AnalyticsNext router={useRouter()} />
59
- ```
79
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aesirx-analytics",
3
- "version": "1.0.0-beta.1",
3
+ "version": "1.0.0",
4
4
  "license": "GPL-3.0-only",
5
5
  "author": "AesirX",
6
6
  "repository": "https://gitlab.redweb.dk/aesirx/analytics",