I have implemented onetrust on my site. In the ECID extension, Enable Opt In is set to yes and the previous permissions is {"ecid": false, "target": false}. I still see the target cookies at_check and mbox cookies fire before consent is provided. I did go into target and enabled GDPR optin and the mbox cookie went away but the at_check still fires. I wore some custom code to delete the cookies but that didn't work either.
Delete cookies custom code:
function deleteCookies(cookieNames) {
for (var i = 0; i < cookieNames.length; i++) {
document.cookie = cookieNames[i] + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;domain=.example.com'; //changed domain name
}
}
var cookiesToDelete = ['at_check','mbox'];
deleteCookies(cookiesToDelete);
Is there anything else I can do to stop these cookies from firing before consent?