Server Side GTM Template - Pass Category, Action, Label

Hey!

I was testing SS tag template last week only with pageviews.

I currently have:

  • Client GTM with pageviews and events (I use custom API to send category, action, label
  • Server GTM with pageviews

My queries are:

  • Do I need to only fire pageviews in client or server using piwik tag templates? Or an hybrid one is the best approach? Would it create duplicated visitors?
  • How I am supposed to indicate category, action and label on server given the fact that I cannot pass custom HTML async tags to it?

Thanks

Thanks

Hey @Alejandro_Aboy,

Typically you set up client-side event tracking and set the server-side GTM container as the custom URL where the requests are sent.
Our template works best with the UA client (standard GA3 tracking) and it converts the GA data structure into Piwik PRO events.

If you send data to Piwik PRO from both the client-side and server-side GTM, you would see separate sessions for both. There’s currently no way to set the session ID from server-side GTM based on client-side identifiers (like cookies).

The template works with custom events (category, action, label are passed to Piwik PRO) sent from client-side tracking. It picks up the event type and generates the appropriate request to Piwik PRO.

1 Like

Thank you, I will test it out. Do you know by any chance if GA3 client will still be functional after GA sunset?

It will be functional at least until GA360 (paid version) sunset next year.

Hi @Piotrek , just to make it 100% clear and avoid any issues:

  1. Using client & server will result in different sessions for the same user. This will happen every time the page is loaded?
  2. I can use GA Client on GTM Server Side until (At least) July 2024. My company is not a 360 Client, we could still use it the same way to intercept requests?
  3. I should pass everything to GA Client so Piwik can intercept the category, action and label from the request and format it accordingly.
  4. (updated) I’ve been checking Server Side implementation and I’ve realize that when I only use server side the visitorID cookie is never created on the browser but I do see activity in the tracker debugger when I look by IP. Is this an expected behavior?

Am I missing/misuderstanding something?

Thanks