Piwik PRO is a tool for collecting and analyzing website data. In this blog, we will show you how to set up Piwik Pro server side in Google Tag Manager which allows you to move from third party to first party data collection. This server side configuration allows you to collect more detailed data while complying with GDPR regulations.
Table of Contents
What is Piwik PRO and what are the benefits of this tool?
Piwik PRO offers comprehensive functionalities for data analysis, reporting and privacy management. Here are 4 benefits of Piwik Pro:
- Data Privacy and Ownership: Piwik PRO gives full control over data ownership and privacy, important for GDPR compliance.
- Hosting flexibility: Piwik PRO can be hosted both on-premises and in a private cloud, unlike many other tools that are cloud-based only.
- Advanced features: Piwik PRO offers built-in features for GDPR compliance, such as advanced data anonymization and comprehensive access controls.
- Access to raw data: Piwik PRO provides full access to raw data, offering more flexibility for custom analysis and reporting.
Why do users choose Piwik PRO?
Here are four points by which Piwik PRO and Google Analytics differ:
- Data Privacy and Ownership: Piwik Pro provides complete control over data ownership and privacy, which is essential for GDPR compliance.
- Flexibility in Hosting: Piwik Pro can be hosted on-premises or in a private cloud. Google Analytics is cloud-based only.
- Functionalities: Piwik Pro has built-in features for GDPR compliance, such as advanced data anonymization. Google Analytics has less prominent privacy features.
- Access to Data: Piwik Pro offers full access to raw data, providing more flexibility for custom analysis.
Piwik Pro is seen as suitable for companies that prioritize data privacy and control over their data.
How does Piwik Pro Server Side’s data flow?
The data flow works differently with Piwik Pro Server Side. Previously, the data flow was as follows:
Web → Web client → Piwik Pro Tags → Piwik Pro servers
With the New configuration, the data flow is as follows:
Web → Web client → GA4 Client → Piwik Pro tag → Piwik Pro servers
In the Server Container, you use the already set up GA4 Client to handle the incoming data flow. This GA4 Client processes the incoming data so that it can be used within the container. Then the Piwik Pro tag transfers the data processed by the GA4 Client to the Piwik Pro servers.
As a Piwik Pro user, you need to create a Google Tag. Note that if you just enter a dummy code here, you will not be sending data to an Analytics account!
TAGGRS has servers all over the world and does not rely on Google Cloud environment. Start for free with TAGGRS and enjoy all the benefits of Server Side Tracking, including additional data and GDPR compliance.
What events can you measure Server Side with Piwik PRO?
At the time of writing, you can measure several categories of events with Piwik Pro Tags:
1. Ecommerce:
- Remove from cart
- View_item
- Purchase
- Add to cart
2. Page views:
- PageView
- Appview
3. Search events:
- Search
4. Link on outgoing source:
- External link click
5. File download:
- Download
6. Custom:
Here you can put anything that is not included by default by Piwik Pro, such as video play. Again, you need to put these under a category where they should appear in the Piwik PRO dashboard.
The different categories can be found within Google Tag Manager. Choosing Inherit from client means taking settings from the webcontainer.
Setting Up Piwik Pro Server Side Tracking
To set up Piwik Pro Server Side Tracking correctly, there are some preparations you need to make. First, you must have a server container configured, including a Google Tag and a GA4 client. This is essential because Piwik Pro uses the data from the GA4 client and therefore only needs to be set up server side.
Once you complete these basic settings, you have two options for moving forward: you can use TAGGRS templates or you can configure the tags manually.
Option 1: TAGGRS templates.
If you choose to use our TAGGRS templates, the process is very simple. First, you can open the Template Gallery, where you will see that Piwik Pro server side tags are already included in our pre-configured templates. This means you don’t have to set everything up from scratch.
The next step is to add the necessary variables. Specifically, the variables require you to enter your Piwik Pro account name and site/app ID. This information will ensure that the configuration is correctly associated with your Piwik Pro account.
Finally, once you have filled in the variables, put the server container live. This is the final step and that completes your setup. These simple steps will save you time and avoid potential configuration errors, allowing you to use Piwik Pro Server side tracking quickly and efficiently.
Option 2: Manually configure Piwik PRO Server Side Tags.
Other option is to manually configure the tags for full control. First, we create the Piwik PRO page_view tags.
1: Create New Tag (Server Container).
Create a new tag by going to tags and then clicking new.
Give the tag a name.
2: Tag configuration (Server Container).
Click on tag configuration, go to Discover more tag types in the Community Template Gallery and add the Piwik Pro tag.
3: Add account name (Server Container).
Log into Piwik Pro, go to account and copy your account name.
Paste it into Google Tag Manager.
4: Add Site or App ID (Server Container).
Find the site or app ID in Piwik Pro under site & apps.
Select the site you are setting the tag for and copy the ID that appears.
Paste it into Google Tag Manager.
5: Select Event Type (Server Container).
Under anonymous tracking, you can choose to remove your IP address, for example.
Under event type, choose the type of event you want to measure.
In this case we choose page / app view to measure page_view.
Leave the rest of the settings at default.
6: Add Trigger (Server Container).
Add a trigger.
If you use consent mode, add a consent type, since Piwik Pro is not a Google product.
Add analytics_storage as a trigger for analysis.
If you don’t use consent mode, add pageview as a trigger.
This is the last step of the page_view Piwik PRO tag.
PageView Tag is Created – What Now?
Now that the pageview tag has been created, it’s time to set up tags for the rest of the events.
Standard Ecommerce Events
For Standard Ecommerce Events, create a new tag, again choose Piwik PRO tag as configuration, and enter the following:
- Account Name
- Site or App ID
- Event Type = Ecommerce.
You can leave the rest default or customize it to your liking. The trigger looks like this:
Note that consent mode has been added to the trigger; remove the consent state part if you don’t want it. However, you still need to add transformations to ensure that the data is processed correctly; how to do this is covered later in the blog.
Other Ecommerce Events
For Other Ecommerce Tags also create a new tag, select Piwik PRO tag as configuration, and fill in:
- Account Name
- Site or App ID
- Event Type = Custom Events.
- Custom Event Category = ecommerce
- Custom Event Action = {{Event Name}}.
You can leave the rest default or customize it to your liking. The trigger looks like this:
Same here: consent mode is added, remove it if not desired. For some custom events you can add transformations. For custom you can also add transformations. Is not necessarily necessary, but it can be done if desired.
Add transformations
Some tags require you to add transformations to ensure that the data is processed correctly by Piwik Pro.
What are transformations?
Transformations in Server-side Google Tag Manager are adjustments that you apply to the data coming in through the GA4 Client before it is passed to Piwik Pro. These transformations ensure that the data is passed in the correct format and with the correct parameters so that Piwik Pro can process and analyze it correctly.
Specifically, you need these with the following Piwik Pro tags within the Server-side Google Tag Manager configuration:
- Ecommerce Events: For events such as view_item, add_to_cart, and purchase. The naming and structure of these events in GA4 do not match what Piwik Pro expects, so you need to set up transformations to map them correctly.
- Custom Events (some): For some custom events that are not supported by default by Piwik Pro. Here you can use transformations to convert the events to the correct parameters.
Setting transformations
1. Create a Lookup Table: Start by creating a Lookup Table variable that converts GA4 event names to the corresponding Piwik Pro event types. For example, add_to_cart in GA4 becomes add-to-cart in Piwik Pro.
2. Create an Augment Event Transformation: Add the transformation by creating a new Augment Event Transformation. This transformation ensures that the GA4 data is modified to the correct Piwik Pro format before it is forwarded.
3. Test and Verify: After the transformations are set up and added to the appropriate tag, use the preview mode in Google Tag Manager to test that the events are processed correctly and submitted to Piwik Pro.
Bonus: anonymizing IP addresses via TAGGRS
TAGGRS’ GDPR Tool allows you to easily anonymize IP addresses / User agents. Through the TAGGRS Dashboard, you quickly activate this feature, allowing you to comply with GDPR regulations and protect user privacy.
Conclusion – Piwik Pro Server Side completed.
With these steps, you can set up Piwik PRO Server Side Tracking through Google Tag Manager. Whether you choose TAGGRS templates or manual configuration. With this configuration, you’ll collect more detailed data and comply with GDPR requirements.
Don’t forget to put the container live to complete the configuration! Not getting there or have questions? Then you can always start a live chat via the dashboard or submit a ticket via our support platform.
About the author
Ate Keurentjes
Server Side Tracking Specialist at TAGGRS
Ate Keurentjes is a Server Side Tracking specialist at TAGGRS. He has experience with various Google Tag Manager concepts. Keurentjes has been editing and writing about the latest developments and trends in data collection / Server side tracking since 2023.