If you have been following the tech news lately, you must have definitely heard about the newest iteration of Google Analytics known as GA4. According to a statement made by Google in March last year, The GA4 will entirely replace the existing Universal Analytics (UA) for collecting data from July 1, 2023, onwards. However, users can still use the UA till the deadline. Unlike sessions in the UA, data is collected and tracked as events in GA4.
The thing about GA4 recommended events is that it allows you to measure a specific interaction or occurrence that happened on your website or app. For example, when a particular person loads your website or clicks a link which redirects them to another page, the whole interaction can be measured through events. For instances such as purchases, app crashes, etc, the appropriate events can be measured. When it comes to events, there are several types, however, in this article, we’ll be explaining recommended events GA4 and how they are tracked, let’s get started.
Before diving into recommended events GA4, it is worth knowing about the other major events first and their purpose in the first place. In GA4, there are mainly four types of events which are listed below. As each event consists of several sub-events with each having its official definitions, it is worth checking the official GA4 events documentation to better understand the differences between each type.
These events are collected by default when you first set up Google Analytics on your website or app.
These events are collected automatically when you first set up Google Analytics on your website or app and enable the enhanced measurement option.
Unlike the other events which are collected by default, to collect and track recommended events GA4, those events require your implementation first.
As the name implies, these events are defined and implemented for custom purposes. Like the GA4 standard events, these too require implementation first.
The process of implementing names, parameters and tracking events must be done in the following order.
When it comes to GA4 recommended events, they do not automatically get triggered and logged unless manually implemented. The exact same event name and parameters described by Google must be used if you want the recommended events to work as intended. Failing to do so will result in Google not recognizing your event as one of the GA4 recommended events. Eventually, your particular event may not work or get triggered at all. Google has published several categories based on different business requirements. You need to know that GA4 standard events use the snake_case naming convention. This must be considered when naming your events and parameters.
For the complete list of events and their purposes, you can check the GA4 recommended events documentation and see if the event you want to track is listed. Before implementing any event, this page must be checked first. Alright, let’s see how to track recommended events in GA4.
As mentioned above, the thing about recommended events unlike automatic & enhanced events is that they have to be first configured using the predefined event names and parameters. Alright, let’s start with tracking a simple login in recommended events GA4, where should we start? First, we must begin by searching for the parameters in the event list. From the screenshot attached above, we can see there is a login event listed on the
all Properties section. Clicking on it takes you to a developer page where more details about the event are shown such as the parameters you can send with it.
Here, for our login event, we can use the method parameter. This indicates the actual method to be used for login purposes which can be Facebook, Google, Email, Phone, etc. depending on your business needs.
Let’s consider the sample code
gtag(“event”, “login”, {
method: “Google”
});
By adding the dataLayer.push code, the data is sent through the login method i.e. Google when the user logs in.
window.dataLayer.push({
“event”: “login”,
“method”: “Google”
});
The next step is to create a custom event trigger for the login event and a data layer variable which will access the value of the method. Both can be created by logging onto your GTM (Google Tag Manager)
After both these processes are done, the next step is to create a new tag that fires an event.
After the successful creation of the GA4 tag and configuration, it’s time to test the events by debugging so as to ensure that it’s running without issues. DebugView is the primary feature built for debugging GA4 data. You can find it by going to GA4 Admin > Debugview. Once the data starts coming in and is displayed, the GA4 changes must be submitted in the GTM container and published. If everything is done correctly, you should start seeing new data coming in your real-time report.
If you are looking for a convenient way to measure user interactions on your website or app, getting started with recommended events GA4 is the obvious choice. If you want to track an event with GA4, you should first check whether that event is already there in both automatic tracking and enhanced measurement. If not, then check the list of GA4 recommended events. The purpose of these events is to help google analytics better understand what kind of data you are sending in and in which reports to display it.
Researching keywords may seem like an easy task but it isn’t. When it comes to…
In our technology-driven, fast-paced business world to be unforgotten and competitive is not always easy…
If you are a business owner or simply a person who wants to earn more…
Email marketing is increasingly recognized by businesses of all kinds due to its immense possibility…
Programmatic SEO has become one of the most preferred and efficient ways to build a…
Laravel development framework so far has been used by all kinds of startups and tech…