Closed marcoow closed 4 years ago
This doesn't really make sense. If we do this (which I think we have to), the data we get from GA will be completely irrelevant as it only represents a (small) fraction of our actual traffic. Instead, we should probably remove GA altogether and use Netlify Analytics instead which works without JS, cookies etc.
We are currently simple display the cookie banner but track users with GA anyway. I don't think that's compliant with the law really and we'd have to delay any tracking until the user actively consents.
Tasks
lib/google-analytics/index.js
into a (global) function that's not invoked immediately@onConsent
or soisCookieBannerVisible === false
), invoke the global function lazily (usingrequestIdleCallback
) from theSimplabs
component's constructor