fixing GA implementation race condition for account id retrieval
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s

This commit is contained in:
Tudor
2026-01-12 09:18:40 +00:00
parent a18ec04227
commit 8e4802df93

View File

@@ -424,15 +424,20 @@
analyticsConsentGiven = true; analyticsConsentGiven = true;
loadGoogleAnalytics(); loadGoogleAnalytics();
} }
}, }
onReady: function(consent) { });
// Called on page load with existing consent state
if (consent && consent.analytics) { // Check existing consent state after initialization
(function() {
var manager = window.silktideConsentManager.getInstance();
if (manager) {
var analyticsConsent = manager.getConsentChoice('analytics');
if (analyticsConsent === true) {
analyticsConsentGiven = true; analyticsConsentGiven = true;
loadGoogleAnalytics(); loadGoogleAnalytics();
} }
} }
}); })();
</script> </script>
</body> </body>
</html> </html>