How to Add Google Analytics Event Tracking
Knowing someone visited your website is one thing, knowing what they actually did there is another. If you're only tracking pageviews in Google Analytics, you're missing the most important part of the story - the clicks, downloads, form submissions, and video plays that signal real user engagement. This guide will walk you through setting up Google Analytics event tracking so you can capture those critical interactions and get a complete picture of your users' journey.
What Exactly is Event Tracking?
Back in the day with older versions of Google Analytics, the primary unit of measurement was the "pageview." Clicks and downloads were considered special additions. Google Analytics 4 flips this on its head: everything is an event. A pageview is an event, a session starting is an event, and a user scrolling down the page is an event.
Event tracking is simply the process of measuring specific user interactions on your website or app that don't involve loading a new page. It allows you to answer questions like:
- How many people clicked "Request a Demo"?
- Which of our downloadable PDFs gets the most engagement?
- What percentage of users watch our embedded product videos?
- Are users actually clicking the "Buy Now" button on our product pages?
Without events, you're just measuring traffic. With events, you're measuring behavior. This data transforms your reporting from a passive look at what's happening into an active tool for understanding user intent and optimizing your website's performance.
Understanding the Four Types of GA4 Events
GA4 organizes events into four main categories. Understanding these will help you figure out what you need to track manually and what Google might already be handling for you.
- Automatically Collected Events: These are the basics that GA4 captures right out of the box when you install the tracking code. Think
page_view,session_start, andfirst_visit. You don't have to do anything to set these up. - Enhanced Measurement Events: These are a step up and are enabled by default for web data streams. You can toggle them on or off in your GA4 settings (Admin > Data Streams > Click your stream > Enhanced measurement). This includes valuable events like
scroll(when a user scrolls 90% of the way down a page),click(for outbound links), andfile_download. - Recommended Events: Google provides a long list of pre-named events for common business scenarios across different industries (like e-commerce or gaming). For example,
add_to_cartandpurchaseare recommended for online stores. Using these standard names helps Google understand your data better and ensures your reports are compatible with future features. - Custom Events: This is where the real power lies. A custom event is any interaction you define and name yourself. If there's an action on your site that isn't covered by the first three categories, you'll create a custom event to track it. This is what the rest of this guide will focus on.
Method 1: Create Custom Events Directly in the GA4 Interface
The simplest way to create a trackable custom event is by using actions GA4 already sees, like a click event, and being more specific. This method is great for non-technical users because it doesn't require touching any code or even using Google Tag Manager.
Let's say you have a "Contact Sales" button on your pricing page that leads to a contact form. You want to track every click of this specific button. Since GA4's enhanced measurement is already tracking all outbound clicks, you can just tell GA4 to create a new, specific event every time that button is clicked.
Here’s how you do it:
Step-by-Step Guide for GA4's "Create Event" Feature
- Navigate to your GA4 account and click on Admin (the gear icon in the bottom left).
- In the Property column, click on Events.
- Click the blue Create event button. Then, click Create on the next screen.
- A configuration panel will appear. This is where you define your new custom event.
- Custom event name: Give your new event a descriptive, unique name. Follow the
snake_caseconvention (lowercase with underscores). For our example, let's usecontact_sales_click. - Matching Conditions: Now, you need to tell GA4 when to fire this new event. Your goal is to use existing data to isolate the specific click you care about.
- Once your conditions are set, click Create in the top right.
That's it! Going forward, whenever a user clicks a link with those exact characteristics, GA4 will not only log the generic click event but also your new, far more valuable contact_sales_click event.
Method 2: Set Up Event Tracking with Google Tag Manager (Most Flexible)
For more control, flexibility, and scalability, Google Tag Manager (GTM) is the professional's choice. GTM acts as a middleman between your website and analytics tools. Instead of adding code to your website for every new event, you manage it all within GTM's interface. While it has a slightly steeper learning curve, it's worth the effort.
Let's walk through tracking a common scenario: a user successfully submitting a "Sign Up for Newsletter" form.
Required Foundation: Tags, Triggers, and Variables
GTM works with three core components:
- Tags: The piece of code that does something. In our case, it’s the GA4 Event tag that sends data to Google Analytics.
- Triggers: The rule that tells a tag when to fire. For example, fire when a specific form is submitted or a button is clicked.
- Variables: Placeholders for information that can be used in your tags and triggers, like the text of a clicked button (
{{Click Text}}) or the ID of a submitted form ({{Form ID}}).
Step 1: Enable Built-in Variables
Before you build your trigger, you need to make sure GTM is listening for the right information. By default, not all variables are active.
- In your GTM container, go to Variables in the left-hand navigation.
- Under Built-In Variables, click Configure.
- Scroll down to the Forms section and check the boxes for
Form ID,Form Classes,Form Text, andForm URL. You might also enable Clicks and Pages variables while you're there for future use.
This gives you more options to use when defining your triggers. For example, you can now build a trigger based on a unique ID you give your newsletter form in your website HTML (<form id="newsletter-signup-form">).
Step 2: Create a Form Submission Trigger
Next, we'll create the trigger that listens for our specific newsletter form being submitted.
- In GTM, go to Triggers and click New.
- Give your trigger a clear name, like "Newsletter Form Submission."
- Click on Trigger Configuration and choose the trigger type Form Submission.
- For this example, we'll check the Wait for Tags and Check Validation boxes. This ensures the trigger waits for other GTM tags to finish and only fires if the form submission is valid (e.g., not blocked by a "please enter a valid email" error).
- Under "This trigger fires on," select Some Forms.
- Now, define the condition. In the dropdown, select the Form ID variable we just enabled. Set the condition to
equalsand enter the actual ID of your newsletter signup form (e.g.,newsletter-signup-form). You'll need to check your site's HTML to find this ID. - Click Save.
Step 3: Create the GA4 Event Tag
With our trigger ready, we can now create the tag that sends the event data to Google Analytics.
- Go to Tags and click New.
- Name your tag something descriptive, like "GA4 Event - Newsletter Signup."
- Click on Tag Configuration and choose Google Analytics: GA4 Event.
- In the Configuration Tag dropdown, select your main GA4 configuration tag. (This is the tag you set up initially to connect GTM to your GA4 Measurement ID).
- For the Event Name, enter what you want to call the event in your GA4 reports. Sticking to conventions, we'll use
generate_leador a custom name likenewsletter_signup. - (Optional but recommended) Event Parameters: Here you can add extra context. Click Add Row. For Parameter Name, you could enter
form_location, and for its Value, you can use a variable like{{Page URL}}to record which page the user signed up from. - Under Triggering, select the "Newsletter Form Submission" trigger you just created.
- Click Save.
Step 4: Preview and Test Your Changes
Before publishing your changes live, it's essential to test them.
- In the top right of the GTM interface, click Preview.
- Enter your website URL and click Connect. A new tab of your website will open with a debugger connected.
- On your website, go to the page with your newsletter signup form. Fill it out and submit it successfully.
- Switch back to the GTM debugger window. On the left side, you should see a "Form Submit" event appear. Click on it.
- In the main panel, you should see your tag - "GA4 Event - Newsletter Signup" - under the "Tags Fired" section. This confirms your setup is working!
- For final confirmation, open your Google Analytics account, go to Admin > DebugView, and you should see the
newsletter_signupevent arrive in real-time.
Once you are happy, go back to GTM and hit the Submit button to publish your changes live.
Finding Your Custom Event Data in GA4
After you’ve set up your events, you’ll notice they don't just appear in all your standard reports. You usually need to look in one of two places or build a custom report.
The Real-Time & Events Report
The fastest way to see if your events are being collected is the Real-time report. New events should appear here within seconds. For a historical view, you can go to Reports > Engagement > Events. This report lists all events GA4 has collected and provides a simple count for each.
Using the Explore Tab for Deeper Insights
The true power comes from building custom reports in the Explore section. Here, you can combine your custom events with other dimensions, like Traffic source or Device type, to analyze behavior more deeply.
One last crucial step: if you added any custom event parameters (like form_location in our example), you must register them as a custom dimension in GA4 before you can use them in your Explore reports. You can do this under Admin > Custom Definitions > Create custom dimensions. Be sure the Dimension name you create matches your event parameter name exactly.
Final Thoughts
Moving beyond pageviews to true user behavior with event tracking is the single most impactful change you can make to your analytics strategy. With the tools in GA4's interface and the power of Google Tag Manager, you can capture the website interactions that are essential for making smart, data-driven decisions that grow your business.
Setting up tracking is the first step. The next is turning all that new data into easy-to-understand insights. Instead of spending hours in separate platforms or building complex reports to connect the dots, we created Graphed to simplify the entire reporting process. You can connect sources like Google Analytics and your CRM in seconds and then use simple, natural language to ask questions like, "show me a dashboard of newsletter signups by campaign from the last 30 days." We instantly build the dashboard for you, with live data, so you can stop manually pulling reports and focus on taking action.
Related Articles
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.
How to Create a Photo Album in Meta Business Suite
How to create a photo album in Meta Business Suite — step-by-step guide to organizing Facebook and Instagram photos into albums for your business page.