diff --git a/src/main/resources/templates/fragments/common.html b/src/main/resources/templates/fragments/common.html index dced4be3d..ef36de926 100644 --- a/src/main/resources/templates/fragments/common.html +++ b/src/main/resources/templates/fragments/common.html @@ -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);