Automatically Collected Events in GA4
Automatically collected events are the foundation of GA4 event tracking. Unlike other events, there is nothing you need to do to set them up. They are collected – you guessed it – automatically.
Let’s review the three automatically collected events and how you can use them in your analysis.
What are Automatically Collected Events?
Automatically collected events are are triggered by basic interactions on your site or app.
Automatically collected events are one of the four types of GA4 events. You can’t turn them off even if you wanted to. There are three automatically collected events:
- session_start event
- first_visit event
- user_engagement event
Let’s review all three and start with the session_start event.
GA4 Session Start Event
When a visitor comes to a website that has Google Analytics installed, Google Analytics automatically fires a session_start event and begins tracking the session. It seems pretty basic, but it’s actually a pretty powerful event based on a particular event parameter that gets created along with the event.
It looks like this.
There are two important things that happen in conjunction through this automatically collected event.
- a sesssion ID is generated
- a session number is generated
Both of these things are “event parameters”. Event parameters are data that add context to your events.
Session ID
GA4 session ID (ga_session_id) marks when a visitor arrives at the site and the session began. This ID is automatically associated with every event that takes place during the session through the Google Analytics tag.
Note: If you use Measurement Protocol or Data Import to send offline interactions to Google Analytics, this session identifier will not take place automatically. Here’s a guide about adding session ID to Measurement Protocol events.
Session Number
The GA4 session number (ga_session_number) counts how many session a user has had on your site. If it’s the first visit, then ga_session_number will be “1”. If it’s the second visit, ga_session_number will be “2”. You get it.
You can use this event parameter to build segments and audiences to better understand your audience. Link coming soon for a new guide on GA4 sessions.
Note: If and when the visitor deletes cookies on their browser, they will no longer be recognized as a returning user.
Creating a Custom Dimension With GA4 Session Number
You can ga_session_number to create a custom dimension to see more data in your GA4 standard reports.
Go to the Admin panel and then click “Custom definitions”. You’ll see that within the property settings in the middle of the screen. You can now create a new custom dimension from this event parameter.
Click the blue “Create custom dimension button”. You’ll see this.
Then, fill out your custom dimension. The “Dimension name” field is what will show up in your reports. The “Description” is only for your internal record keeping. Type the event parameter exactly as you see it below. It should be available in the drop down menu.
Then, click “Save”.
Let’s now take a look at the next automatically collected event: the first_visit event.
First Visit Event
Google Analytics uses the first_event to count how many new users you have on your website during a defined time period. If Google Analytics doesn’t recognize a user from the _ga cookie in their browser, that means it’s time for the first_visit event and a new user.
The first_visit event happens one time per cookie.
How Google Analytics Cookies Work With First Visit
Here’s how cookies and the first_visit event work together in GA4 for a visitor who comes to your website.
- A visitor comes to your website. Your website runs GA4.
- The _ga cookie variable helps GA4 work. Google Analytics uses _ga cookie variable to identify users.
- Google Analytics checks to see if there is a value for the _ga cookie variable in the browser of your visitor. This is a new visitor, so there is no value.
- Google Analytics creates a value and sends it to the browser of your visitor. This information goes to Google Analytics servers as an event parameter along with a page_view event.
- The variable value is also known as the CID (client ID). If this is created for the first time, a special parameter _fv=1 is sent along with the page_view event. I bet you can guess what “fv” stands for since we’re talking about the first_visit event. The first_visit event is created.
Let’s now talk about the last of the three automatically collected events in GA4: the user_engagement event.
User Engagement Event
The user_engagement event tracks how long visitors are actively engaged on your site or app.
A session becomes an engaged session when the user_engagement event fires.
What makes for an engaged session?
Google says there are three criteria. Only one needs to true:
- The session lasts longer than 10 seconds (although you can customize this during the GA4 setup process)
- The session has 1 or more conversion
- The session has 2 more page views
Note: Check step 3 in the previously linked article to see how to customize user engagement.
Wrapping Up
Do you feel more confident about automatically collected events in GA4? I hope so. Feel free to leave or comment or question or complaint if you don’t. Or, if you think we missed something useful, please let us know.
Looking for something else? Check out the Root and Branch YouTube channel at youtube.com/@rooted-digital. Or sign up for the monthly newsletter so you can get a free roundup of the best new posts and video tutorials, along with relevant industry news.
About Root & Branch
You can learn more about Root & Branch here. Or hit the button below to check out YouTube for more digital marketing tips and training resources.
We are missing sometimes the first_visit Event.
This then leads to (not set) values in new/returning metric. Does anyone have the same problem?
That’s frustrating. Are you seeing this in your GA4 standard reports? BigQuery data? Are you overriding any fields in GTM? I don’t know if I can help, but if it’s still persisting feel free to share some more details about where you’re seeing it.