Forum Moderators: DixonJones

Message Too Old, No Replies

Google Analytics TCF Support

         

yaashul

7:53 am on Sep 10, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi,

I need help with google analytics TCF 2.0 support. Current Tracking code given by google is like this

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxx-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());

gtag('config', '<Measurement ID>');
</script>



They are saying to get TCF 2.0 complaint you need to add

window ['gtag_enable_tcf_support'] = true;


How exactly do we need to add this line?

I am using quantcast choice and adsense is already complaint with TCF 2.0. (Sorry I did not know which forum do I need to post this)



[edited by: not2easy at 1:32 pm (utc) on Sep 10, 2021]
[edit reason] anonymized UID [/edit]

yaashul

6:55 pm on Sep 10, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



can this code make the site GDPR complaint?

 gtag('consent', 'default', {
'ad_storage': 'denied',
'analytics_storage': 'denied',
'wait_for_update': 500,
'region': ['AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT', 'NL', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'GB']
});