I'm trying to update the consent state of the analytics_storage using the updateConsentState API and it's always returning true. Here is my tag code:
const log = require('logToConsole');
const updateConsentState = require('updateConsentState');
const setDefaultConsentState = require('setDefaultConsentState');
const isConsentGranted = require('isConsentGranted');
setDefaultConsentState({
analytics_storage: 'denied',
'wait_for_update': 500
});
updateConsentState({
analytics_storage: 'denied'
});
log(isConsentGranted('analytics_storage'));
// Call data.gtmOnSuccess when the tag is finished.
data.gtmOnSuccess();
Any idea what I'm doing wrong?