Skip to content

Help shape the State of Tracking Report 2027. It takes 5 minutes.Take the survey

Setting up Piwik PRO Server-side Tracking in Google Tag Manager

Learn how Piwik PRO Server-side Tracking provides a privacy-friendly data collection solution for Piwik PRO campaigns.

Ate Keurentjes

Head of Marketing

9 min read

Cover titled Piwik PRO Server-side Tracking with the Piwik PRO logo and the TAGGRS template gallery: set up in under 20 minutes

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.

TAGGRS is an official server side partner of Piwik PRO

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:

  1. Data Privacy and Ownership: Piwik PRO gives full control over data ownership and privacy, important for GDPR compliance.
  2. Hosting flexibility: Piwik PRO can be hosted both on-premises and in a private cloud, unlike many other tools that are cloud-based only.
  3. Advanced features: Piwik PRO offers built-in features for GDPR compliance, such as advanced data anonymization and comprehensive access controls.
  4. Access to raw data: Piwik PRO provides full access to raw data, offering more flexibility for custom analysis and reporting.

Piwik PRO Analytics dashboard showing paid media traffic, visitors, conversions and conversion rate for a demo site

Why do users choose Piwik PRO?

Here are four points by which Piwik PRO and Google Analytics differ:

  1. Data Privacy and Ownership: Piwik Pro provides complete control over data ownership and privacy, which is essential for GDPR compliance.
  2. Flexibility in Hosting: Piwik Pro can be hosted on-premises or in a private cloud. Google Analytics is cloud-based only.
  3. Functionalities: Piwik Pro has built-in features for GDPR compliance, such as advanced data anonymization. Google Analytics has less prominent privacy features.
  4. 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:

Website → Web client → Piwik Pro Tag → Piwik Pro servers

With the new configuration, the data flow is as follows:

Website → Web client → GA4 Client → Piwik Pro tag → Piwik Pro servers

Piwik PRO server-side data flow: website, Google Tag in the web container, GA4 Client and Piwik Pro Tag in the server container, then Piwik PRO

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. Please note that if you just enter a dummy code here, you will not send data to an Analytics account!

TAGGRS has servers all over the world and does not rely on Google Cloud environment. Start TAGGRS for free 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 Tag:

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 web container.

Piwik PRO tag in Google Tag Manager: the Event Type dropdown with Inherit from Client selected, plus options like Ecommerce and Custom

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 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 required 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.

Google Tag Manager Variables page filtered on Piwik: constants for the PiwikPro account name and App ID to fill in, plus a GA4 to Piwik PRO lookup table

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 tag.

1: Create new tag (Server Container)

Create a new tag by going to tags and then clicking new. Give the tag a name.

Tag configuration (Server Container)

Click tag configuration, go to Discover more tag types in the Community Template Gallery and add the Piwik Pro tag.

Add account name (Server Container)

Log into Piwik Pro, go to your account and copy your account name. Paste it into Google Tag Manager.

Add Site or App ID (Server Container)

Find the site or app ID in Piwik Pro under Sites or App. Select the site for which you are setting the tag 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 are not using 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

Piwik PRO - standard ecommerce tag in Google Tag Manager: Event Type Ecommerce, account and site ID variables, and a GA4 ecommerce (standard) trigger

You can leave the rest default or customize it to your liking. The trigger looks like this:

Custom Event trigger GA4 - Event - ecommerce (other) + analytics_storage: regex on checkout and cart events, firing only when analytics_storage is granted

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 enter:

  • Account Name
  • Site or App ID
  • Event Type = Custom
  • Custom Event Category = ecommerce
  • Custom Event Action = {{Event Name}}

Piwik PRO - other ecommerce tag with Event Type set to Custom, Custom Event Category ecommerce and the Event Name variable as Custom Event Action

You can leave the rest default or customize it to your liking. The trigger looks like this:

Trigger GA4 - Event - ecommerce (other) + analytics_storage for the Piwik PRO - other ecommerce tag, with consent mode and Client Name equals GA4 conditions

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 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 it 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.

Lookup Table variable that maps GA4 event names to Piwik PRO event types, such as add_to_cart to add-to-cart and purchase to order

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.

Piwik PRO ecommerce transformations: an Augment event transformation setting x-pp-e_t from the GA4 to Piwik PRO lookup, applied to the standard ecommerce tag

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 sent to Piwik Pro.

Piwik PRO - standard ecommerce tag with the Transformations section highlighted, showing the attached Piwik PRO ecommerce transformations

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.

GDPR settings in the TAGGRS dashboard with toggles to anonymize IP addresses and User Agent in the tracking

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

Head of Marketing

Ate Keurentjes, now Head of Marketing at TAGGRS, initially joined the company as Marketing Specialist in August 2023. With deep expertise in Server-side Tracking, SEO, and data-driven marketing strategy, he leads initiatives that enhance TAGGRS’ online visibility, user engagement, and conversion performance. By analyzing industry trends and leveraging advanced optimization techniques, Ate drives impactful marketing campaigns that accelerate the company’s growth.

Newsletter

Tracking that keeps working, in your inbox

What changes in browsers, platforms and privacy rules, and what to do about it. No more than one email a month.