How to Set Up Event Tracking in Google Analytics

Cody Schneider8 min read

Tracking website visitors is a good start, but it doesn't tell you the full story. To truly understand performance, you need to know what users are doing on your site - clicking buttons, filling out forms, or watching videos. This is where event tracking in Google Analytics 4 comes in, moving you beyond simple pageviews to measure the interactions that actually matter to your business. This guide will walk you through what GA4 events are and how to set them up, even if you’ve never touched a line of code.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

What Are Events in Google Analytics 4?

If you used the older Universal Analytics, you were used to a world built around "sessions" and "pageviews." Google Analytics 4 changes everything with a new, more flexible "event-based" model. In fact, everything you measure in GA4 is considered an event.

Think of it like this: a pageview is like knowing a customer walked into your store. An event is like knowing they picked up a product, tried it on, asked an employee a question, and went to the checkout counter. Both are useful, but one gives you a far richer picture of user behavior. A "pageview" is now just one type of event, called page_view. A session beginning is an event called session_start. This model allows you to track a much wider range of specific user interactions on an equal footing.

The Four Types of GA4 Events

GA4 categorizes events into four distinct types. Understanding the difference is the first step to properly measuring your website’s activity.

1. Automatically Collected Events

Just as the name suggests, these events are collected automatically when you install the GA4 base tracking code on your site. There is no extra setup required, they work out of the box and provide foundational data about user engagement.

Some of the most common automatically collected events include:

  • page_view: Fires each time a page loads.
  • session_start: Fires when a user begins a new session.
  • first_visit: Fires the first time a user visits your website.
  • scroll: Fires once per page when a user scrolls 90% of the way down.
  • user_engagement: Fires when a session lasts longer than 10 seconds, has a conversion event, or has at least 2 pageviews.
GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

2. Enhanced Measurement Events

Enhanced Measurement events take automation a step further. These are also collected automatically (just like the events above) but can be toggled on or off within your GA4 settings. They are designed to track common web interactions without any code modifications.

By default, Enhanced Measurement usually tracks:

  • Outbound clicks (event name: click): When a user clicks a link that takes them away from your domain.
  • Site search (event name: view_search_results): When a user performs a search on your website (if you have a search bar).
  • Form interactions (event names: form_start, form_submit): When a user starts and successfully submits a form.
  • Video engagement (event names: video_start, video_progress, video_complete): Tracks interactions with embedded YouTube videos on your site.
  • File downloads (event name: file_download): Fires when a user clicks a link to a common file type like a PDF, docx, or MP4.

How to Check Your Enhanced Measurement Settings

It's always a good idea to confirm which of these are active for your site. You can find them by navigating to Admin > Data Streams. Click on your web data stream, and you'll see a section for Enhanced measurement where you can toggle individual events on or off using the gear icon.

3. Recommended Events

Recommended events are pre-defined event templates created by Google for specific business verticals. While they are not tracked automatically, Google provides a standardized name and a set of recommended parameters to use when setting them up. Using these recommended structures helps GA4 better understand your data and makes your reporting more consistent and ready for future features in Google’s ecosystem.

Examples of recommended events include:

  • For E-commerce: add_to_cart, begin_checkout, purchase, view_item.
  • For Lead Generation: generate_lead, sign_up, login.
  • For All Properties: share, join_group.

You can find the full list of recommended events in Google's official documentation. It’s always best practice to check if a recommended event exists for the action you want to track before creating a custom one from scratch.

4. Custom Events

This is where you have the most power and flexibility. A custom event is any interaction you want to track that doesn't fit into the automatic, enhanced, or recommended categories. If it’s specific to your business and goals, it’s probably a custom event.

Examples of custom events could be:

  • A click on a non-outbound "Request a Demo" button.
  • A user interacting with a pricing slider.
  • Someone viewing a specific pop-up promotion.
  • Reaching a certain step in a multi-page form.

Don't worry, creating these doesn't require "getting technical" anymore. You can set them up directly from the GA4 interface.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

How to Set Up Custom Events in GA4 (Without Writing Code)

