How to Track Events in Google Analytics

Cody Schneider9 min read

Tracking page views only tells you half the story of what visitors are doing on your site. The real insights come from understanding the specific actions visitors take - like clicking a "Request a Demo" button, playing a product video, or downloading a case study. This guide walks you through several ways to track these meaningful interactions as events in Google Analytics 4, from simple no-code setups to more advanced and flexible methods.

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're used to Universal Analytics, you'll remember its rigid event structure: Category, Action, and Label. GA4 throws that out the window for a much more flexible, event-based model. In GA4, nearly every interaction is an event, from loading a page (page_view) to completing a purchase (purchase).

This new model gives you the freedom to define and track the exact interactions that matter to your business. Events in GA4 fall into four main categories, and understanding them is the first step to mastering tracking:

  • Automatically collected events: These are tracked by default when you install GA4. They include basic interactions like session_start (when a user begins a new session) and first_visit (when a user visits for the first time). You don't have to do anything to enable these.
  • Enhanced measurement events: These are also automatic, but you can turn them on or off. They track common website interactions like scrolls, outbound link clicks, video views, and file downloads. We'll look at how to check these settings next.
  • Recommended events: Google provides a list of suggested event names for common scenarios across different industries (like add_to_cart for e-commerce or login for any site with user accounts). Using these recommended names helps GA4 understand your data better and makes your reporting more consistent.
  • Custom events: This is a custom event you name and implement yourself. It's the most flexible option and is perfect for capturing actions unique to your website, like a form submission for a specific newsletter or clicks on a particular marketing call-to-action.
GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

First, Check Your Enhanced Measurement Settings

Before you dive into creating custom events, it's worth checking if GA4 is already tracking what you need through Enhanced Measurement. You might be surprised by what’s enabled by default.

Here’s how to check and configure your settings:

  1. Navigate to the Admin section of GA4 (the gear icon in the bottom-left).
  2. Under the Property column, click on Data Streams.
  3. Select the appropriate web data stream for your website.
  4. Under the Events section, you'll see a heading for Enhanced measurement. Make sure the toggle is on.
  5. Click the gear icon on the right to see which specific events are being tracked.

From here, you can enable or disable tracking for these common interactions:

  • Page views: Tracks each time a page loads or the browser history state changes.
  • Scrolls: Fires an event when a user scrolls 90% of the way down a page.
  • Outbound clicks: Captures when a user clicks a link that leads them away from your domain.
  • Site search: Tracks searches made using your website's internal search function.
  • Video engagement: Records when users start, complete, and watch embedded YouTube videos on your site.
  • Form interactions: Tracks a form submission for the first time in a session. Note: this one can be a bit unpredictable, so manual form tracking is often more reliable.
  • File downloads: Automatically logs an event when a user clicks a link to a common file type (e.g., PDF, DOCX, XLSX, MP3, etc.).

If the action you want to track is on this list, just make sure it's enabled and you're good to go! If not, it's time to create a custom event.

How to Create a Custom Event in the GA4 Interface (No Code!)

One of the handiest features in GA4 is the ability to create new events based on existing ones directly within the interface - no code changes required. This is perfect for tracking actions like visiting a specific "thank you" page after a form submission.

Let's walk through an example. Imagine you want to create an event called quote_form_submitted that fires every time someone lands on your confirmation page, yoursite.com/thank-you-quote.

  1. Go to AdminEvents (under Data display).
  2. Click the Create event button. On the next screen, click Create again.
  3. A configuration panel will appear. First, give your new event a name. Following GA4's naming convention, we'll use snake_case:
  4. Next, define the "Matching Conditions." This tells GA4 when to trigger your new event. Since a confirmation page view is our trigger, we'll create conditions based on GA4’s default page_view event.
  5. Your configuration should now tell GA4: "When an event named page_view occurs on a page where the URL contains /thank-you-quote, also create a new event called quote_form_submitted."
  6. Leave the "Copy parameters" box checked and click Create in the top right.

And that's it! Your event is now active. It may take up to 24 hours to appear in standard reports, but you can usually verify it’s working within minutes by checking the Realtime report in GA4 while you test it on your website.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

Using Google Tag Manager for More Advanced Event Tracking

