I’m encountering an issue with my server-side Google Tag Manager (sGTM) setup, and I’m hoping to get some insights from the community.
Problem Overview:
-
Data Tag Behavior: In my web container, I’ve set up a Data Tag that sends all Data Layer information to the sGTM container. The trigger for this tag is currently set to “Initialization - All Pages.” However, in the sGTM debug/preview mode, I’m not seeing generic events like clicks or custom events like “page_view” appear as distinct events. Imgur: The magic of the Internet
-
Event Name Issue: In the sGTM debug/preview mode, under Event Data, the event name is displayed as “en” instead of the actual event name (e.g. “page_view”). This discrepancy is causing difficulties in processing events accurately in the server container.
-
Expected Behavior: I expected the server container to show and process all custom events (e.g., clicks, form submissions, etc.) that are visible in the web container’s debug/preview mode. Currently, the server container processes only some events, and even those have inconsistent event name mappings.
Configuration Details:
- Web Domain: example.com
- Server Tracking Subdomain: tracking.example.com
- Data Tag in Web Container:
- Event Name:
{{Event}}
- Trigger: Initialization - All Pages
- Send All from Data Layer: Enabled
- GTM Server-Side URL:
https://tracking.example.com
- Event Name:
- Data Client in sGTM:
- Accept Multiple Events: Enabled
- Accepted Path:
/metrics/g/collect
- Response Body: JSON Object with Event Data
- GA4 Tag in sGTM:
- Event Name:
{{Event Name}}
- Event Name:
Questions:
- Is it expected for the server container to not display generic events (like clicks) unless additional configurations are applied?
- How can I ensure that all events (e.g., clicks, form submissions, etc.) that appear in the web container’s debug/preview mode are also processed and visible in the server container?
- Is the issue of the event name showing as “en” in the server container related to the Data Tag’s trigger or the event mapping between the web and server containers? How can I fix this?
Any guidance or suggestions would be greatly appreciated!