How to Set Up Events in Google Analytics
Setting up event tracking in Google Analytics 4 is one of the most important steps to understanding what users are actually doing on your site. Unlike the old Universal Analytics, everything in GA4 is built around events - from page views to form submissions. This article will walk you through exactly how GA4 handles events and provide a step-by-step guide to setting up custom tracking for the actions that matter most to your business.
What Are Events in Google Analytics 4?
In GA4, an event represents any specific interaction a user has with your website or app. This is a fundamental shift from Universal Analytics, which was built around sessions and pageviews. Now, even a pageview is considered an event (specifically, a page_view event). This event-based model gives you a much more flexible and detailed view of the entire customer journey.
GA4 organizes events into four main categories:
- Automatically collected events: These are the base-level events that GA4 collects automatically when you install the tracking code, like when a session starts.
- Enhanced measurement events: These are common website interactions (like scrolls and outbound clicks) that you can enable with a single toggle in your settings.
- Recommended events: Google provides a list of suggested event names for common scenarios (like e-commerce or lead generation) to help standardize your reporting.
- Custom events: These are events you define and name yourself to track interactions unique to your business goals.
We'll cover how each of these works, starting with what you get right out of the box.
Default Tracking: Automatically Collected & Enhanced Measurement Events
The good news is that GA4 starts tracking several important interactions without any extra configuration. As soon as you add the GA4 tag to your site, you’ll begin collecting data on automatically collected and enhanced measurement events.
Automatically Collected Events
These are the foundational events GA4 captures by default. You can’t turn them off, and they form the basis of many standard metrics.
`first_visit`: This fires the very first time a user visits your website or launches your app. It's how GA4 calculates new users.`session_start`: When a user begins a new session on your site, this event is triggered. It helps GA4 count total sessions.`user_engagement`: This event fires periodically when your webpage is in the foreground or when the session lasts longer than 10 seconds, has a conversion event, or has at least two pageviews. It’s the basis for the “Engagement Rate” metric.
Enhanced Measurement Events
Enhanced measurement is a fantastic feature that allows you to track common user interactions with a simple flick of a switch. For most sites, these settings are enabled by default when you create a new GA4 property.
Here are the events included in enhanced measurement:
- Page views (
page_view): Fires each time a new page loads. - Scrolls (
scroll): Fires once per page when a user scrolls 90% of the way down the page. - Outbound clicks (
click): Tracks clicks that lead users away from your current domain(s). - Site search (
view_search_results): Captures an event whenever a user performs a search on your website (based on the presence of a URL query parameter). - Video engagement (
video_start,video_progress,video_complete): Tracks interactions with embedded YouTube videos on your site. - File downloads (
file_download): Automatically tracks clicks on links ending in common file extensions like .pdf, .docx, .xlsx, .zip, etc.
How to Check Your Enhanced Measurement Settings
It's always a good idea to confirm which enhanced measurement events are active. Here’s how:
- Navigate to the Admin section of your Google Analytics account (the gear icon in the bottom-left).
- In the Property column, click on Data Streams.
- Select the data stream for your website.
- In the Events section, you'll see a line for Enhanced measurement. Click the gear icon on the right to view and toggle the specific events you want to track.
For most businesses, keeping all of these enabled is the right choice. They provide a solid baseline of user behavior data with zero coding required.
How to Set Up Custom Events in the GA4 Interface (No Code Needed)
While the default events are great, the real power of GA4 comes from tracking the actions that are unique to your business goals, like form submissions, demo requests, or clicks on specific call-to-action buttons. Luckily, GA4 has a built-in tool that lets you create new events based on the ones it’s already collecting.
This is perfect for creating conversion-worthy events from page views (like visiting a "thank you" page) or from generic clicks (like clicking a "Get Started" button).
Example 1: Tracking a "Thank You" Page Form Submission
Let's say you have a contact form that redirects users to /thank-you.html after they submit it. This page view is a clear signal of a lead. Here’s how you can create a dedicated generate_lead event for it.
- Go to Admin > Events in the Property column.
- Click the Create event button. Then click Create again on the next screen.
- In the Custom event name field, enter a name for your new event. It's best practice to use a name from Google's list of recommended events when possible. For this, we'll use
generate_lead. - Now, you need to define the Matching Conditions. This tells GA4 which existing event should trigger your new one.
- Your configuration should now say: "When the
event_nameequalspage_viewAND thepage_locationcontains/thank-you, create a new event calledgenerate_lead." - Click Create in the top-right corner to save.
That's it! Now, every time someone views a URL containing "/thank-you," GA4 will log both the standard page_view event and your new, much more meaningful generate_lead event.
Example 2: Tracking Clicks on a Specific Button
What if you want to track clicks on a specific call-to-action that doesn't lead to a unique thank-you page? You can use the same method by triggering a new event based on parameters from the generic click event.
Let's say you want to track clicks on a button with the text "Download My Ebook."
- Repeat steps 1-3 from the previous example, but this time, name your new event something like
ebook_download. - For the Matching Conditions:
- Click Create.
Now you have custom tracking for that specific button click, all without touching a line of code or needing Google Tag Manager.
A Crucial Final Step: Registering Custom Dimensions
When you create custom events, they often come with useful pieces of information called parameters. For example, a file_download event has a parameter called file_name. However, you can't see the data for most of these parameters in your standard GA4 reports until you tell Google about them.
Registering a parameter as a "custom dimension" makes it available for reporting and analysis throughout the GA4 interface. Let’s say you want to be able to see which PDF files are being downloaded most often.
- Go back to Admin.
- In the Property column, click on Custom definitions.
- At the top of the table, make sure the Custom dimensions tab is selected and click the Create custom dimensions button.
- Configure your new dimension:
- Click Save.
After about 24-48 hours, "File Name" will appear as a selectable dimension in your Exploration reports, allowing you to build detailed reports on which specific files are being downloaded.
Final Thoughts
Google Analytics 4's event-based model makes tracking user behavior more powerful and intuitive than ever. By leveraging the automatically collected events and using the built-in interface to create custom events for key actions, you can build a comprehensive picture of how users interact with your site, giving you the data you need to make smarter marketing decisions.
Of course, setting up events in GA4 is just the first step. The real challenge often lies in connecting that data to performance metrics from your ad platforms, CRM, and sales tools to get a complete story. We built Graphed to solve this problem. After connecting your tools in just a few clicks, you can ask questions in plain English like, "Show me a dashboard of my top traffic sources from Google Analytics and which ones generated the most deals in HubSpot." We instantly build live, real-time dashboards so you can spend less time wrangling data and more time acting on insights.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?