Skip to content

Commit e559b20

Browse files
Analytics (#931)
1 parent b4e34ce commit e559b20

File tree

5 files changed

+17
-28
lines changed

5 files changed

+17
-28
lines changed

docs/.vuepress/client.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,9 @@ export default defineClientConfig({
166166
version: esData?.version,
167167
category: esData?.category,
168168
});
169-
const a = window.analytics;
170-
if (a) {
169+
if (window && window.posthog) {
171170
setTimeout(() => {
172-
a.page({
171+
window.posthog.capture('$pageview', {
173172
site: "docs",
174173
url: window.location.origin + to.fullPath,
175174
title: to.meta.t,

docs/.vuepress/config.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,11 @@ export default defineUserConfig({
109109
async: true,
110110
}],
111111

112-
['script', {src: '/js/snippet.js'}],
113-
114-
// Business Institution 247 “consent‑only” loader
115-
['script', {
112+
// Segment
113+
// ['script', { src: '/js/snippet.js' }],
114+
115+
// Business Institution 247 “consent‑only” loader
116+
['script', {
116117
type: 'text/plain',
117118
'data-cookiecategory': 'marketing',
118119
src: 'https://secure.businessintuition247.com/js/sc/264384.js',
@@ -127,8 +128,8 @@ export default defineUserConfig({
127128
'data-project-logo': '/logo-white.png'
128129
}],
129130

130-
// CommonRoom
131-
['script', {src: "/js/commonRoom.js"}],
131+
// Reo
132+
['script', { src: "/js/reo.js"}],
132133

133134
// CSS override to hide the modal mask and wrapper entirely
134135
['style', {}, `

docs/.vuepress/lib/usePosthog.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import posthog from 'posthog-js';
33
export function usePostHog() {
44
try {
55
posthog.init('phc_DeHBgHGersY4LmDlADnPrsCPOAmMO7QFOH8f4DVEVmD', {
6-
api_host: 'https://phog.kurrent.io'
6+
api_host: 'https://phog.kurrent.io',
7+
capture_pageview: false
78
});
89
} catch (e) {
910
}

docs/.vuepress/public/js/commonRoom.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/.vuepress/public/js/reo.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
!function () {
2+
var e, t, n;
3+
e = "f1c2b9fbebbf202", t = function () {
4+
Reo.init({clientID: "f1c2b9fbebbf202"})
5+
}, (n = document.createElement("script")).src = `https://static.reo.dev/${e}/reo.js`, n.defer = !0, n.onload = t, document.head.appendChild(n)
6+
}();

0 commit comments

Comments
 (0)