Server Side Event for Floodlight tags - google-tag-manager

We are using Google Tag Manager (GTM) to host all the tags including Floodlight tags. One of our conversion events can happen offline and hence, we are thinking to use Measurement Protocol to send the conversion events for GA4. It is working great so far. However, we also need to send that event to Floodlight tags and we are not sure how it is possible to do it.
We are exploring Server Side Tagging in GTM and saw an official guide here. However, it seems that the trigger needs to be online (or some sort of browser). I don't think Measurement Protocol call from backend server can trigger this event to record the conversion in the Floodlight tags.
Has anyone faced this issue before and what would be the ideal solution? Thanks!

Related

Use hits sent by GA4 in Google Tag Manager to get events parameters

does anyone know if it is possible to use the parameters of an event sent with the hits of the event itself from Google Analytics with the Google Tag Manager?
page_view hit details
As you can see from this screenshot, the page_view event includes many parameters, such as Page Title, Session Engagement, and many others that are not natively tracked by GTM.
For example, if I wanted to get the value of the "seg" parameter via GTM, how can I do it?
Thank you
I tried using a custom JavaScript but I don't know how to use it
You cannot. GTM doesn't give you the ability to monitor network requests. Even though you may be sending the request via GTM to GA, it's not going to show you the request details or the response.

Trying to understand GTM Docs

A client of us is asking us to move to server side tagging on GTM.
So I created a container, I verified the domain and all of that, then I followed this:
https://developers.google.com/tag-platform/tag-manager/server-side/send-data
Once the server container URL is set, data is sent to a client in your Tag Manager server-side container. By default, GA4 and a UA clients are pre-installed on your server-side container.
Key Term: "Clients" are adapters between the software running on a user's device and your server-side Tag Manager container. They receive measurement data from a device, transform that data into one or more events, process the data in the container, and package the results to be sent back to the device.
In your Tag Manager server container, click Clients in the left navigation to view the list of clients. Click the name of the client to view or edit details. In most cases, the client will require no modifications. However, there are settings that may require edits for certain cases:
So now, my site (drupal) is sending events to a GTM web container as it always was, and that web container is firing the events on the server container and tags to GA4, and then the server container fires the events to GA4 again.
Isn't that redundant and pointless?
I thought the idea was to cut the middleman and try not to cross domain boundaries to prevent cookies from being blocked.
Am I reading the docs wrong? maybe I'm assuming this is the way it should be setup and instead this is just an example to get data from an existing feed?
As #Darrellwan indicated, you don't need to use two containers in parallel.
What a lot of people are trying to do is to use the front-end GTM to send events about what happens to the page to the backend GTM.
Using front-end GTM in this case, however, is questionable since it's too easy to block with most of the adblockers. Therefore, people often just do tracking with arbitrary on-page JS, sending the details to the sGTM endpoint. But then the adblockers can block the sGTM endpoint, which is, too, not the best case scenario, so they deploy a proxying mirror endpoint on their backend that relays events to the sGTM endpoint.
As per cookies, there's very little cookie concern. GTM doesn't use third party cookies for tracking, so no issues on that front. And there are very few people who disable cookies in their browsers since that cuts off a lot of functionality.
If all you do is using GA4, then having a server-side GTM is a bit pointless; you still have to integrate a full GA4 installation on the client via GTM (because some GA4 events like session_start are only generated in the client-side GA4 code), so it does not even save you page weight by reducing JS code.
The situation changes somewhat when you have additonal marketing tags, since you do not have to send a request to server-side GTM for every tag, but instead can re-use the data from the GA request for other tags. With a bit of programming you can also convert javascript cookies to server-side cookies, which makes them a tad more robust against some ad blocking features, and you can redact e.g. personal data before you fire tags to a marketing vendor.
The limits are tags that interact with the website, or tags that rely on 3rd party cookies (both not possible from a server-side container), so feedback tools, remarketing tags and similar cannot be used from a server-side container.
But yes, if all you want to do is to run GA4, then you do not need GTM at all (neither server-side nor client side) and would be better off with gtag.js (a sort of trimmed-down tag deployment solution for Google tags only).

What is equivalent of Facebook pixel in GTM for server side tagging?

With recently introduced feature of GTM, server side tagging and it's known benefits, I want to move my Facebook pixel browser code on server. So I am looking for equivalent of Facebook pixel for server side tagging.
The closest thing I found is Facebook Conversion api but not exactly same.
Would like to hear other views on how they are achieving this
There are quite a lot to learn and work to do this.
You need to understand the Facebook pixel hit's payload. Something like https://www.facebook.com/tr/?id={{pixelId}}&ev={{event}}&dl={{Document location}}...
Assemble the payload and send it to your Server Side GTM.
Create Client in the Server Side GTM to receive the hit.
Create Tag to dispatch the hit to Facebook.
The Server-Side GTM is not supported the 3rd party cookie and it means that the Facebook will not recognize the user you send from Server-Side GTM.
Facebook report will only show the conversion or event amount.
Can't use this for remarketing or attribution.
There are was no official Tag from Facebook for GTM Server Side. That's why I created my own https://github.com/gtm-server/facebook-tag
The tag sends the event data from the Universal Analytics/GA4 client to Facebook.
It developed exactly like an easy replacement for Facebook WEB pixel.

Can I get server side events sent into Google Tag Manger

We need to track some server-side events given that some of the activity done by our users is offline over the phone and send these events over to multiple tracking tools and ad networks to stop or intensify remarketing budget.
We have been reading about Google Analytics Measurement Protocol But this only fixes the issue for GA and other Google products (Google Ads), but it won't fix the issue for other networks (Facebook Ads, AdRoll, Outbrain, etc)
What I think would solve the issue is having these events pushed into Google Tag Manager, and collected by triggers and variables that would shoot out the right tags. This setup would allow our marketing team to stay in control of notifying the desired ad network to take action.
While it might be technically feasible I think making GTM work on server side would be a huge hack. Google Tag Manager is used to manage JavaScript and HTML tags and does not provide any server side API (apart from REST Api used to mange your accounts and containers).
The reason why I think it is technically feasible is this: GTM injects scripts to your website and relies on window component and events that do not exist on the server side. Therefore you would have to spin up some client on your server (like Electron) to make it work and then feed events to the client. You can try doing this for fun but I would not advise doing this for any commercial server.

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.
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.
Yes you can.
create an event listener on button click to connect to the API to collect the data
then with an event push the data you want to a Datalayer
and then use it as you wish.

Resources