Reputation: 9881
We need to push events to GTM. Typically this is done via JavaScript using the datalayer as described here using:
<a href="#" name="button1" onclick="dataLayer.push({'event': 'button1-click'});" >Button 1</a>
What I want to know is:
Upvotes: 2
Views: 4016
Reputation: 32780
Update: Google by now supports server-side tag management. While SSGTM is not a Rest Api in any formal sense, you can send data there via an http endpoint.
--
GTM for web pages is not run on the server in any case - it bundles the configured tags into a Javascript function that is evaluated and executed in the client, so there is nothing you could push the data to. And while it is vaguely possible you could reverse engineer the network calls from the Mobile SDK (mobile GTM is pretty much a different product with the same name) there is no supported API outside the platform specific SDKs.
Upvotes: 4