So we are using a custom consent form and I’m looking at the following two functions setInitialComplianceSettings and setComplianceSettings and I don’t really understand when to use setInitialComplianceSettings
.
Step 10 in the Third party cookie consent guide says to call the following code when the popup is displayed:
ppms.cm.api(
"setInitialComplianceSettings",
{
consents: ["analytics"],
},
function onSuccess() {},
function onError() {}
);
But what does it do? What does it actually mean that we send “analytics” when we display the popop? Should we send an empty consent array if we don’t allow analytics until the visitor have agreed to tracking, eg consents: []
. And then when the user agrees we call setComplianceSettings
with the actual consents given by the user, in that case what’s the purpose of initialCompliance?
I guess my question is: What does setInitialComplianceSettings
actually do?