2

I'm trying to understand the section on Mobile Apps on https://developers.google.com/tag-platform/tag-manager/server-side/send-data . I'm at a loss when it comes to following these instructions for mobile. I'm trying to capture data that I can send to my own server (potentially as well as to GA4) so in the server side container I have a client which sends to my API.

The main sentence I need help with is "Set the value of Image URL to a pixel image on the server container at the path in the Measurement Protocol client that you specified earlier".

Can anyone point me to a dummy's type guide about how to create that pixel image on the server container?

Also, "Measurement Protocol client that you specified earlier" doesn't seem to correspond to anything in the previous instructions, and the link to Measurement Protocol implies that GA4 should be used instead. How would this work with the scenario I'm setting up?

Has anyone actually got sGTM working with mobile apps?

1 Answer 1

2
  1. Mobile apps are irrelevant here, really. As long as you're capable of generating a generic http request, your platform doesn't matter. You can send hits from an excel sheet via VBA.

  2. Yes, clients in sgtm are confusingly closely tailored to GA. Well, it doesn't really matter. You will still have a custom request tag type, so just go with MP.

  3. Now the path thing. The requests coming to the sGTM endpoint are supposed to have different paths, based of which sGTM will make a decision about which client to use. Here: enter image description here

  4. Good, now to the image url and pixel image talk. That's just sGTM making it easier to use for marketeers who have a vague idea of a network request, but they know how pixel images work. In case you don't know, by loading a pixel from a third party server on our first-party page, we force the clients to send a request to that server. In the url of the pixel, marketeers typically indicate a lot of information that they want to pass to the server via query params. Basically, it's just a somewhat user-friendly abstraction over http requests. Much easier to deploy, too.

Finally, this is how your tag should look like, approximately:enter image description here

I recommend reading this article from Simo since it has the exact technical incline that would be more useful to developers.

2
  • 1
    I'm grateful for your time, but I don't think this entirely answers my question. I have successfully got the server-side container working already, and it works fine from a web site using a GTM client-side container with the "GTM Server Side URL" configured to that container. However when you create the client container for Android the tags don't seem to have any of the same options (including being able to set the "GTM Server Side URL". Is this something you have tried, or do you just send from a mobile app directly to the server-side container without a client container? Commented Aug 3, 2022 at 7:56
  • don't create one for android. Send the request directly from the apps to the endpoint. See how your web GTM forms request and do it the same way. Mobile GTM creates more problems than solves. I mean, maaybe it's useful for some pixels... Kinda slightly abstracting pixel logic from developers and from platforms, plus making it easy to move around. Yes, that is probably useful. I believe you can still use it to send a request to sgtm, in theory, using a generic pixel tag. But I wouldn't do it.
    – BNazaruk
    Commented Aug 3, 2022 at 15:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.