Skip to content

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).

  • A server GTM container receiving events (GA4 or Data Client).
  • Your Monita property token and vendor names — see the Monita-side setup.
  1. In your server container, create a tag from an HTTP-request-capable template.

  2. 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 token header, vn and e. Add whatever parameters you want to validate into the dt object — that’s what data validation alerts read.

  3. Add a trigger — usually All events, or scoped to the vendor tags you’re mirroring.

  4. Preview, then publish the container.

  1. In server GTM Preview mode, check the outgoing request to collect.monita.ai returns 204 (401 = wrong or missing token header).
  2. In Monita, events appear in the property’s Visualisation view within a minute or two.