You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to docs consent tag is supposed to be placed like this:
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Default ad_storage to 'denied'.
gtag('consent', 'default', {
'ad_storage': 'denied'
});
gtag('js', new Date());
gtag('config', 'G-XXXXXX');
</script>
<!-- Update this section based on your business requirements. -->
<script>
function consentGranted() {
gtag('consent', 'update', {
'ad_storage': 'granted'
});
}
</script>
As stated on https://developers.google.com/tag-platform/devguides/consent?utm_source=pocket_mylist, Google Tag supports 2 consent attributes –
ad_storage
andanalytics_storage
.I would be great, if by default GA was loaded with
denied
values. I believe this way GA still counts pageviews but not stores cookies.The text was updated successfully, but these errors were encountered: