<?php
/**
 * Google Consent mode v2 defaults
 *
 * Please see wp-cookie-allow.php for more details.
 *
 * @author $Author: Vincent Weber <weepie-plugins@outlook.com> $
 *
 * @since 3.4.8
 */
if( ! defined( 'ABSPATH' ) ) exit;
?><script>
window.dataLayer=window.dataLayer||[];
function gtag(){
    dataLayer.push(arguments);
}
if(localStorage.getItem('<?php echo $local_storage_key ?>') === null){
	gtag('consent', 'default', {
		ad_user_data: '<?php echo $defaults['ad_user_data'] ?>',
		ad_personalization: '<?php echo $defaults['ad_personalization'] ?>',
		ad_storage: '<?php echo $defaults['ad_storage'] ?>',
		analytics_storage: '<?php echo $defaults['analytics_storage'] ?>',
		functionality_storage: '<?php echo $defaults['functionality_storage'] ?>',
		personalization_storage: '<?php echo $defaults['personalization_storage'] ?>',
		security_storage: '<?php echo $defaults['security_storage'] ?>',
		wait_for_update: '<?php echo $wait_for_update ?>'
	});
} else {
	gtag('consent', 'default', JSON.parse(localStorage.getItem('<?php echo $local_storage_key ?>')));
}
gtag('set', 'ads_data_redaction', <?php echo $ads_data_redaction ?>);</script>
