From 8889df35f021029006028ec9d48c89bc7f7a0fd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Gr=C3=B8ndahl?= Date: Thu, 30 Apr 2026 17:32:41 +0200 Subject: [PATCH] fix: pass masterConsentsOrigin as URL param and merge duplicate integrations key MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The 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. Also merges the two duplicate `integrations` keys in docs.json — the second silently overwrote the first, dropping the cookies config. --- docs.json | 10 ++++------ termly.js | 3 +-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/docs.json b/docs.json index a9e34df..e0b33f6 100644 --- a/docs.json +++ b/docs.json @@ -36,12 +36,6 @@ "metadata": { "timestamp": true }, - "integrations": { - "cookies": { - "key": "kosli_consent", - "value": "accepted" - } - }, "favicon": "/favicon-32x32.png", "redirects": { "$ref": "./config/redirects.json" @@ -79,6 +73,10 @@ ] }, "integrations": { + "cookies": { + "key": "kosli_consent", + "value": "accepted" + }, "mixpanel": { "projectToken": "bf8ac483215f65141ab7ad825b079662" } diff --git a/termly.js b/termly.js index 61892b9..800a1ee 100644 --- a/termly.js +++ b/termly.js @@ -32,8 +32,7 @@ if (!document.getElementById("kosli-termly-embed")) { const s = document.createElement("script"); s.id = "kosli-termly-embed"; - s.src = "https://app.termly.io/resource-blocker/c98bfcd6-2f30-4f3c-b53c-d6dbd9b8c40c?autoBlock=on"; - s.setAttribute("data-master-consents-origin", "https://www.kosli.com"); + s.src = "https://app.termly.io/resource-blocker/c98bfcd6-2f30-4f3c-b53c-d6dbd9b8c40c?autoBlock=on&masterConsentsOrigin=https://www.kosli.com"; s.setAttribute("onload", "onTermlyLoaded()"); document.head.appendChild(s); }