Step 5.1. Google Analytics 4
Updated Mar 26, 2025
There can be three scenarios:
1. If you have already configured the server-side Google Analytics 4, skip this step.
2. If you already configured Google Analytics 4 inside your web GTM container, all you need to do is:
a. Add your server container URL to Google Tag settings. In the configuration settings, add the configuration parameter server_container_url and add your tagging server URL as a value.

b. Create Google Analytics 4 client in server GTM container. To do so, open the clients’ section → Create New client → Select client type Google Analytics: GA4 (Web) → Add client name and click Save.

c. In the server GTM container create a new tag with the tag type Google Analytics: GA4

d. Add Measurement ID and Event Name.
Measurement ID - Follow this guide to find GA4 ID. You can add it as variable or if the event came from a GA4 web tag, you can leave this field blank to inherit the measurement ID of the event.
Event Name - the event name to send to Google. See the recommended events for more information. If this field is blank, the value of the event_name parameter will be sent.

e. Click Triggering and configure a trigger with the trigger type Custom that will fire every time when client name equals GA4 (or the name of the GA4 client that you’ve specified on the step 2.b) → Click Save.

3. If you do not have GA4 configured, follow the below steps:
a. Inside the Web container, create a new tag of the tag Type Google Tag. Add your Google Tag ID.
Add trigger to GA4 tag. It usually should trigger on all page views.

You can also create a Google tag: Configuration settings variable that will predefine Google Tag settings if you need to use multiple Google Tags on your website and do not want to add settings for each tag manually.
These parameters can, for example, define whether you want to send a page view event every time a Google Tag triggers, set UTM parameters, set client ID, etc. There is a list of standard Google Tags configuration parameters.
b. To set up the GA4 event tracking, go to the tags section and create a new tag with the tag type Google Analytics: GA4 Event. Add your GA4 ID and the event name; there is a list of standard event names.


c. Go to your Google Tag Manager Server container. Click Clients and New.

d. Choose Google Analytics: GA4 (web) and click Save.

e. Go to Tags and click New.
f. Choose Google Analytics: GA4.

g. Add Measurement ID and Event Name.
Measurement ID - Follow this guide to find GA4 ID. You can add it as a variable or if the event came from a GA4 web tag, you can leave this field blank to inherit the measurement ID of the event.
Event Name - the event name to send to Google. See the recommended events for more information. If this field is blank, the value of the event_name parameter will be sent.

h. Click Triggering.

i. Create triggers for the tag. Client name should equal GA4. Example:
Click +

Choose Custom type → click Some events → choose Client Name in built-in variables → set Equals GA4 (the name of your GA4 client) → click Save.

j. Open web and server GTM debuggers and test the setup.
Open the Server container preview mode and check that you see GA4 requests. Publish updated inside server and web Google Tag Manager containers.
