I’m setting up GA4 server + Google Ads Enhanced via server but for this client the sGTM does not receive this specific event I’m setting up whilst it does see normal ‘page view’ events firing in sGTM and the tag does fire on the client side.
I’m using this setup for multiple customer, where I use the gtag to send events to server container and the GA4 tag to send values and user-provided data to sGTM. Setup always works looking at the GA4 events + Google Ads Excellent tracking status.
For this client, there are some extra complexities:
Using Cookiebot and Consent Mode V2
Using Typeform in a iFrame
Gtag is still active for Gads
For a certain event, sGTM does not receive it whilst it is being fired on the client side. Setup:
Gtag has the server_url_container parameter with the Stape domain name for now
GA4 tag has the event name + user_data
GA4 server tag has the {{Event Name}} + linked to the GA4 client
I think your event is just sent directly to analytics instead of server container.
You can check this by looking at the requests in the network tab in the browser console (specify your ga4 measurement id to filter requests).
This can happen for several reasons:
a) Your google tag is running later than event tag
b) You have another integration or gtag that overwrites your settings.
c) Some other configuration issues, for example GA4 is linked to an old UA and there are ga() scripts in the code.
Thanks @Alex , the problem was with Typeform. Although the event seemed to be fired, apparently the cookie wasn’t placed. With a Typeform listener I have it working
The issue relates to iFrames. I encountered a similar problem with iFrames from TypeForm, WebinarJam, and others. To resolve it, I implemented a post message script within the iFrame and a corresponding listener script on the parent page. This setup allows the parent page to receive and process messages from the iFrame, enabling it to push events to its data layer. Once this communication was established, I could then fire the tags on the parent page, which resolved the issue.