mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-09-18 01:19:24 +00:00
Update frontend/src/index.tsx
Co-authored-by: James Brunton <jbrunton96@gmail.com>
This commit is contained in:
parent
b6b6d41800
commit
342889022c
@ -30,7 +30,7 @@ posthog.init(import.meta.env.VITE_PUBLIC_POSTHOG_KEY, {
|
|||||||
opt_out_capturing_by_default: false, // We handle opt-out via cookie consent
|
opt_out_capturing_by_default: false, // We handle opt-out via cookie consent
|
||||||
});
|
});
|
||||||
|
|
||||||
function UpdatePosthogConsent(){
|
function updatePosthogConsent(){
|
||||||
if(typeof(posthog) == "undefined") {
|
if(typeof(posthog) == "undefined") {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -41,8 +41,8 @@ function UpdatePosthogConsent(){
|
|||||||
console.log("Updated analytics consent: ", optIn? "opted in" : "opted out");
|
console.log("Updated analytics consent: ", optIn? "opted in" : "opted out");
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("cc:onConsent", UpdatePosthogConsent);
|
window.addEventListener("cc:onConsent", updatePosthogConsent);
|
||||||
window.addEventListener("cc:onChange", UpdatePosthogConsent);
|
window.addEventListener("cc:onChange", updatePosthogConsent);
|
||||||
|
|
||||||
const container = document.getElementById('root');
|
const container = document.getElementById('root');
|
||||||
if (!container) {
|
if (!container) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user