We need to push datalayer, trigger events and so on from .Net (C#) application from server side .
Google Tag Manager has JavaScript, Android and iOS SDKs. Also it has REST API, but this API allows only to manage containers, tags and events, but doesn't allow to track them.
So is it possible implement server side tracking for GTM? Seems it should be as there is SDKs for mobiles exist and it should be no big difference.
If it is possible then please let us know how and maybe there is API exists for that or SDK for .Net exists or planned in future. Maybe we have to push our data directly to Google Analytics and other endpoints? As I can see JavaScript SDK pushs data directly to GA from page.
Some clarifications first: GTM = Client Side
GTM is not a tracking tool (although it can be used to facilitate the implementation of actual tracking tools), it is a Tag Management system. That is why it only runs on the client side (Browser JavaScript, Android/iOS SDKs are all client-side runtime environments). The REST API you are referring to is a management API to automate tasks you would normally perform manually via the GTM GUI, it doesn't change the way GTM works (that is, a client-side tool).
Using server-side code with GTMThere are several ways you can write server-side code to interact with GTM, but it ultimately has to result in some code being evaluated on the client-slide
. Some examples:
But once again, no matter what you do on the server-side, it must systematically lead to 1 thing: code to be evaluated on the client-side.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With