GA4 server-side setup, multiple markets and a single SPA

Hi everyone,

I’m working on implementing server-side tracking via Stape for a multilingual website, and I’d love your input on the best architecture.

Here’s the current setup:

  • The website is a Single Page Application (SPA).
  • We have 5 different GA4 properties, one for each market: IT, EN, FR, DE, and ES.
  • There is a single client-side Google Tag Manager (GTM) container that dynamically loads the appropriate GA4 config depending on the active market.
  • Now we want to implement server-side tagging using Stape.

I’m evaluating whether to continue using the 5 separate GA4 properties (with routing logic in the server container), or to migrate to a single GA4 property and differentiate markets via custom parameters (e.g., market: "IT").

What would you recommend as the best long-term setup for:

  • Clean architecture
  • Ease of maintenance
  • Scalability
  • Data consistency in GA4
  • Server-side routing best practices

Thanks in advance :folded_hands:

Hey @Mattia_Giromel in terms of adding server-side container to your existing client-side one with dynamic measurement ids - there is no difference with either one of your approaches.

If you keep things as is, server-side client+tag will inherit everything from the client-side, so no manual/explicit routing is needed and all requests will end up where they need to.

If instead you go wuth a single property route - again, on the server container nothing changes.

So your decision here should be made purely on how you plan to then deal with that GA4 property (or properties). Keep in mind custom dimensions don’t surface in all reports, so some of the insight (again, don’t know your use cases) might be limited.

Bottom line is, from a GTM perspective there’s no significant difference.

1 Like

Hey @Dan !
Thanks for your consideration! Appreciate that.