# Understand consent to analytics datas

**URL:** <https://community.piwik.pro/t/understand-consent-to-analytics-datas/3368>\
**Category:** Privacy\
**Created:** [December 13, 2023, 9:36am UTC](https://community.piwik.pro/t/understand-consent-to-analytics-datas/3368 "2023-12-13T09:36:11Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![romainproximity](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@romainproximity](https://community.piwik.pro/u/romainproximity)\
**Post date:** [December 13, 2023, 9:36am UTC](https://community.piwik.pro/t/understand-consent-to-analytics-datas/3368/1 "2023-12-13T09:36:11Z")

</div>

Hello,

I have some trouble to understand datas from my cookie banner acceptance.  
I’m under a full Piwik stack with CNIL/GDPR configuration.

When I’m looking at my audience report here what I have :

 ![Capture d’écran 2023-12-13 à 10.28.04](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/d/df7bc07e7aa101ef99e3ad8bcec10ec7c6cca4ae.png)

If I applied segment on the consent to analytics :

 ![Capture d’écran 2023-12-13 à 10.30.08](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/7/7009d145f26bf6273a3a1b632a898ef4c8515eec.png)

So we have 2019 visitors :

- 213 are optin
- 149 are optout
- 688 are no consent (so I guess that the users landed on my page and leave immediately with no interaction with the form)  
**What about the 969 others ?**  
I have trafic coming from no GDPR but they are about less that 150 visitors.

Thank you for your help  
Best regards

---

<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:** [December 14, 2023, 11:03am UTC](https://community.piwik.pro/t/understand-consent-to-analytics-datas/3368/2 "2023-12-14T11:03:47Z")

</div>

Hi @romainproximity,

it’s an event dimension, with which you try to filter sessions, this creates those discrepances.

The way to check what you are looking for is to create a segment based on IP address:

Gave a consent to Analytics:  
`IP address is not 0.0.0.0`

Did not gave a consent to Analytics:  
`IP address is 0.0.0.0`

I’ll create a Feature Request though to have consent types available as session dimensions.

Best,  
Oliwer

---

<div class="post-metadata">

**Author:** ![romainproximity](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@romainproximity](https://community.piwik.pro/u/romainproximity)\
**Post date:** [December 14, 2023, 5:07pm UTC](https://community.piwik.pro/t/understand-consent-to-analytics-datas/3368/3 "2023-12-14T17:07:39Z")

</div>

> [@Oliwer\_Kaczmarek](#):
>
> 0.0.0.0

Thank you @Oliwer_Kaczmarek

So I make a test for yesterday, I have 1228 sessions :

 ![Capture d’écran 2023-12-14 à 17.58.52](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/9/9423511cf4a472af52f639f528a59d8f8e08a1a1.png)

And If I split :

 ![Capture d’écran 2023-12-14 à 18.01.03](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/1/1dea26191db55526bb1673c51cbddd138da84785.png)  
I have 669 sessions with an information about the consent.  
Which leaves me 559 sessions with no information about the IP I guess ?  
Is it because htey are private or using a proxy ?

Thank you

---

<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:** [December 14, 2023, 8:09pm UTC](https://community.piwik.pro/t/understand-consent-to-analytics-datas/3368/4 "2023-12-14T20:09:42Z")

</div>

Could you please share with me the link to the report or the url address to your instance? (Via PM)

---

<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:** [December 15, 2023, 10:28am UTC](https://community.piwik.pro/t/understand-consent-to-analytics-datas/3368/5 "2023-12-15T10:28:46Z")

</div>

@romainproximity,

Those 559 sessions are due to the visitors having IPv6 instead of IPv4. This creates an issue for the solution I’ve mentioned as there will be no data for IPv4 hence it’s not 0.0.0.0 nor x.x.x.x value (x being value between 0-255).

Because of that. The workaround here would be to **check if there is a city information** , because in your case, visitors that gave a consent while having IPv4 and IPv6 will have the city data, while not consenting visitors will not.  
**Consenting**

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/5/55817add19befbe29f2a492805a372765ab33a17.png)  
**Not consenting**  
 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/5/5cfc97d0dc6e50b1c089c2fa8dc5aeeb560da884.png)

**Disclaimer for people checking this thread for a solution**  
Why this is a workaround that _works for you_ but might _not for others_:  
For example, if someone would decide to change the collected geological data to Country level for consenting visitors then that you wouldn’t be able to use city nor region as a filter, and non consenting visitors have the information about country available so there would be no difference between consenting and nonconsenting

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

Best,  
Oliwer

---

<div class="post-metadata">

**Author:** ![romainproximity](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@romainproximity](https://community.piwik.pro/u/romainproximity)\
**Post date:** [December 15, 2023, 2:55pm UTC](https://community.piwik.pro/t/understand-consent-to-analytics-datas/3368/6 "2023-12-15T14:55:10Z")

</div>

> [@Oliwer\_Kaczmarek](#):
>
> For example, if someone would decide to change the collected geological data to Country level for consenting visitors then that you wouldn’t be able to use city nor region as a filter, and non consenting visitors have the information about country available so there would be no difference between consenting and nonconsenting

Thank you @Oliwer_Kaczmarek for your help.  
So if I summarize :  
The event consent to analytics is true or false can be applied only to the click on accept all or refuse the tracking (en event).  
If I want the information at a session level the best is to applied a segment based on the city data (empty or not)

On my 1228 sessions when I applied the new segments (city)hre what I have :

 ![Capture d’écran 2023-12-15 à 15.27.56](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/6/679b1abce6fd536f87fae7be69e9a5ec9d9f972e.png)

> = 1228, we are good!

---

<div class="post-metadata">

**Author:** ![mikkovai](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/mikkovai/32/1881_2.png) [@mikkovai](https://community.piwik.pro/u/mikkovai)\
**Post date:** [June 11, 2024, 10:55am UTC](https://community.piwik.pro/t/understand-consent-to-analytics-datas/3368/7 "2024-06-11T10:55:50Z")

</div>

Regarding this Feature Request, I assume the current dimension is still event-scoped?

FYI to anybody interested, we created a session-scoped Custom Dimension from consent banner interactions and reading the consent manager cookie to segment users based on their consent decisions. Pretty handy for this use case, but of course it would be even handier if that was a built-in dimension 😉

---

<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:** [June 11, 2024, 12:34pm UTC](https://community.piwik.pro/t/understand-consent-to-analytics-datas/3368/8 "2024-06-11T12:34:04Z")

</div>

Yes, it’s still event-scoped.

The workaround you provided is best way to handle it.