The GA4 interface method is great for page-based goals, but what if you want to track something that doesn't have a unique URL, like a click on a specific "Buy Now" button? For that, Google Tag Manager (GTM) is your best friend. It offers much more power and flexibility.

If you haven't used it before, GTM works using three core components:

  • Tags: Snippets of code that send data to a third-party platform (like Google Analytics). A "GA4 Event Tag" is what we'll use.
  • Triggers: The conditions that tell your tags when to fire. For example, "fire when someone clicks this specific button."
  • Variables: Placeholders for values that can change, like a clicked link's URL (Click URL) or the text of a button (Click Text).

Example: Tracking Clicks on a "Request a Demo" Button

Let's say you have a primary "Request a Demo" button on your home page, and it's essential to track how many people click it. Here's how to set that up with GTM.

Step 1: Enable the Correct Built-In Variables

Before creating the trigger, you need to make sure GTM is listening for clicks and can identify attributes of those clicks.

  1. In GTM, go to Variables in the left sidebar.
  2. Under Built-In Variables, click Configure.
  3. Scroll down to the Clicks section and check the boxes for Click Text and Click ID. This allows you to create triggers based on the text of an element or its unique CSS ID.

Step 2: Create the Trigger

The trigger will tell your tag to fire only when your specific demo button is clicked.

  1. Go to Triggers and click New.
  2. Give the trigger a descriptive name, like "Click - Request Demo Button."
  3. Click on Trigger Configuration and choose All Elements under the Click section.
  4. Change the trigger to fire on Some Clicks.
  5. Now, set the condition. If your button has unique text, you can use: Click Text - equals - Request a Demo. (Tip: If you have multiple buttons with that text, a more precise way is to give your button a unique CSS ID in your HTML, like id="header-demo-button", and use the condition Click ID - equals - header-demo-button.)
  6. Click Save.

Step 3: Create the GA4 Event Tag

Finally, you need to create the tag that sends the event data to GA4 when the trigger fires.

  1. Go to Tags and click New.
  2. Name the tag something clear, such as "GA4 Event - Demo Button Click."
  3. Click Tag Configuration and select Google Analytics: GA4 Event.
  4. Select your main GA4 Configuration Tag.
  5. In the Event Name field, enter the name you want to see in your GA4 reports, like request_demo_click.
  6. Now, click on Triggering and select the "Click - Request Demo Button" trigger you created in the last step.
  7. Click Save your tag.

Remember to click the Submit button in GTM to publish your changes live. You can use GTM's "Preview" mode to test your new tag and trigger in real-time before you push it live.

GraphedGraphed

Still Building Reports Manually?

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

Watch Graphed demo video

Best Practices for Naming and Organizing Your Events

As you start tracking more interactions, your list of custom events can get messy fast. Following a few best practices will save you major headaches in the future.

  • Be Consistent: Stick to the recommended snake_case_with_lowercase format for all your event names. It makes your data clean and easy to read.
  • Be Specific and Clear: Name events based on the action being performed. contact_form_success is much clearer than form_1_submit. Anyone on your team should be able to look at the event name and understand what it means.
  • Use Recommended Names First: Before creating a new custom event, check Google's list of recommended event names. If there’s a standard one that fits (like sign_up or generate_lead), use it.
  • Map It Out: For complex tracking setups, create a simple spreadsheet to plan your events. List the event name, its trigger conditions, and any parameters you want to send along with it (like button_text or form_id). This helps you maintain a coherent strategy instead of creating events on the fly.

Final Thoughts

Tracking custom events is the key to unlocking a deeper understanding of user behavior beyond simple page views. By setting up events in either GA4's interface or Google Tag Manager, you can measure the specific interactions that truly define user engagement and drive your business forward.

At Graphed, we believe that turning those carefully tracked events and all your other platform data into clear insights should be simple. Logging into GA4 to check event counts is one thing, but understanding how those custom events — alongside your ad spend from Facebook and revenue data from Shopify — contribute to your growth is another challenge. We make it easy to connect all your data sources and create real-time dashboards using plain English. Simply ask to see "how many demo_request_click events turned into customers in Salesforce last month" and an answer is ready in seconds, giving you back time to focus on strategy instead of report-building. Give Graphed a try and see how easy it can be to get holistic answers from all your data.

Related Articles

How to Enable Data Analysis in Excel

Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!