Open Tracked/Guides/Google analytics 4 advanced tag for server GTM

Google analytics 4 advanced tag for server GTM

In a server container, the GA4 client receives events and the GA4 tag forwards them to Google Analytics. Both need to be set up and tested.

4 min read · Updated October 26, 2026

In this guide
Key takeaways
  • The GA4 client receives events from the Google tag and turns them into event data. The GA4 tag sends them on to Google Analytics.
  • The server container can set first-party cookies (including FPID) and add or remove parameters before forwarding.
  • Test with server Preview and GA4 DebugView.
Browser GA4 eventsGA4 client and tagGoogle Analytics

GA4 is the tag most people put in a server container first, because the Google tag already speaks to it. The pieces are simple, but the settings matter. This page explains the client, the tag, the parameters and the checks. It follows how server-side tracking works and GA4 event tracking.

The two parts

PartJob
GA4 clientClaims incoming GA4 requests from your tagging subdomain, builds event data, sets cookies in the response, and can serve the Google tag script
GA4 tagSends the event data to Google Analytics, using your Measurement ID
Ask AI

Ask Ari instead of digging through reports

Ari reads your tracking and ad data and answers in plain words.

Set it up

1

Set the server container URL in the web container

In the Google tag settings, point to your tagging subdomain.

2

Check the GA4 client in the server container

It should be present and active.

3

Add the GA4 tag

Use the GA4 tag with your Measurement ID. A trigger on the GA4 client's events sends everything.

4

Choose cookie settings

The client can set FPID as a first-party cookie, and its lifetime is configurable.

5

Test

Open server Preview, send events and check DebugView.

Parameters and user data

  • Event parameters from the browser arrive as event data, and the tag forwards them.
  • Use an Augment transformation to add parameters, such as the country from Open Tracked's Visitor Location power-up or device details from Device Info. See transformations.
  • Use Exclude transformations to drop fields GA4 should not receive.
  • User properties can be set from event data if you use them.
Set up in minutes

Connected in minutes

Add your domain, install the pixel, connect your ad platforms and watch the first events land.

Cookies

The GA4 client sets a first-party client ID cookie from your server, which lasts longer than a script-set cookie. Safari may still cap it in some cases, so consider restoring cookies. See extending cookie lifetime.

Settings to check

0 of 7 done

Common problems

SymptomNo data in GA4
Likely causeThe tag did not fire, or the Measurement ID is wrong.
FixCheck the tag in Preview and the ID.
SymptomEvents appear twice
Likely causeThe web tag also sends directly to Google.
FixRemove the direct send or use one route.
SymptomGeography is missing
Likely causeThe IP is anonymised or missing.
FixCheck the Anonymizer setting and location headers.
SymptomSessions break
Likely causeCookies do not persist.
FixCheck cookie settings and domain.

A realistic example

A store moves GA4 to its server container and sees sessions fall by a few percent, which worries the team. A look at the setup shows the web tag was still sending events straight to Google as well, so GA4 had been counting some events twice. Removing the direct send and keeping the server route gives cleaner, lower numbers that match the store's orders more closely. The team adds an Augment transformation that adds the visitor's country from Open Tracked's Visitor Location power-up, and an Exclude transformation that drops a form field that should never have been sent. A week later the reports are lower, cleaner and easier to explain, and DebugView shows each event once.

The point is to expect small differences after any change in the route and to explain them before someone asks. Note the date, the reason and the direction of the change in your reporting.

For online stores

Orders from your store, back to the ad that earned them

Your store sends the order once. Open Tracked passes it on to each ad platform, cleaned and deduplicated.

Frequently asked questions

What does the GA4 client do in a server container?

It receives GA4 requests, creates event data, sets cookies and can serve the Google tag.

What does the GA4 tag do?

It sends event data from the server container to Google Analytics.

How do I test GA4 in server-side GTM?

Use server Preview and GA4 DebugView.

How do I add parameters to GA4 events?

Use an Augment transformation or a variable in the tag.

Why do I see double events?

The browser also sends to Google directly. Use one route.

Do I need spreadsheets to read my results?

No. Once tracking is live, the Open Tracked analytics shows spend, revenue, ROAS and profit, and you can ask Ari, the built-in AI assistant, questions about your own numbers in plain words. Ari's allowance depends on your analytics plan.

Is Open Tracked different from Open Track or Open Space Track?

No. Open Tracked is the official name of our server-side tracking platform, and the website is opentracked.io. Many people search for it as Open Track, OpenTrack or Open Space Track. All of them lead to the same product: server-side Google Tag Manager hosting, first-party analytics and a CRM pipeline.

Fix your tracking at the source

Open Tracked hosts your server-side Tag Manager, keeps first-party cookies alive and shows what each ad is really worth.

Open Tracked
Written by

The Open Tracked team

We build Open Tracked: server-side tracking hosting, analytics and the tools around them, for stores that spend on ads. Questions about this guide, or an idea for the next one?

Write to us Read the docs

Was this article helpful?

Comments

Loading comments...

Turn better tracking into better marketing performance

Start free