Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Tag Manager - firing events from rest api

Some of my events are getting fired from frontend for both google analytics and facebook pixel and they are getting captured properly through GTM.

but now i have a functionality which is getting done from cron and is served from backend. I need to capture a event in both google analytics and facebook pixel when this is getting captured.

We need to fire the https (rest based) calls for capturing this.

Kindly help on this how this can be achieved.

like image 292
pooja singh Avatar asked Oct 16 '25 09:10

pooja singh


1 Answers

Update: While this was correct at the time of writing, Google has since introduced server-side tagging via GTM, which conceivably can be used for server-to-server communication.

--

GTM has no serverside API to trigger tracking calls (the GTM API is for managing tags that will be wrapped into a Javascript function. There is no tracking backend to do calls against).

You need to send your calls directly to GA via the measurement protocol or respectively to Facebook via offline conversions.

like image 150
Eike Pierstorff Avatar answered Oct 19 '25 14:10

Eike Pierstorff