How to Set Up Google Analytics 4 Event on My Website

Cody Schneider9 min read

Tracking what people do on your website is the whole point of using analytics. In Google Analytics 4, every one of those actions - from a simple page view to a purchase - is measured as an "event." This guide will walk you through exactly how to set up GA4 events, so you can stop guessing and start measuring the interactions that truly matter for your business.

First Things First: What's a GA4 Event?

If you used the older version, Universal Analytics (UA), you probably remember setting up specific goals based on things like "Category," "Action," and "Label." Google has simplified this in GA4. Now, everything is an event.

A user opening your homepage for the first time? That’s an event (first_visit). Someone scrolling down the page? That's an event (scroll). That form they just filled out? You guessed it - that's an event too.

This "event-based" model is incredibly powerful because it gives you a flexible way to measure any interaction a user has on your website or app. Instead of being boxed into a rigid structure, you get to define what's important.

The Different Types of GA4 Events

GA4 categorizes events into four main types. Understanding the difference will save you a ton of time and help you create a clean, organized analytics setup.

1. Automatically Collected Events

These are events that GA4 tracks by default as soon as you install the tracking code. You don't have to lift a finger. They provide the basic foundation of your website’s activity.

Some examples include:

  • session_start: Fires when a user begins a new session.
  • first_visit: Fires the first time a user visits your site.
  • page_view: Fires each time a new page loads.
  • scroll: Fires when a user scrolls 90% of the way down a page.

You can see the full list in Google's documentation, but the main takeaway is that GA4 handles the basics for you automatically.

2. Enhanced Measurement Events

Think of these as another flavor of automatic events, but you have the power to turn them on or off. When you set up a new GA4 property for a website, Enhanced Measurement is enabled by default because it tracks common interactions that most websites want to measure.

These events include:

  • Clicks: Tracks each time a user clicks a link that leads away from your current domain.
  • File downloads: Logs a file_download event when a user clicks a link for a common file type like a PDF, DOCX, or CSV.
  • Video engagement: Tracks when users start (video_start), watch for a certain duration (video_progress), and finish (video_complete) embedded YouTube videos.
  • Site search: Captures view_search_results when a user performs a search on your website (as long as GA understands your site’s search query parameter).

You can manage these settings by going to Admin > Data Streams > (Your Web Stream) > Enhanced Measurement.

3. Recommended Events

This is where things get more interesting. Google has a list of "recommended" events with pre-defined names and parameters for common business scenarios. For example, if you run an e-commerce store, Google recommends using add_to_cart, begin_checkout, and purchase.

Why use their recommended names? By sticking to their naming convention, you get to benefit from more detailed reports and future features that Google builds out for those specific events. It helps Google understand your data better.

Some examples of recommended events:

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

Before you create a custom event, always check the recommended events list to see if there's already a good fit.

4. Custom Events

If you need to track something that doesn't fall into the other three categories, you can create your own custom event. This is for interactions that are unique to your website or business goals.

For example, maybe you want to track when a user uses a specific feature on your site, like a savings calculator, or opens a customer support chat widget. You could create custom events named use_calculator or open_chat_widget.