The best way to track the unique actions that define success for your business is with custom events. Thankfully, GA4 includes a point-and-click interface to create them based on other events that are already being collected.

Let's walk through a common example: tracking clicks on a specific call-to-action button that leads users to download a PDF report.

Step 1: Identify the Action and Existing Data

First, figure out what unique information GA4 already has about the action. Since Enhanced Measurement's file_download event is quite broad, let's assume we want to create a more specific event for a PDF download. We know from Enhanced Measurement that when a user clicks an outbound link, an event named click is fired, and it has a parameter called outbound that is set to true. We can use this as our base.

For a different button click, you could use the click_text or link_url parameters that GA4 automatically captures to define your new event.

Step 2: Navigate to 'Create event' in GA4

Head over to your Google Analytics 4 property.

  1. Click on Admin (the gear icon in the bottom-left).
  2. In the Property column, click on Events.
  3. On the Events page, click the Create event button.

Step 3: Define Your Event's Matching Conditions

This is where you tell GA4 what to look for. You're essentially creating an "IF" statement: "IF this set of conditions is met, THEN create my new event."

For our "PDF Download" example, we want to specify two conditions:

  1. The existing event is an outbound click.
  2. The URL of that click points to a PDF.

Here’s how you'd configure that in the "Matching Conditions" section:

  • Parameter: event_name | Operator: equals | Value: click
  • Parameter: link_url | Operator: contains | Value: .pdf

This configuration tells GA4: "Look for any event named 'click', and if the 'link_url' associated with that click contains '.pdf', I want you to log a new event."

Step 4: Name Your New Custom Event

In the "Custom event name" field at the top, give your new event a clear, descriptive name. For our example, pdf_download would be a perfect name. Remember these simple rules for naming:

  • Use snake_case (all lowercase words separated by underscores).
  • Do not use spaces or special characters.
  • Make it intuitive. In six months, you should still know what it means without looking it up.

Step 5: Test and Verify with DebugView

Before leaving, you must verify your new event is firing correctly. The best tool for this is the DebugView section in GA4.

  1. Navigate to Admin > DebugView.
  2. Open your website in a new browser tab.
  3. Perform the action you set up to track (in our case, click a link to a PDF).
  4. Watch the timeline in DebugView. You should see your new custom event (e.g., pdf_download) appear in blue almost immediately.

If it appears, congratulations! Your new event is working. If not, revisit your matching conditions to make sure they are precise enough to capture the action.

GraphedGraphed

Still Building Reports Manually?

Watch how growth teams are getting answers in seconds — not days.

Watch Graphed demo video

Going Deeper: Why Event Parameters Matter

Tracking that a pdf_download happened is great. But what if you have multiple PDFs on your site? Knowing which PDF was downloaded is much more valuable.

This is where event parameters come in. Parameters are the extra bits of context you attach to an event. An event is the action ("downloaded a file"), and the parameters are the details ("the file name was '2024_marketing_report.pdf'").

In the "Create event" settings from Step 3, you'll see a section called Parameter configuration. You can use this to carry over existing parameters from the source event (like link_url or link_text) or define new ones. By passing this context, you can analyze performance at a much more granular level.

To use these custom parameters in your reports (like in Explorations), you have to register them as custom dimensions. You do this in Admin > Custom definitions. This tells GA4 to make that parameter available for reporting across the platform.

Final Thoughts

Transitioning to GA4's event-based model is a powerful step toward understanding how users engage with your digital experience. By learning to differentiate between the four event types and creating your own custom events in the GA4 interface, you can move beyond surface-level metrics and start measuring the interactions that truly drive your business forward.

Once you have all that rich event data in GA4, the next challenge is connecting it with performance data from other platforms like your CRM, ad networks, and e-commerce store. This is often where things get stuck in spreadsheet chaos. We solved this problem by creating Graphed, which acts as your AI data analyst. You simply connect all your sources in a few clicks, and then ask questions in plain English — like "create a dashboard showing which campaigns are driving the most pdf_download events" — and instantly get the visualizations you need, all with real-time data.

Related Articles