diff --git a/frontend/index.html b/frontend/index.html
index 7ebaba4..f05bde1 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -424,15 +424,20 @@
analyticsConsentGiven = true;
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;
loadGoogleAnalytics();
}
}
- });
+ })();