Přeskočit na obsah
PLATFORM SETUP

GA4 server-side setup

A complete guide to setting up Google Analytics 4 with server-side measurement.

10 min čtení Středně pokročilý Aktualizováno 5.6.2026

⏱️ Setup time: ~15 minutes | Level: Intermediate

Why GA4 server-side?

A standard GA4 implementation via client-side GTM loses 25-35% of data to ad-blockers and ITP restrictions in Safari. A server-side setup solves this by sending data through your subdomain.

Prerequisites

  • A GA4 property with a Measurement ID (format G-XXXXXXXXXX)
  • A deployed sGTM container (see the sGTM Basics guide)
  • Access to the GTM web container

Step 1: Configure the GTM web container

  1. Open your web GTM container
  2. Edit the GA4 Configuration tag
  3. In the Transport URL field, enter the URL of your sGTM endpoint (e.g. https://sgtm.yourdomain.cz)
  4. Tick Send to server container
  5. Publish the changes

Step 2: sGTM container — GA4 Client

A GA4 Client should be pre-configured in the sGTM container. Verify that:

  • The client is active and receiving requests
  • The default GA4 paths are set (/g/collect)

Step 3: GA4 Event Tag in sGTM

Create a GA4 tag in the server-side container:

  1. Tag type: Google Analytics: GA4
  2. Measurement ID: your G-XXXXXXXXXX
  3. Trigger: set it to All Pages (or a custom trigger)
  4. Save and publish

Verification

Checklist:

  • You see active users in the GA4 Realtime report
  • You see incoming requests in sGTM Preview Mode
  • The browser's Network tab shows requests to your subdomain (not google-analytics.com)
  • An ad-blocker didn't block tracking (test with uBlock Origin)
Pomohl vám tento článek?
✓ Děkujeme za zpětnou vazbu