Skip to content

Commit 8924ba9

Browse files
authored
fix: pass masterConsentsOrigin as URL param and merge duplicate integrations key (#193)
## Summary - **termly.js**: `masterConsentsOrigin` was set as a `data-` attribute instead of a URL query parameter, so Termly never read it and consent sync between www.kosli.com and docs.kosli.com did not work. Now passed as `&masterConsentsOrigin=https://www.kosli.com` on the script src URL per [Termly docs](https://support.termly.io/hc/en-us/articles/30710516322321). - **docs.json**: Two duplicate `integrations` keys — the second (mixpanel) silently overwrote the first (cookies), dropping the cookie consent gating for Mintlify telemetry. Merged into a single key. ## Test plan - [ ] Deploy to docs.kosli.com - [ ] Accept cookies on www.kosli.com - [ ] Open docs.kosli.com in a new tab — banner should NOT appear (consent synced) - [ ] Open docs.kosli.com in incognito — banner SHOULD appear
1 parent 85e8b99 commit 8924ba9

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

docs.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@
3636
"metadata": {
3737
"timestamp": true
3838
},
39-
"integrations": {
40-
"cookies": {
41-
"key": "kosli_consent",
42-
"value": "accepted"
43-
}
44-
},
4539
"favicon": "/favicon-32x32.png",
4640
"redirects": {
4741
"$ref": "./config/redirects.json"
@@ -79,6 +73,10 @@
7973
]
8074
},
8175
"integrations": {
76+
"cookies": {
77+
"key": "kosli_consent",
78+
"value": "accepted"
79+
},
8280
"mixpanel": {
8381
"projectToken": "bf8ac483215f65141ab7ad825b079662"
8482
}

termly.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
if (!document.getElementById("kosli-termly-embed")) {
3333
const s = document.createElement("script");
3434
s.id = "kosli-termly-embed";
35-
s.src = "https://app.termly.io/resource-blocker/c98bfcd6-2f30-4f3c-b53c-d6dbd9b8c40c?autoBlock=on";
36-
s.setAttribute("data-master-consents-origin", "https://www.kosli.com");
35+
s.src = "https://app.termly.io/resource-blocker/c98bfcd6-2f30-4f3c-b53c-d6dbd9b8c40c?autoBlock=on&masterConsentsOrigin=https://www.kosli.com";
3736
s.setAttribute("onload", "onTermlyLoaded()");
3837
document.head.appendChild(s);
3938
}

0 commit comments

Comments
 (0)