Send data from server-side GTM to Monita
A server-side Google Tag Manager container can forward the events it processes to Monita, giving your server container’s vendor tags the same monitoring as client-side ones.
Use any tag template that can send an arbitrary HTTP request (a simple custom template with sendHttpRequest works well).
Before you start
Section titled “Before you start”- A server GTM container receiving events (GA4 or Data Client).
- Your Monita property token and vendor names — see the Monita-side setup.
Create the tag
Section titled “Create the tag”-
In your server container, create a tag from an HTTP-request-capable template.
-
Configure the request:
-
Method:
POST -
URL:
https://collect.monita.ai/api/v1/ -
Headers:
token: <your property token>,Content-Type: application/json -
Body, mapped from the event data:
{"s": "gtm","dm": "tms","e": "{{Event Name}}","vn": "Google Analytics 4","u": "{{Page Location}}","do": "www.your-domain.com","sid": "{{Client ID}}","dt": [{"event": "{{Event Name}}","currency": "{{currency}}","value": "{{value}}"}]}Required: the
tokenheader,vnande. Add whatever parameters you want to validate into thedtobject — that’s what data validation alerts read.
-
-
Add a trigger — usually All events, or scoped to the vendor tags you’re mirroring.
-
Preview, then publish the container.
Verify
Section titled “Verify”- In server GTM Preview mode, check the outgoing request to
collect.monita.aireturns204(401= wrong or missingtokenheader). - In Monita, events appear in the property’s Visualisation view within a minute or two.