Subdomain tracking - Server side

Hi everyone,

I’ve been contemplating some changes on our server side. Specifically, would it be possible to shift our tracking to a subdomain ? I believe this would allow us to reduce one DNS request and subsequently decrease the chances of being blocked.

Could anyone guide me on how to achieve this within GCP ?

Additionally, once this change is implemented, do I need to update to “server based” in the client GA4 within Google Tag Manager (GTM)?

Thank you in advance for your insights!

Best regards,

Hi Hugo,

This is definitely possible in GCP, but it’s much easier in Stape :wink:

In GCP you will need to access the app engine → settings → custom domains. In there you can add your subdomain and GCP will provide you with a list of A and AAAA records that needs to be created on your subdomain. You will also need to verify your subdomain using either Google Webmaster or Google Search Console.

In sGTM you will need to configure your tagging server to point to your new URL and in cGTM you will need to update your tags to send data to your new URL.

In general this process is surprisingly complicated considering all platforms are Google platforms. With Stape this process is automated, and you basically only need to add one record and you are good to go