Logo of TAGGRS, written in blue and with a small favicon
HomeServer-side Tracking
Start for free
Introduction
Get started
Get started with TAGGRSSet up Google Tag ManagerAdd the GTM Data LayerConfigure GTM transformationsTest the setupDebuggingAnalytics dashboard
Migrate from Google CloudMigrate from hosting
Shortcuts
GTM Copy PasteReady-made templates
GA4 Server-side Tracking
Setup in GTMCreate GA4 Event TagsGA4 tag setup in server containerE-commerce events in GTM
Google Ads Server-side Tracking
Install Conversion LinkerSet up Conversion TrackingConfigure Enhanced ConversionsDeploy Remarketing Tags
Facebook Server-side Tracking
Set Meta PixelImprove your EMQ ScoreInstall Meta CAPIMeta Events DeduplicationMeta CAPI Gateway
LinkedIn Server-side Tracking
Install LinkedIn Insight TagSet up LinkedIn CAPILinkedIn Events Deduplication
TikTok Server-side Tracking
Set up TikTok PixelInstall TikTok Events APITikTok Events Deduplication
Pinterest Server-side Tracking
Set up Pinterest TagConfigure Pinterest Conversions APIPinterest Events Deduplication
Snapchat Server-side Tracking
Set up Snap PixelSnapchat Conversions APISnapchat Events Deduplication
TAGGRS Tracking Tags and Tools
Tracking TagsGoogle Service Account integrationsGTM LogsProfit TrackingData Enricher ToolWebhooks TesterEnhanced Tracking ScriptMulti Domain ToolClick ID RecoveryConsent Tool
Configurations
Billy Grace Server-side TrackingLeadPages Server-side TrackingPiwik PRO Server-side TrackingCDN Server-side TrackingShopify Server-side TrackingActiveCampaign Server-side TrackingKlaviyo Server-side Tracking
Server-side Tracking for e-commerce
Shopify Data LayerShopware Data LayerMagento Data LayerWooCommerce Data LayerPrestashop Data LayerLightspeed Data Layer
Consent Management server-side
Activate Consent ModeConfigure TAGGRS with Axeptio

Set up GA4 in Google Tag Manager

GA4 server-side tracking begins with a proper web container configuration. This setup routes your analytics data through your server container before reaching Google Analytics 4, enhancing data accuracy, privacy, and resilience against ad blockers. By following this practical guide, you'll establish the foundation for fully GA4 server-side tracking, enabling advanced data processing and compliance controls.

Obtain Your GA4 Measurement ID

  1. Navigate to your GA4 property.
  2. Navigate to: Admin → Data Streams.
  3. Select your web data stream and copy the Measurement ID (format: G-XXXXXXXXXX).

Create a new tag in web container

  1. Open your Google Tag Manager (web container).
  2. Navigate to: Tags → New.
  3. Name your tag (e.g., GA4 Configuration).
  4. Click Tag Configuration and select Google Tag.

Configure the Google Tag

  1. Paste your Measurement ID into the Tag ID field.
  2. Under Configuration Parameters, add these key-value pairs:

    • send_page_view: true
    • server_container_url: [your-subdomain]

    Note, replace [your-subdomain] with your TAGGRS server container URL).

  3. Under Triggering, select Initialization - All Pages.
Logo of TAGGRS Server-side Tracking: a light blue circle with two blue angle brackets
Why is this important? It fires earlier than All Pages triggers, ensures UTM parameters are captured reliably, prevents unallocated traffic in GA4 reports, and avoids missed events during page transitions.

Save and publish

  1. Click Save to store your tag configuration.
  2. Submit and publish your container changes.
Logo of TAGGRS Server-side Tracking: a light blue circle with two blue angle brackets
Check this Server Container requirement before proceeding

Ensure you've created a server container via TAGGRS: your server_container_url must match your TAGGRS subdomain.

Troubleshooting tips

Missing events
Verify trigger uses Initialization - All Pages
No data in GA4
Confirm server_container_url matches your TAGGRS domain
Parameter errors
Validate JSON syntax in configuration parameters
UTM loss
Ensure tag fires before any redirects or SPA transitions

Useful resources

Google Analytics 4 server-side tracking - The full manual
Find expert support
Previous
SST templates
Next
GA4 event tag setup
Copyright © 2025 TAGGRS. All right reserved.
TABLE OF CONTENTS
Obtain Your GA4 Measurement IDCreate a new tag in web containerConfigure the Google TagSave and publishExpert tipsUseful resources