1
<script>
2
<!-- OneTrust/CookiePro Cookies Consent Notice start -->
3
4
<!-- end existing OneTrust/CookiePro scripts -->
5
function recordConsentInKlaviyo(status = "denied") {
6
if (typeof klaviyo !== "undefined" && klaviyo.isIdentified()) {
7
klaviyo.push(['identify', {
8
'ad_personalization': status,
9
'ad_user_data': status,
10
}]);
11
}
12
}
13
function OptanonWrapper() {
14
console.log('Change in consent recorded')
15
16
if (OnetrustActiveGroups.indexOf('categoryID') != -1) {
17
console.log('ad_user_data and ad_personalization consent granted')
18
recordConsentInKlaviyo('granted')
19
} else {
20
recordConsentInKlaviyo('denied')
21
console.log('ad_user_data and ad_personalization consent denied')
22
}
23
}
24
</script>