# Call to getComplianceSettings returns undefined

**URL:** <https://community.piwik.pro/t/call-to-getcompliancesettings-returns-undefined/2119>\
**Category:** API & integrations\
**Created:** [May 2, 2023, 9:57am UTC](https://community.piwik.pro/t/call-to-getcompliancesettings-returns-undefined/2119 "2023-05-02T09:57:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefanlange](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/stefanlange/32/1437_2.png) [@stefanlange](https://community.piwik.pro/u/stefanlange)\
**Post date:** [May 2, 2023, 9:57am UTC](https://community.piwik.pro/t/call-to-getcompliancesettings-returns-undefined/2119/1 "2023-05-02T09:57:19Z")

</div>

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`:

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

```

Even if I try and set compliance settings before:

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

```

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

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [May 2, 2023, 6:53pm UTC](https://community.piwik.pro/t/call-to-getcompliancesettings-returns-undefined/2119/2 "2023-05-02T18:53:22Z")

</div>

Hi Stefan,

Could you please check what is inside the ppms\_privacy cookie itself?

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/6/634b6583afae987a6eeb07167f8ced181952c6a5.png)

---

<div class="post-metadata">

**Author:** ![stefanlange](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/stefanlange/32/1437_2.png) [@stefanlange](https://community.piwik.pro/u/stefanlange)\
**Post date:** [May 3, 2023, 6:44am UTC](https://community.piwik.pro/t/call-to-getcompliancesettings-returns-undefined/2119/3 "2023-05-03T06:44:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Oliwer\_Kaczmarek](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/oliwer_kaczmarek/32/3888_2.png) [@Oliwer\_Kaczmarek](https://community.piwik.pro/u/Oliwer_Kaczmarek)\
**Post date:** [May 4, 2023, 8:29am UTC](https://community.piwik.pro/t/call-to-getcompliancesettings-returns-undefined/2119/4 "2023-05-04T08:29:00Z")

</div>

Perfect, thank you for update
