How to set up Events and Conversions with Google Analytics 4 ( Part 1)?

janet wong
6 min readJul 7, 2021

In my previous blog, I shared how to install GA 4 and then walked you through the overview of admin configuration. Now, the time has come to configure your events and conversion, but questions are, how can I do? Let’s jump in together the steps to achieve it, or you can check out the CXL mini-course for more.

How Events Worked in Universal Analytics

You may be aware that the event differs so much from UA. In the past, if you want to set up an event in UA, you have to properly tag/define it as an event, transaction, etc. and then create a goal that is unique to each hit type. UA uses a hit-based data model, making the data more challenging to work with, especially in the BigQuery raw data feeds.

How Events Work in GA4

Google Analytics 4 has improved the feature, allowing users to automatically track specific types of conversions (e.g. purchase) or make an event a conversion by simply toggling it in the “All Events” report. Event name and free form parameters have replaced what we know as category, label and action in UA. With an event-driven data model, users can be much more descriptive about what they need to capture and consider everything as an event. Below is the quick comparison of GA 4 vs UA:

How to set up Events in GA 4?

First, you need a website alongside your GTM to deploy the tracking to set up an event. Within GA 4, there is an automatic measurement under Data Streams where Google is tracking things automatically for users. However, you can’t entirely rely on this feature as it does not go beyond what’s being set by default. Take Scroll as an example- it only shows the data when visitors get to 90% of the threshold on the page. What if users want to track a different threshold such as 10%, 25% or 50%? You would need to leave UI alone and head to GTM to customise it.

Create a custom event in GTM

Assume you are in GTM, you need to create a new tag for tracking the Scroll.

By doing so, on the tag configuration you need to:

Select Google Analytics: GA4 Event > select your GA 4- config under configuration tag > specify the event name with scroll > percent_scrolled for event parameters > click the + box to select variable > click built-ins > select {{Scroll Depth Threshold}} for value > give the tag a name e.g. GA 4 — Event — Scroll Tracking — 10, 25, 50, 75.

Set up event tag in GTM. Image taken from CXL.

So, let pause here for the event name. A fundamental rule of thumb here for event names is to be as consistent as possible since you have about 500 unique events name limits. GA expert would have advised to consolidate and use common sense with the naming convention.

Here is a very helpful resource in the event parameter that recommends checking it out as every user will want to reference it as you get started.

For the Triggering, to track 10, 25, 50 and 75 thresholds, you would need to:

Click on trigger > select Scroll Depth under engagement > click on vertical scroll depths > include 10, 25, 50 75 on the percentage ( GA tracks 90 by default,, so you don’t have to specify it) > fires your trigger on your choice — I’ll put all pages> give the trigger a name,, e.g. Scroll Tracking_10_25_50_70.

Once you are done, click create, hit submit and publish it! Do note that you can always test it by hitting preview to disrupt the website. Alternatively, GA 4 allows you to check it on its DebugView, where the information streams into real-time with the per cent scrolled for each interaction. Debug view works anytime when the preview mode of the GTM or GA Debugger extension is activated.

Sending Data to DebugView. Image taken from CXL.
Sending Data to DebugView. Image taken from CXL.

So that’s it, your first ever custom event is created in GTM!

How do Event Parameters work in GA 4?

Head back to your GA 4 account, click on your Event report. If you just create an event, it may take a little bit of time to show up. You can also click on Events under Engagement for the real-time view. And you will see the scroll events in the top left corner and the detailed event card in the report. However, you don’t get to see your per cent scrolled here. Why?

In events, your parameters are generally not available in the UI unless you register them as the custom definition. In other words, you need to register for the custom parameter.

In the UA, the event category, action and label was automatically available in the GA events report. But, in GA 4, you would need to take an additional step of setting up parameters and registering as a custom dimension so that the custom event is working correctly. Although parameters are also available in BigQuery by default, and you still need to go the extra mile to set the parameter up.

Set up custom definitions in GA 4

To do so, you can access primarily through your events report.

Click manage custom definitions> here where you’ll see a bunch of parameter names > then Click custom definitions (you may notice the parameter with percent scrolled is not available and that means you don’t have the ability to do the percent scrolled analysis). > Name it “ percent_scrolled” in Custom Dimension ( calling it what the event parameter name was in GTM) > Givie a custom dimension name as Percenet Scrolled ( you can change it anytime you want) > then Save it.

Step 1:

Custom Definitions Creation Step 1. Image taken from CXL

Step 2:

Custom Definitions Creation Step 2. Image taken from CXL

Step 3:

Custom Definitions Creation Step 3 . Image taken from CXL

It is important to rememebr that there’s a big difference between GA4 and UA. When users create custom dimension in UA, they can usually set up a scope and an index number. So when users registered, they had to pick a scope, hit, session, user or product. Moreover, there are no scopes available for custom dimensions in GA4, whereas the hit scope or event scope is at an event level. This actually means each custom dimension has to be sent with the actual hit and you have a limited number of slots, so plan carefully.

Once you hit save, a new custom dimension is registered and your parameter will be available!

So, the biggest takeway is to register your parameter for your event! Here are also seven best Practices for Google Analytics Events that given by Charles Farina that help you get familiar with the Event set up:

  1. Do everything in lowercase ( login instead of Login)
  2. Use underscores instead of spaces ( video_author)
  3. Consider following the suggested event guides ( may have future benefits)
  4. Start and use a data dictionary. Here is an example from Ken Williams
  5. Consolidate event names and resue parameters as much as possible ( there are limits)
  6. Don’t forget to register your parameters as custom dimensions ( otherwise, they are only in BigQuery)
  7. Don’t forget to create conversions where applicable

I hope you enjoy the article and I’ll continue the conversion tracking in the next blog! Have fun!

--

--

janet wong

“Everything is theoretically impossible, until it is done.” Robert A. Heinlein.