function _handleAcmChangeEvent(event) { if (typeof(check_consent) === 'function') { gtag('consent', 'update', { 'ad_storage': check_consent('12') ? 'granted' : 'denied', 'ad_user_data': check_consent('12') ? 'granted' : 'denied', 'ad_personalization': check_consent('12') ? 'granted' : 'denied', 'analytics_storage': check_consent('13') ? 'granted' : 'denied', 'personalization_storage': check_consent('12') ? 'granted' : 'denied' }); gtag('event', 'Google Consent', {'event_category': 'Consent','event_label': 'Google Consent','value': (check_consent('12') ? 'granted' : 'denied') + ' ' + (check_consent('13') ? 'granted' : 'denied')}); } } // Add the event listener to the window object window.addEventListener("acm_change", handleAcmChangeEvent);