diff --git a/frontend/index.html b/frontend/index.html index 62b1d38..7ebaba4 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -140,10 +140,9 @@
@@ -358,32 +357,39 @@ @@ -415,6 +421,14 @@ }, onConsentChange: function(consent) { if (consent.analytics) { + analyticsConsentGiven = true; + loadGoogleAnalytics(); + } + }, + onReady: function(consent) { + // Called on page load with existing consent state + if (consent && consent.analytics) { + analyticsConsentGiven = true; loadGoogleAnalytics(); } }