-
. Track Custom Parameters for Click Events in GA4
Hey there, we recently stepped up our game and upgraded to GA4. Before that, we used a code to track our events (check it out below):
`javascript
ga(‘send’, { hitType: ‘event’, eventAction: ‘test_cameron’, eventCategory: document.title });
`
After the upgrade, the code took this form:
`javascript
gtag(‘event’, ‘test_cameron’, { event_category: document.title });
`
Thanks to the update, we can list our new custom event alongside the standard ones like clicks and page views that GA4 tracks.
But there’s a hiccup. You see, we have over a hundred custom events, most of which are really just clicks masked with our custom names. We’re worried this might make our event list a messy pile of information.
Ideally, we’d like to file all these events under one big ‘click event’ folder and use custom names as filters. But we don’t know whether this is possible in GA4 or how to go about it. And the idea of manually sorting everything in GA4 itself doesn’t sound fun at all. We’d love to be able to add more parameters to the standard click event instead.
We tried this avenue, creating what you see here:
`javascript
gtag(‘event’, ‘click’, { event_label: ‘test_cameron’, event_category: document.title });
`
We hoped that we’d be able to track the clicks via the
event_label
, but we couldn’t find these labels anywhere in the GA4 UI events.And now we’re worried. Will doing this cause GA4 to track both the automatic click tracking and our new custom click code? This could result in doubled data for clicks. Is creating custom events the best way to track specific clicks? We’re not sure. Can you help us?
Log in to reply.