I want to use google consent mode (support. google .com/analytics/answer/9976101?hl=en) with my website to allow my users to opt-in / opt-out of google analytics tracking. Usually, you can easily implement this by adding gtag to the website. (developers. google .com/analytics/devguides/collection/gtagjs ) But as @yisrael-wix mentioned in https://www.wix.com/velo/forum/coding-with-velo/window-js-object-access you can’t access the window object.
Is there any other way I can use Google gtag?