Piwik Pro Serverside through GTM

I’ve been trying to install Piwk Pro Serverside by using GTM but Piwik is not receiving any data. I do see all the data coming in my Serverside GTM and my Piwik tags are firing correctly but Piwik Pro is not receiving any data and the Debugger is telling me there is no Piwik Pro container installed.

I’ve been using the tag template mentioned here: Google Tag Manager (server-side) integration | Piwik PRO help center
as well as this one that is adapted for GA4 events: GitHub - endgameapp/piwikpro-gtm-serverside-ga4: A tag template for Piwik Pro server-side tracking of ecommerce events inside Google Tag Manager (based on GA4 client)

Anyone an idea what causes the issue?

PS: The idea is to also have the consent manager running from Serverside, I’m only using GTM to have the serverside set up, I’m not sending data to Google.

Hi @Yannick_Timmermans,

Using GTM server-side debug mode, could you please check if Piwik PRO tag was triggered?

Hi @Adam ,

The tag is triggered, but I have no outgoing HTTP requests. I do have an error saying "Permission ‘send_http’ with parameters {“url”: XXX} failed with error: Invalid URL filter.

Hi @Yannick_Timmermans,

Thank you for prompt answer. What account URL did you use? In configuration it be similar to https://example.piwik.pro/

Hi @Adam ,

I had it set up as a variable in GTM, but this seems to be not working. When I put the data in manually the out going request is happening.

Cnan you confirm that for events we have to configure that in Piwik Pro Tag Manager? Or do we have to use the clientside GTM to send events to the serverside GTM where we than have a Piwik tag fire?

Hi @Adam ,

Additional question, how it serverside impacting the consent manager?

@Yannick_Timmermans

The integration works best when events from client-side GTM are sent to server-side GTM. We currently don’t provide a dedicated Piwik PRO client template that would process events from client-side Piwik PRO.

Piwik PRO Consent Manager would also be supported by the client template for Piwik PRO. We will create a Feature Request for our developer team to include this in their plans.

Hi @Piotrek ,

So today it’s not possible to have the consent manager of Piwik in a Serverside set up as this would require a Client created in the Serverside GTM that processes all the requests?

You could try a hybrid setup that integrates our Consent Manager with client-side GTM, like this: Consent Manager integration with Google Tag Manager | Piwik PRO help center.

This way you would run client-side GTM on the website, but use consent gathered with Piwik PRO inside of triggers/blocking triggers.

What I meant earlier, is that you might lose analytics events about actions in the consent banner (like clicking accept/reject). I mean the ones from this report: Consent report | Piwik PRO help center.

I hope this description is clearer now :slight_smile:

Hi @Piotrek ,

I understand this, but we’d like to have Serverside Piwik Pro (which we have right now for the Analytics part) and the Piwik Pro Consent manager as well. This is not an option than since the recommendation is not to swtich to Google Tag Manager on Client side with the Piwik Pro Consent manager activated?

Hello @Piotrek and @Yannick_Timmermans.
Since there is a sGTM Template (New Piwik PRO Templates In Server-side Google Tag Manager | Simo Ahava's blog) I’d like to know, if I can use the Consent Manager as well?
I’d like to change the “xxx.containers.piwik.pro” domain to a sGTM domain which might look like “analytics.xxx.com”.
Is there any solution yet?

Hi @bencherry,

One important thing to remember is that you can’t really separate the Consent Manager and Tag Manager modules when it comes to installation. You get both.

To clarify, the purpose of serving CM & TM from sGTM would be to take advantage of caching or simply to serve it from the 1st party domain? If it’s for caching, I don’t think this is a viable way as the content of the TM container can change dynamically (e.g. adding or removing tags).

Hi @anthonybartczak ,
I’d like to use both :slight_smile:
Currently we are using Analytics + Consent Management.
The usage of sGTM is only because of enabling Meta Conversion API and server side requests for Google Ads.

I’d like to have a small setup (just one snippet in the html page), even if it is more complex to set it up.