Getting Started with sGTM Hosting
Step 4. Send data to the server container
Google Analytics 4
1) Create a configuration variable for the server container URL. To do that:
- Click on the Variables menu.
- Click New under the User-Defined Variable bar.
- Click on the Variable Configuration bar.
- Select the type Google tag: Configuration settings.
- Click Add parameter.
- Enter the following parameters:
- Config Parameter: server_container_url.
- Value: the URL of your Tag Manager server container.
- Give your variable a descriptive name and click Save
2) Create a Google Analytics 4 tag:
- Click on the Tags menu.
- Click New.
- Click on the Tag Configuration tab.
- Select Google Analytics → Google Tag.
- Under Tag ID, enter the ID from your GA4 account (to find it, go to your GA4 → click Admin → Data streams → select the stream → see Measurement ID.)
- Under Configuration settings, select the server container variable you created earlier.
- Under Triggering, make sure the option Initialization – All pages trigger is selected.
- Give your tag a descriptive name and click Save.
- Click Publish for the container to go live.
3) Next, let’s see how to create a GA4 event, using the All Clicks event as an example:
- Click on the Tags menu.
- Click New.
- Click on the Tag Configuration tab.
- Select Google Analytics → Google Analytics: GA4 Event.
- Enter your Measurement ID (from the GA4 Data streams menu.)
- Give your event a descriptive name.
- Click Triggering → All Clicks.
- Give the tag a descriptive name.
- Click Save.
Was this helpful?
Thanks for your feedback!