Google Server-Side Tagging via GTM
    • 1 Minute to read
    • Dark
      Light

    Google Server-Side Tagging via GTM

    • Dark
      Light

    Article summary

    With Google Server Side Tagging you can run your own server that sends track requests to Mapp Trackservers. There are two major goals that can be accomplished with that kind of setup:

    1. Completely avoid tracking on the client side (e.g. in the browser) by sending all requests right from your app server to the GTM server.

    2. Sum up several client-side requests for different providers to one single request to the GTM server, which then splits up the data and sends different requests to different providers on the server side.

    To better understand the infrastructure, we recommend reading through Google's documentation here.

    In general, there are two parts when it comes to server-side tagging: Client Templates and Tag Templates. Mapp provides a Tag Template, while the Client Template must be composed based on your individual needs.

    Even though the Client Template has "Client" in its name, it also runs on the GTM Server, not in the client browser.

    You can set up as many Client Templates as you want, however, only one Client Template can be used for one incoming request. You set up certain conditions, like a query parameter that must be in the incoming request, and when the condition(s) is(are) met, the Client Template "claims" the request. It then reads all the data that comes from the request and transforms it into "event data". Those are basically just plain JavaScript objects that are made available to the Tag Template.

    The Tag Template then needs to be configured as expected from the client side GTM: you can define variables that hold data from your events. Then, those variables can be mapped to different entities like the page name, event name, parameters, categories, and device information. You must also configure it by entering a track domain and track ID. Then, the Mapp Intelligence tag template will send a trackrequest with all the data you mapped to the given trackserver.


    Was this article helpful?