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
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 58s
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user