No-consent traffic

Hi,

i have a problem with no-consent traffic.
I did everything with a instruction and make a consent, and no-consent segments.

I did a few test on debuger with “no consent” traffic. After 48h i checked the data byt there is no information about any no-consent sessions.

I turned off Piwik’s cookiebot and i’m using different one on the website.

What can be the reason?

Hi @Martyna_Ojrzynska,

Since you are using a third-party consent tool, the reason might be that Piwik PRO is blocked until the consent is given. In order to make sure that this is the case, could you please send me the website URL in a private message?

Have a great day! :slight_smile:

Hi @Martyna_Ojrzynska,

Thank you for the Website URL. I’ve checked your website and the theory above was confirmed. It seems that you are adding our container only once the consent is given and the page is reloaded. Basically when we accept the consent the container is still not added, we need to reload the page also. This means that you are losing a good bit of traffic. For anonymous tracking, you will need to make sure that our container is on the website at all times.

This article describes how to set up anonymous tracking in the UI - Collect data in a privacy-friendly way | Piwik PRO help center

You will also need to add a consent integration with your third-party tool so that Piwik PRO knows when someone accepted / declined the consent etc. You might need help from your developers for this step. Please have a look at this guide - How can I integrate a third-party cookie consent tool with Piwik PRO? | Piwik PRO help center

Please let me know if you have any questions.

Have a great day! :slight_smile:

We have made a change so that the Piwik PRO tag will always be invoked, regardless of user consent. However, we do not yet know how to properly link the Piwik PRO code with Usercentrics so that the system recognizes the lack of consent and anonymizes the data appropriately.

How can we configure Piwik PRO to automatically set the user’s IP to 0.0.0.0 when Usercentrics rejects consent? Is there a dedicated Piwik PRO function that we should call in this case?
We would appreciate your tips!

Hi @Martyna_Ojrzynska,

By default when no decision was made you should be anonymized so the IP would be 0.0.0.0.

Let me briefly explain how the Consent Integration should look like -
When the visitor enters the website for the first time we need to create our cookie and also set the decisions to -1 (this cookie just stores consent decisions). This can be achieved with this method - setInitialComplianceSettings

When we detect a consent decision we can use the setComplianceSettings in order to send the decision - setComplianceSettings

Now, sending the decision alone won’t anonymize / deanonymize on its own. Well… it will but only after a page reload so in this case its best to use setUserIsAnonymous and deanonymizeUser methods depending on the decision. Its best to use these methods before the setComplianceSettings method since these methods will only have an effect from the next event (setUserIsAnonymous and deanonymizeUser don’t send an event on its own but setComplianceSettings does)

Lastly, you need to make sure that you also compare Piwik PRO consent decisions and Usercentrics decisions on every pageview. This is because we need to make sure we cover visitors which already made a decision.

So to summarize, the process should look like this -

  • Visitor enters the website, if its his first entry we setInitialComplianceSettings
  • We compare consent decisions (you need to find what state in Usercentrics is equal to no decision, its -1 in Piwik PRO - you can use getComplianceSettings to get current consent decisions)
  • If the values are different you need to use setComplianceSettings (anonymize / deanonymize before that based on the decision) map the decisions from Usercentrics
  • If the values are the same we also perform this exact check when a consent decision has been made in Usercentrics and use the setComplianceSettings to map the decisions

Please let me know if you have any questions.

Have a great day! :slight_smile: