Server-side tagging for a site with multiple domains

Hi Here,

I have a WordPress site with a WooCommerce shop, and the same site has a subdomain that also has a WordPress CMS and a WooCommerce shop. The main site has, for example, the domain, and the subdomain has

I am a bit confused with the approach and steps that might be involved in the server-side setup of these sites and am seeking some expert advice here.

Currently, the same GTM and GA4 properties are being utilized in both domains.

E-commerce events are repetitive, and not many custom events are there to be tracked. So per my assumption, I can have one server container because there is no overload of events or tags.

I wonder if I can follow the below approach, or please feel free to correct me if my understanding is incorrect.

  1. Create a custom sub-domain: I can use the main site’s domain for a custom sub-domain. i.e.,, and it will work for both my subdomains.
  2. Custom Loader, where I can utilize the same custom domain.
  3. Utilize “Multi-Domain” Power Ups: Create records for all sub-domains and add DNS records.
  4. Once the domains are verified, add those server URLs to the GTM server container and then go for the custom loader (probably using the main domain

At this stage, I am not sure if step 1 is not needed in subdomain cases and if I should apply step 3.
Can anyone here please guide me on this one?

You don’t need to do anything specific, and you don’t need to the multi-domain approach., and the subdomain has

these share top-level domain, which means they share first-party context and cookies so you can use something like as a tracking subdomain for both, and both can utilize the same loader

1 Like

Thanks for solving my doubts!
I appreciate the help. :smiley: