Call to getComplianceSettings returns undefined

I’ve integrated Piwik PRO into our customer’s site. I’m running into issues with compliance settings.
If I request compliance settings via JavaScript, the browser returns undefined:

ppms.cm.api('getComplianceSettings', (e)=>{console.log(e)}, ()=>{});

Even if I try and set compliance settings before:

ppms.cm.api('setComplianceSettings', {consents: {analytics: {status:1}}}, () => {}, () => {});

The result stays the same: undefined. What am I doing wrong?

Hi Stefan,

Could you please check what is inside the ppms_privacy cookie itself?

Hi Oliwer,

I don’t have this cookie in my browser although I have disabled all cookie/ad blocking settings.

Update: It was a configuration setting that prevented the cookie from being created. Now everything works fine.

Perfect, thank you for update