diff --git a/docs/.vuepress/client.ts b/docs/.vuepress/client.ts index e5798ceb5..91365f654 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 dbd4d15d4..d164f335f 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -109,10 +109,11 @@ export default defineUserConfig({ async: true, }], - ['script', {src: '/js/snippet.js'}], - - // Business Institution 247 “consent‑only” loader - ['script', { + // Segment + // ['script', { src: '/js/snippet.js' }], + + // Business Institution 247 “consent‑only” loader + ['script', { type: 'text/plain', 'data-cookiecategory': 'marketing', src: 'https://secure.businessintuition247.com/js/sc/264384.js', @@ -127,8 +128,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/lib/usePosthog.ts b/docs/.vuepress/lib/usePosthog.ts index 9f74232c6..0ac189178 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) { } diff --git a/docs/.vuepress/public/js/commonRoom.js b/docs/.vuepress/public/js/commonRoom.js deleted file mode 100644 index e1c91c936..000000000 --- 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 000000000..b69e3236d --- /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) +}();