You get to name these events yourself (but follow Google's naming rules, like using lowercase letters and underscores).

How to Set Up Your First GA4 Event

Now for the practical part. There are a few ways to set up events, but we’ll cover the two most common and effective methods.

Method 1: Creating Events Directly in the GA4 Interface (No Code Needed)

This is the simplest way to get started and is perfect for creating a new event based on an event you're already tracking. It's often used to isolate a specific page view and treat it as a more meaningful action, such as a lead.

Let’s say you want to track when someone completes your contact form and lands on the "thank-you" page. This page view is already creating a page_view event. We’re just going to tell GA4 to create a new, special event called generate_lead whenever that specific page view happens.

  1. Go to your GA4 property and navigate to Admin > Events.
  2. Click the Create event button. Then, click Create again.
  3. You're now on the custom event configuration screen. Let's fill it out:
  4. Click Create in the top-right corner.

That's it! Now, every time someone views a page that has "/thank-you" in the URL, GA4 will log both a page_view event and your brand new generate_lead event.

Method 2: Using Google Tag Manager (The Most Powerful Way)

For almost anything more complex than a "thank-you" page view, Google Tag Manager (GTM) is the go-to tool. It gives you incredible control without having to write code directly on your website. Once you get the hang of it, you’ll be able to track just about anything.

The process in GTM involves two core components: Tags and Triggers.

  • A Trigger listens for a certain action on your site (e.g., a button click, a form submission).
  • When that action happens, the trigger "fires" and tells a Tag to send the event data to GA4.

Let's walk through an example of tracking clicks on a "Request a Demo" button.

Step 1: Enable Click Variables (One-time setup)

First, make sure GTM can "see" information about the clicks happening on your website.

  1. In GTM, go to the Variables section.
  2. Under Built-In Variables, click Configure.
  3. Scroll down to the "Clicks" section and check the boxes next to all the click-related variables, like Click ID, Click Classes, and Click Text.

Step 2: Create a Trigger

Now, we'll tell GTM when to fire our event tag — specifically, when someone clicks the "Request a Demo" button.

  1. Go to Triggers and click New.
  2. Give your trigger a clear name, like Click - Request Demo Button.
  3. Click inside the Trigger Configuration box and choose All Elements under the "Click" section.
  4. Change the trigger to fire on Some Clicks.
  5. Now set the firing condition. This depends on how your button is coded. The most reliable way is if your button has a unique ID. Let's assume it does. Set the condition to: Click ID equals request-demo-button.
  6. If your button doesn't have an ID, you could use Click Text equals Request a Demo, but IDs are more robust.
  7. Click Save.

Step 3: Create the Tag

The trigger is ready. Now we 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 your tag something descriptive, like GA4 Event - Generate Lead.
  3. Click the Tag Configuration box and select Google Analytics: GA4 Event.
  4. Choose your main GA4 Configuration Tag from the dropdown.
  5. In the Event Name field, enter generate_lead.
  6. (Optional) You can send additional information with "Event Parameters." For example, add a parameter named button_text and set its value to {{Click Text}} to record the exact text of the button.
  7. In the Triggering section, select the Click - Request Demo Button trigger you just created.
  8. Click Save.

Step 4: Preview and Debug

This is the most important step! Never publish your changes without testing them.

  1. Click the Preview button in the top-right corner of GTM.
  2. Enter your website URL and click Connect. Your website will open in a new tab with the GTM debug panel at the bottom.
  3. Go to your website and click the "Request a Demo" button.
  4. In the debug panel (or the Tag Assistant tab), you should see your GA4 Event - Generate Lead tag move from "Tags Not Fired" to "Tags Fired." Success!
  5. For an extra layer of confirmation, go to your GA4 property and open Admin > DebugView. You should see your generate_lead event appear there in real-time.

Step 5: Publish Your Container

Once you've confirmed everything is working, go back to GTM, click Submit, give your version a name (e.g., "Added Demo Request Tracking"), and click Publish.

How to See Your Events and Mark Them as Conversions

After you’ve set up your events, you’ll want to check them in your GA4 reports. Go to Reports > Engagement > Events. Keep in mind that it can take 24-48 hours for new event data to fully process and appear in standard reports (which is why the DebugView is so useful for immediate testing).

Finally, what if one of these events is really important, like our generate_lead event? You can mark it as a conversion. This lets you use it for attribution reporting and import it into Google Ads for campaign optimization.

Simply go to Admin > Conversions. GA4 automatically lists the events it's received. Find your generate_lead event in the list and just flip the toggle switch to mark it as a conversion. It's that easy.

Final Thoughts

Setting up events is the single most valuable thing you can do to customize Google Analytics 4 for your business. By moving beyond basic page views and tracking the specific clicks, submissions, and interactions that lead to conversions, you unlock a real understanding of what works and what doesn't.

Once you have all of that rich event data flowing into Google Analytics, the challenge often becomes making sense of it all. It can be a full-time job to build reports and dig through the GA4 interface to find meaningful insights. We built Graphed to solve exactly this problem. You connect your Google Analytics account in a few clicks, and then you can create dashboards instantly using simple, conversational language - like "Show me a chart of all our conversion events from last month, broken down by traffic source." The analysis is done for you in seconds, not hours.

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.