Using Standard Event Parameter Names for GA4 Tracking

I am late to the GA4 party and am only now starting to dive more into how it all fits together. It has been on my radar since App+Web was launched and I have done bits and pieces over the years but never enough to understand it properly.

The launch of the ZHS Orchards website was an excuse to implement GA4 alongside the traditional Universal Analytics and take more of a look. My initial take is:

  • The data collection is fine, great to have the auto tracked events, hmm on the recommended events and the custom event tracking is straight forward
  • Configuration options are split between great new additions & missing basic options
  • The BigQuery integration is a big win for the minority of companies who have the resources and data culture to use it
  • The UI is not currently usable

I am leaving my feedback at that for now.

My Issue

I was happy when I first saw the GA4 approach to event tracking, naming an event and sending additional parameters as name-value pairs. It matches the approach I have used within the Data Layer for years. Each tracked visitor interaction contains the name of the interaction plus more information, recorded using name-value pairs.

I have an issue though as this new GA4 structure doesn’t work with the approach I use with event tracking for Universal Analytics in GTM. As per this blog post, I use lookup tables to populate the Event Category/Action/Label fields in a single GA event tag in GTM for all events (actually two tags if one needs to include Enhanced Ecommerce data).

I want to continue with the approach of using a single tag in GTM for events as it feels right to me. That will be difficult when you name each parameter individually within the tag, lookup tables are still possible but convoluted.

I have thought of a technical solution to this but it will rely on a change from Google. Details of this solution are included at the end of this post.

My Solution

There is also a workaround I have thought of. As a bonus, it will also help other people with what I imagine are a couple of common use cases. My biggest concern is I am about to upset some peers in the Digital Analytics community with this suggestion…

Step one is to use standard parameter names for all GA4 events. Two obvious options for names for these parameters are:

  • “event_category”, “event_action” and “event_label”
  • “event_grouping”, “event_parameter_1”, “event_parameter_2, …, event_parameter_N”
This allows me to continue using a single event tag within GTM with my existing lookup tables. These just map to the shared event parameters instead of the standard event variables. It is a continuation of how I extended the number of event variables, allocating one or two custom dimensions as shared across all events.

Step two is to use the event modification feature in GA4 to rename these parameters to useful names within GA4, different for each event. This functionality is new to me but the example below looks right. It means you will end up with a long list of event modifications (at least one for each custom event) but I assume that will not be an issue.

The end result in GA4 will be as intended, just taking a roundabout way of getting there. I am able to continue with a single GA4 event tag, using a data layer variable for the event name and lookup tables to populate the parameter values. And I will have meaningful parameter/custom dimension names in GA4 which are relevant to each event.

Other Use Cases

I disagree with people who push events to the data layer with variables of eventCategory, eventAction and eventLabel, passing these to GA via a single GTM event tag. In my opinion, these companies should just send this data directly to GA, why use GTM at all. But they can also benefit from this trick, continuing to send through their data using parameter names of event_category, event_action and event_label.

I assume there are also companies that would like to try out GA4 in parallel to Universal Analytics but are holding off until they have the time to define parameter names for each parameter sent with their events. To get started faster, delay that thinking and just use standard parameter names instead. When time allows, implement these parameter names via event modification (or within GTM). But you will have GA4 data to play with sooner.

Technical Solution

I mentioned a technical solution to my issue that would allow me to use my single tag approach. This could be done with custom tags now (I assume) but I would like it to work with the standard GA4 tag templates.

My idea requires the event parameters to be included in the data layer as an object (I hope I have that term right). This object would be grabbed by GTM as a single data layer variable. I want the standard GA4 event tag template modified so that it allows this object to be used to pass through parameters (still allowing for other parameters to be added in that tag).

This would allow me to continue with my current data layer, the only modification would be to include the name-value pair parameters inside an object. I could then continue to use a single GA4 event tag, without the need for the lookup tables, just including this object as a parameter option. It would be the simplest solution for any company using the data layer to trigger events and pass through event information.

Thoughts?

I appreciate feedback from people who try this approach on how it works for them. Plus tell me if I used any incorrect technical terms here that need to be corrected.

Any companies who want some help implementing GA4 in parallel to their Universal Analytics implementation, potentially using this as an opportunity to make their Google Analytics set-up more useful and meaningful, please get in touch.