Check if selected purposes and vendors have been accepted (personalised command for SIBBO CMP)
In order to check if selected purposes and vendors have been accepted, call the command isAllAcceptedCustom. It returns true or false.
You need to specify the purposes and the vendors with arrays separated by commas, the order of the arrays is following:
Array with purposes based on consent,
array with purposes based on legitimate interest,
array with publisher purposes based on consent,
array with publisher purposes based on legitimate interest,
array with publisher custom purposes,
array with special features,
array with vendors based on consent,
array with vendors based on legitimate interest
There must be 8 arrays, some can be empty arrays.
The following example checks the acceptance of 10 purposes based on consent, 1 purpose based on legitimate interest, 10 publisher purposes based on consent, 1 publisher purpose based on legitimate interest, 1 special feature
The following example checks the acceptance of 14 vendors based on consent
- __tcfapi("isAllAcceptedCustom", 2, (isAllAccepted, success) => {
- if (success) {
- console.log(isAllAccepted);
- } else {
- console.error('Error: could not get isAllAccepted');
- }
- }, [], [], [], [], [], [], [21, 32, 50, 77, 115, 126, 278, 284, 373, 531, 653, 755, 812, 1126], [] );
The following example checks the acceptance of 4 purposes based on consent, 1 publisher custom purposes, 73 vendors based on legitimate interest
- __tcfapi("isAllAcceptedCustom", 2, (isAllAccepted, success) => {
- if (success) {
- console.log(isAllAccepted);
- } else {
- console.error('Error: could not get isAllAccepted');
- }
- }, [8,9,10,11], [], [], [], [1], [], [], [1,2,4,6,8,10,11,12,13,14,15,16,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,36,37,39,40,42,44,45,46,47,48,49,50,52,53,55,56,57,58,59,60,61,62,66,69,70,71,73,75,76,77,78,80,82,83,84,85,87,90,91,92,93,94,95,97,98,100] );