Load as technically necessary and collect more visitor data after consent
In our article https://legalweb.io/news/matomo-piwik-pro-rechtskonform-einbinden/ on Piwik Pro, both variants of Piwik Pro are discussed so that more visitor data can be collected after optional consent. This article is an implementation guide for Piwik Pro to load it as technically necessary and convert anonymous tracking to extended tracking via consent
What options do you have?
Our cookie popup solution, legal web privacy cloud “Privacy Package” supports both integration variants of Piwik Pro:
- Variant A: as technically necessary without consent
- Variant B: via visitor consent with extended tracking
However, it is also possible to combine both variants of Piwik Pro. Variant A is loaded first and, if the visitor agrees, variant B is activated.
Configuration: convert anonymous tracking to extended tracking
The following configuration steps are necessary via https://dashboard.legalweb.io:
Add both variants as integrations.
In the code field, load the integration that does not require consent as you would load it without a special case. Copy the complete snippet into the code field. Make sure that you also set the following commands:
window._paq.push([‘disableCookies’]);
window._paq.push([‘setUserIsAnonymous’, 1]);
For the integration requiring consent, copy only the 2 commands into the code field that remove the anonymization – convert anonymous tracking to extended tracking:
window._paq.push([‘enableCookies’]);
window._paq.push([‘deanonymizeUser’]);
This allows them to achieve initially anonymous tracking, which is converted to extended tracking via the user’s consent and enables features such as the creation of a visitor profile.