-
Trouble Tracking Events in GA4 When Using Tag Manager
Just picture this, we’ve got GA4 up and running on our sites with a GTM GA4 Configuration tag. It’s smooth sailing for standard tracking, but here’s the kicker. We want to trigger a few custom events using the
gtag('event', $eventName, $options)
protocol. Sadly, they’ve decided to go incognito and aren’t tracking.Now listen to this, if we start off with a curtain raiser
gtag('config', 'G-......')
, then the latergtag('event', ...)
calls get back on track. But there’s a glitch – we end up with a duplicatepage_view
and some of our cherished custom parameters get lost. It feels like this is shooting GTM’s purpose in the foot, plus it needs the ID in the site code, not configured through GTM. All of this somehow hints at a config error and not a real problem with loading GA4 via GTM to send non-GMT proxied events.If I had to hedge my bets, I’d say the GTM implementation and a direct one with
gtag.js
usinggtag('config', ...
aren’t really on the same page.And hey, we’d rather not set up each event as a GTM event. We need that freedom to toss any data from the front end.
So here’s the million dollar question. Can we:
- Get
gtag('event', ...)
calls on the same footing with GA as ifgtag('config', ...
has been called? - Set up a GTA trigger/tag that tosses raw data straight to GA4?
- Get
Log in to reply.