Piwik PRO Tag Manager & CookieTractor
Piwik PRO is an analytics and tag management platform with roots in Matomo, but it is now offered as a separate product. The tool can be run in the cloud or on its own server, which is suitable for those who want full control over the data collected about the site's visitors.
Piwik PRO mainly consists of two parts:
- Analytics, comparable to Google Analytics
- Tag Manager, comparable to Google Tag Manager
Those who are familiar with Google tools will recognize the setup.
Setup CookieTractor with Piwik PRO Tag Manager
CookieTractor integrates with Piwik PRO Tag Manager in an easy way. To control which of your scripts belong to the respective cookie category, the scripts need to be categorized. CookieTractor has built-in support for Piwik PRO and will trigger events based on the visitor's consent settings. To use these in Piwik PRO, we need to create Triggers for any Tags that depend on the consent settings.
Go to Triggers in Piwik PRO Tag Manager and add new triggers by clicking Add a trigger. Create the following Triggers:
|
Name |
Trigger Type |
Event Name |
|---|---|---|
|
Consent - Necessary (All Pages) |
Data Layer Event |
cookies_necessary |
|
Consent - Functional (All Pages) |
Data Layer Event |
cookies_functional |
|
Consent - Statistical (All Pages) |
Data Layer Event |
cookies_statistical |
|
Consent - Marketing (All Pages) |
Data Layer Event |
cookies_marketing |
Now, update any tags that require visitor consent to be triggered by these triggers. This is done by clicking Edit tag and then changing Trigger under Execute this tag when any of these triggers are triggered.
If you need to listen for events when a visitor withdraws consent, you can create the following triggers and use them on your tags:
|
Name |
Trigger Type |
Event Name |
|---|---|---|
|
Consent Revoked - Functional (All Pages) |
Data Layer Event |
cookies_revoked_functional |
|
Consent Revoked - Statistical (All Pages) |
Data Layer Event |
cookies_revoked_statistical |
|
Consent Revoked - Marketing (All Pages) |
Data Layer Event |
cookies_revoked_marketing |
Variables to check for consent
In some cases, you may need to check whether a visitor has given consent for a specific cookie category using Conditions for a tag or trigger. To make this easier, you can add variables under Variables in the interface.
Here are some examples of Variables that might be useful:
CookieConsent_AllowFunctional
Name: CookieConsent_AllowFunctional
Type: Custom JavaScript
JavaScript Function:
function(){
return cookieTractor.consent.contains('functional');
}
CookieConsent_AllowStatistical
Name: CookieConsent_AllowStatistical
Type: Custom JavaScript
JavaScript Function:
function(){
return cookieTractor.consent.contains('statistical');
}
CookieConsent_AllowMarketing
Name: CookieConsent_AllowMarketing
Type: Custom JavaScript
JavaScript Function:
function(){
return cookieTractor.consent.contains('marketing');
}
Related information
Support
Do you have questions about how to get Piwik PRO Tag Manager working with CookieTractor? Feel free to contact us at info@cookietractor.com.​