Added app_version to UI

This commit is contained in:
Connor Yoh 2025-04-14 10:13:49 +01:00
parent 7fa302f322
commit b604b7dca9

View File

@ -84,13 +84,11 @@
function UpdatePosthogConsent(){
if(typeof(posthog) == "undefined") {
console.log("Posthog not initialised");
return;
}
window.CookieConsent.acceptedCategory('analytics')?
posthog.opt_in_capturing() : posthog.opt_out_capturing();
console.log("Posthog: Opted " + (posthog.has_opted_out_capturing()? "out" : "in"));
}
const stirlingPDFLabel = /*[[${@StirlingPDFLabel}]]*/ '';
const analyticsEnabled = /*[[${@analyticsEnabled}]]*/ false;
@ -145,13 +143,15 @@
person_profiles: 'always',
mask_all_text: true,
mask_all_element_attributes: true,
opt_out_capturing_by_default: true
opt_out_capturing_by_default: true,
debug: true
})
const baseUrl = window.location.hostname;
posthog.register_once({
'hostname': baseUrl,
'UUID': /*[[${@UUID}]]*/ ''
})
'UUID': /*[[${@UUID}]]*/ '',
'app_version': /*[[${@appVersion}]]*/ '',
});
}
window.addEventListener("cc:onConsent", UpdatePosthogConsent);