From 3e18835f66084aaf1364f585d6c87a59dd262d65 Mon Sep 17 00:00:00 2001 From: Alexey Zimarev Date: Fri, 21 Nov 2025 13:33:26 +0100 Subject: [PATCH 1/2] Add reo and remove common room --- docs/.vuepress/config.ts | 4 ++-- docs/.vuepress/public/js/commonRoom.js | 18 ------------------ docs/.vuepress/public/js/reo.js | 6 ++++++ 3 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 docs/.vuepress/public/js/commonRoom.js create mode 100644 docs/.vuepress/public/js/reo.js diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 902ae7fa..d6491d1e 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -122,8 +122,8 @@ export default defineUserConfig({ 'data-project-logo': '/logo-white.png' }], - // CommonRoom - ['script', { src: "/js/commonRoom.js"}], + // Reo + ['script', { src: "/js/reo.js"}], // CSS override to hide the modal mask and wrapper entirely ['style', {}, ` diff --git a/docs/.vuepress/public/js/commonRoom.js b/docs/.vuepress/public/js/commonRoom.js deleted file mode 100644 index e1c91c93..00000000 --- a/docs/.vuepress/public/js/commonRoom.js +++ /dev/null @@ -1,18 +0,0 @@ -(function () { - if (typeof window === 'undefined') return; - if (typeof window.signals !== 'undefined') return; - var script = document.createElement('script'); - script.src = 'https://cdn.cr-relay.com/v1/site/da9bc552-0721-4931-aae9-9706006d2986/signals.js'; - script.async = true; - window.signals = Object.assign( - [], - ['page', 'identify', 'form'].reduce(function (acc, method) { - acc[method] = function () { - signals.push([method, arguments]); - return signals; - }; - return acc; - }, {}) - ); - document.head.appendChild(script); -})(); \ No newline at end of file diff --git a/docs/.vuepress/public/js/reo.js b/docs/.vuepress/public/js/reo.js new file mode 100644 index 00000000..b69e3236 --- /dev/null +++ b/docs/.vuepress/public/js/reo.js @@ -0,0 +1,6 @@ +!function () { + var e, t, n; + e = "f1c2b9fbebbf202", t = function () { + Reo.init({clientID: "f1c2b9fbebbf202"}) + }, (n = document.createElement("script")).src = `https://static.reo.dev/${e}/reo.js`, n.defer = !0, n.onload = t, document.head.appendChild(n) +}(); From 55439c859acbce68f572429185a272ea92b40b81 Mon Sep 17 00:00:00 2001 From: Alexey Zimarev Date: Fri, 21 Nov 2025 13:44:12 +0100 Subject: [PATCH 2/2] Remove Segment and use Posthog capture with extra propetries --- docs/.vuepress/client.ts | 5 ++--- docs/.vuepress/config.ts | 3 ++- docs/.vuepress/lib/usePosthog.ts | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/.vuepress/client.ts b/docs/.vuepress/client.ts index e5798ceb..91365f65 100644 --- a/docs/.vuepress/client.ts +++ b/docs/.vuepress/client.ts @@ -166,10 +166,9 @@ export default defineClientConfig({ version: esData?.version, category: esData?.category, }); - const a = window.analytics; - if (a) { + if (window && window.posthog) { setTimeout(() => { - a.page({ + window.posthog.capture('$pageview', { site: "docs", url: window.location.origin + to.fullPath, title: to.meta.t, diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index d6491d1e..5fe048e5 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -104,7 +104,8 @@ export default defineUserConfig({ async: true, }], - ['script', { src: '/js/snippet.js' }], + // Segment + // ['script', { src: '/js/snippet.js' }], // Business Institution 247 “consent‑only” loader ['script', { diff --git a/docs/.vuepress/lib/usePosthog.ts b/docs/.vuepress/lib/usePosthog.ts index 9f74232c..0ac18917 100644 --- a/docs/.vuepress/lib/usePosthog.ts +++ b/docs/.vuepress/lib/usePosthog.ts @@ -3,7 +3,8 @@ import posthog from 'posthog-js'; export function usePostHog() { try { posthog.init('phc_DeHBgHGersY4LmDlADnPrsCPOAmMO7QFOH8f4DVEVmD', { - api_host: 'https://phog.kurrent.io' + api_host: 'https://phog.kurrent.io', + capture_pageview: false }); } catch (e) { }