We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ba5562 commit ab22b2dCopy full SHA for ab22b2d
apps/web-roo-code/src/components/providers/google-analytics-provider.tsx
@@ -22,19 +22,12 @@ export function GoogleAnalyticsProvider({ children }: { children: React.ReactNod
22
23
// Listen for consent changes
24
const unsubscribe = onConsentChange((consented) => {
25
- if (consented && !shouldLoad) {
+ if (consented) {
26
setShouldLoad(true)
27
}
28
})
29
30
return unsubscribe
31
- }, [shouldLoad])
32
-
33
- useEffect(() => {
34
- // Initialize dataLayer as early as possible (Google's recommended pattern)
35
- if (typeof window !== "undefined") {
36
- window.dataLayer = window.dataLayer || []
37
- }
38
}, [])
39
40
return (
0 commit comments