aesirx-analytics 2.0.0 → 2.0.1
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 +35 -2
- package/dist/{Consent-7KHERFGJ.js → Consent-6SCX7LT4.js} +457 -268
- package/dist/analytics.js +8496 -134
- package/dist/index.js +4 -4
- package/package.json +5 -2
package/README.md
CHANGED
@@ -19,11 +19,24 @@ Follow the instructions in: [https://github.com/aesirxio/analytics-1stparty](htt
|
|
19
19
|
1. Add script to `<head>`:
|
20
20
|
|
21
21
|
```
|
22
|
-
<script>
|
22
|
+
<script>
|
23
|
+
window.aesirx1stparty = "https://example.com"
|
24
|
+
window.aesirxClientID="[REPLACE THIS WITH THE PROVIDED CLIENT_ID]"
|
25
|
+
window.aesirxClientSecret="[REPLACE THIS WITH THE PROVIDED CLIENT_SECRET]"
|
26
|
+
</script>
|
23
27
|
<script async defer src="YOUR_PROJECT_PATH/analytics.js"></script>
|
24
28
|
```
|
25
29
|
|
26
|
-
(`https://example.com` is the link to your 1st party server which must be installed)
|
30
|
+
1. (`https://example.com` is the link to your 1st party server which must be installed)
|
31
|
+
2. `CLIENT_ID` replace this with the provided `CLIENT_ID` from https://sso.aesirx.io/
|
32
|
+
3. `CLIENT_SECRET` replace this with the provided `CLIENT_SECRET` from https://sso.aesirx.io/
|
33
|
+
|
34
|
+
##### Disable Consent Popup:
|
35
|
+
```
|
36
|
+
<script>
|
37
|
+
window.disableAnalyticsConsent = "true"
|
38
|
+
</script>
|
39
|
+
```
|
27
40
|
|
28
41
|
#### Usage in ReactJS
|
29
42
|
|
@@ -33,8 +46,18 @@ Follow the instructions in: [https://github.com/aesirxio/analytics-1stparty](htt
|
|
33
46
|
|
34
47
|
```
|
35
48
|
REACT_APP_ENDPOINT_ANALYTICS_URL=https://example.com
|
49
|
+
REACT_APP_SSO_CLIENT_ID=[REPLACE THIS WITH THE PROVIDED CLIENT_ID]
|
50
|
+
REACT_APP_SSO_CLIENT_SECRET=[REPLACE THIS WITH THE PROVIDED CLIENT_SECRET]
|
36
51
|
|
37
52
|
(https://example.com is the link to your 1st party server)
|
53
|
+
`CLIENT_ID` replace this with the provided `CLIENT_ID` from https://sso.aesirx.io/
|
54
|
+
`CLIENT_SECRET` replace this with the provided `CLIENT_SECRET` from https://sso.aesirx.io/
|
55
|
+
```
|
56
|
+
|
57
|
+
##### Disable Consent Popup:
|
58
|
+
add this environment variable to `.env`
|
59
|
+
```
|
60
|
+
REACT_APP_DISABLE_ANALYTICS_CONSENT=true
|
38
61
|
```
|
39
62
|
|
40
63
|
###### With react-router-dom v5:
|
@@ -66,8 +89,18 @@ export default AnalyticsContainer;
|
|
66
89
|
|
67
90
|
```
|
68
91
|
NEXT_PUBLIC_ENDPOINT_ANALYTICS_URL=https://example.com
|
92
|
+
NEXT_PUBLIC_SSO_CLIENT_ID=[REPLACE THIS WITH THE PROVIDED CLIENT_ID]
|
93
|
+
NEXT_PUBLIC_SSO_CLIENT_SECRET=[REPLACE THIS WITH THE PROVIDED CLIENT_SECRET]
|
69
94
|
|
70
95
|
(https://example.com is the link to your 1st party server)
|
96
|
+
`CLIENT_ID` replace this with the provided `CLIENT_ID` from https://sso.aesirx.io/
|
97
|
+
`CLIENT_SECRET` replace this with the provided `CLIENT_SECRET` from https://sso.aesirx.io/
|
98
|
+
```
|
99
|
+
|
100
|
+
##### Disable Consent Popup:
|
101
|
+
add this environment variable to `.env`
|
102
|
+
```
|
103
|
+
NEXT_PUBLIC_DISABLE_ANALYTICS_CONSENT=true
|
71
104
|
```
|
72
105
|
|
73
106
|
###### With next/router:
|