mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-04-19 11:11:18 +00:00
Added undefined check for posthog when analytics disabled
This commit is contained in:
parent
c93722ec05
commit
dac3cac3af
@ -83,6 +83,11 @@
|
||||
<script th:inline="javascript">
|
||||
|
||||
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"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user