@@ -15,7 +15,7 @@ SECURITY_HEADER_CSP_CONNECT_SRC=https://analytics.example.com/matomo.js
1515
1616### Add custom JavaScript
1717
18- Add the following to Settings > Custom JS
18+ Add the following to Settings > Advanced Customization
1919
2020``` javascript
2121var _paq = window ._paq = window ._paq || [];
@@ -37,6 +37,30 @@ navigation.addEventListener("navigate", function (e) {
3737});
3838```
3939
40+ ## Set up for Medama
41+
42+ > ⚠️ Make sure to use your actual domain
43+
44+ ### Allow loading tracking script
45+
46+ Set the following env vars:
47+
48+ ``` ini
49+ SECURITY_HEADER_SCRIPT_SRC_ALLOW =https://analytics.example.com
50+ SECURITY_HEADER_CSP_CONNECT_SRC =https://analytics.example.com/script.js
51+ ```
52+
53+ ### Add custom JavaScript
54+
55+ Add the following to Settings > Advanced Customization
56+
57+ ``` javascript
58+ const script = document .createElement (' script' );
59+ script .setAttribute (' defer' , true );
60+ script .setAttribute (' src' , ' https://analytics.example.com/script.js' );
61+ document .body .appendChild (script);
62+ ```
63+
4064## Set up for Google Analytics
4165
4266> ⚠️ Make sure to replace < ; your-tracking-id> ; with the actual value
@@ -52,7 +76,7 @@ SECURITY_HEADER_CSP_CONNECT_SRC=https://www.googletagmanager.com/gtag/js?id=<you
5276
5377### Add custom JavaScript
5478
55- Add the following to Settings > Custom JS
79+ Add the following to Settings > Advanced Customization
5680
5781``` javascript
5882(function () {
@@ -100,7 +124,7 @@ SECURITY_HEADER_CSP_CONNECT_SRC=https://umami.example.com/script.js
100124
101125### Add custom JavaScript
102126
103- Add the following to Settings > Custom JS
127+ Add the following to Settings > Advanced Customization
104128
105129``` javascript
106130(function () {
0 commit comments