# Can no longer see visitors who haven't given consent

**URL:** <https://community.piwik.pro/t/can-no-longer-see-visitors-who-havent-given-consent/3748>\
**Category:** Data collection and tags\
**Created:** [March 4, 2024, 5:11pm UTC](https://community.piwik.pro/t/can-no-longer-see-visitors-who-havent-given-consent/3748 "2024-03-04T17:11:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sjon](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@Sjon](https://community.piwik.pro/u/Sjon)\
**Post date:** [March 4, 2024, 5:11pm UTC](https://community.piwik.pro/t/can-no-longer-see-visitors-who-havent-given-consent/3748/1 "2024-03-04T17:11:05Z")

</div>

Hi,  
I used to see all visitors in Piwik. Both the ones that gave consent (1), and the ones that didn’t (2), and the ones that didn’t choose at all (3).

For 1 and 3, the difference was no cookies (pk\_ses, pk\_id) would be set. For 2 cookies (pk\_ses, pk\_id) would be set.

Since the past few days I noticed that I couldn’t see users 1 and 3 anymore. Has something changed? When I give consent, the cookies pk\_ses and pk\_id are set and then I can see them in Piwik Tracker debugger.

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [March 4, 2024, 7:05pm UTC](https://community.piwik.pro/t/can-no-longer-see-visitors-who-havent-given-consent/3748/2 "2024-03-04T19:05:56Z")

</div>

Hi @Sjon,

To answer your question first - there shouldn’t be any recent changes impacting that.

Could you send your website URL? Either here or in a private message.

---

<div class="post-metadata">

**Author:** ![Sjon](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@Sjon](https://community.piwik.pro/u/Sjon)\
**Post date:** [March 4, 2024, 7:34pm UTC](https://community.piwik.pro/t/can-no-longer-see-visitors-who-havent-given-consent/3748/3 "2024-03-04T19:34:28Z")

</div>

I have sent you a PM. Thank you!

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [March 5, 2024, 9:47am UTC](https://community.piwik.pro/t/can-no-longer-see-visitors-who-havent-given-consent/3748/4 "2024-03-05T09:47:12Z")

</div>

Things I have found:

The custom consent form is enabled

 ![obraz](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/0/0e31219567abc190a6d544580ddd44c29e1d6669.png)

…but it seems that you are setting the `analytics` consent to `1` before the decision in CookieYes.

In my opinion, this is the culprit:

```auto
addEventListener("DOMContentLoaded",(event)=>{if(getCookie("ppms_privacy_112c25ee-65bb-450c-aed5-346c2d18c788")==''&typeof ppms!=='undefined'){ppms.cm.api('setComplianceSettings',{consents:{analytics:{status:1}}}

```

Things I’d suggest:

- Only set the consent when the decision is actually made. You can take a look at @jude_nwachukwu’s [article](https://dumbdata.co/post/how-to-integrate-cookieyes-and-piwik-pro/).
- (unless there’s a reason for the current setup) Switch the Piwik PRO tag consent type from `No consent is required` to `Analytics`. Once you do that, the deanonymization process will be triggered only if the analytics consent is present.

---

<div class="post-metadata">

**Author:** ![Sjon](https://avatars.discourse-cdn.com/v4/letter/s/e0b2c6/32.png) [@Sjon](https://community.piwik.pro/u/Sjon)\
**Post date:** [March 5, 2024, 10:14am UTC](https://community.piwik.pro/t/can-no-longer-see-visitors-who-havent-given-consent/3748/5 "2024-03-05T10:14:07Z")

</div>

Alright, thank you for checking. I’ll do some more reading 😉
