Home/Blog/Event Tracking
Event Tracking11 min read

GA4 Event Tracking Guide: Complete Setup for 2026

Everything you need to set up GA4 event tracking correctly in 2026. Covers recommended events, custom events, parameters, GTM dataLayer, and validation.

GA4, event tracking, GTM, custom events, dataLayer

Event tracking is the backbone of every GA4 implementation. Get it right and you have a reliable data foundation for every conversion, funnel, and attribution decision you'll ever make. Get it wrong and you're optimising campaigns against numbers that don't reflect reality.

This guide covers everything you need to set up GA4 event tracking correctly in 2026 — from the events GA4 collects automatically, to custom events you need to build, to validating that every event actually fires when it should.

How GA4's Event Model Works

GA4 is entirely event-based. Every interaction — a page view, a scroll, a button click, a purchase — is an event. This is a fundamental architectural change from Universal Analytics, which had sessions, pageviews, and events as separate hit types.

In GA4, everything is an event with a name and optional parameters. A page_view event has a page_title parameter and a page_location parameter. A purchase event has transaction_id, value, currency, and item-level parameters.

This model is more flexible than UA, but it also means there's more to configure and more ways to get it wrong.

The Four Event Types in GA4

GA4 organises events into four tiers:

1. Automatically collected events — fired by the GA4 tag without any additional configuration: - page_view — on every page load - first_visit — first time a user visits - session_start — start of each new session - user_engagement — when the page is in focus for 1+ second - scroll — when user scrolls 90% of a page (enhanced measurement) - click — outbound link clicks (enhanced measurement) - video_start, video_progress, video_complete — for embedded YouTube videos (enhanced measurement) - file_download — downloads (enhanced measurement)

2. Enhanced measurement events — enabled via a toggle in GA4 Admin → Data Streams → Enhanced Measurement. These are automatic but configurable.

3. Recommended events — event names and parameter schemas that Google has pre-defined for specific business types. Using these enables GA4 features like the ecommerce reports and predictive audiences.

4. Custom events — events you define for your specific business needs. These don't appear in standard reports automatically; you need to register the event name and any custom parameters you want to use as dimensions.

Recommended Events You Should Be Using

GA4's recommended events exist because Google built specific features around them. If you use the right names and parameter schemas, you get funnel reports, audience triggers, and predictive metrics for free.

For Lead Gen and SaaS

// Form submission
gtag('event', 'generate_lead', {
  currency: 'USD',
  value: 50.00          // estimated lead value
javascript

// User registration gtag('event', 'sign_up', { method: 'email' // or 'google', 'github', etc. });

// Login gtag('event', 'login', { method: 'email' });

// Trial start or upgrade gtag('event', 'begin_checkout', { currency: 'USD', value: 20.00, items: [{ item_id: 'full_access', item_name: 'Full Access Plan' }] }); `

For Ecommerce

// Product view
gtag('event', 'view_item', {
  currency: 'USD',
  value: 29.99,
  items: [{
    item_id: 'SKU_12345',
    item_name: 'Running Shoes',
    item_category: 'Footwear',
    price: 29.99,
    quantity: 1
  }]
javascript

// Add to cart gtag('event', 'add_to_cart', { currency: 'USD', value: 29.99, items: [{ item_id: 'SKU_12345', item_name: 'Running Shoes', price: 29.99, quantity: 1 }] });

// Purchase gtag('event', 'purchase', { transaction_id: 'T_12345', value: 29.99, tax: 2.40, shipping: 5.00, currency: 'USD', items: [{ item_id: 'SKU_12345', item_name: 'Running Shoes', price: 29.99, quantity: 1 }] }); `

Custom Events and Parameters

When recommended events don't cover your use case, build custom events. The naming convention matters: use snake_case, keep names under 40 characters, and make them descriptive enough to understand at a glance six months later.

Good custom event names:

- `report_generated`

- `filter_applied`

- `trial_feature_used`

- `support_chat_opened`

- `pricing_page_viewed`

Bad custom event names:

- `click` (too vague)

- `buttonClick` (camelCase — inconsistent with GA4 conventions)

- `user_did_a_thing` (meaningless)

- `report-generated` (hyphens not allowed)

Custom Parameters

Parameters add context to events. GA4 automatically collects some parameters for every event (like page_location and session_id), but you can send up to 25 custom parameters per event.

Important: Custom parameters don't appear in GA4 reports unless you register them as custom dimensions or metrics in GA4 Admin → Custom definitions.

gtag('event', 'report_generated', {
  report_type: 'ga4_audit',       // register as custom dimension
  property_id: 'UA-123456',       // register as custom dimension
  questions_answered: 5,          // register as custom metric
  plan_type: 'full_access'        // register as custom dimension
});
javascript

Setting Up Events via GTM dataLayer

GTM is the recommended way to implement custom events at scale. The dataLayer is a JavaScript array that sits on your page and allows your code and GTM to communicate.

Step 1: Initialize the dataLayer

Add this snippet before the GTM container snippet in your :

<script>
  window.dataLayer = window.dataLayer || [];
</script>
<!-- GTM snippet comes after -->
html

Step 2: Push events from your application code

When a user completes an action in your app, push to the dataLayer:

// On form submission
document.getElementById('contactForm').addEventListener('submit', function(e) {
  window.dataLayer.push({
    event: 'generate_lead',
    form_id: 'contact_form',
    form_name: 'Contact Us',
    lead_type: 'contact',
    currency: 'USD',
    value: 50.00
  });
});
javascript

Step 3: Create the GTM Tag

In GTM: 1. Create a new Tag → GA4 Event 2. Set the Measurement ID to your G- ID (use a Variable) 3. Set Event Name to generate_lead 4. Map event parameters: form_id, currency, value 5. Set the Trigger to a Custom Event trigger matching the event value you pushed (generate_lead)

Step 4: Use GTM Preview Mode

Before publishing, use GTM Preview Mode (the debug button in GTM) to verify: - The Custom Event trigger fires at the right moment - The GA4 Event tag fires correctly - All parameters are populated with the right values

Validating Events in GA4 DebugView

GA4 DebugView gives you a real-time stream of events from a specific device. To activate it:

  1. Install the GA4 DebugView Chrome extension, or
  2. Add `?debug_mode=1` to your URL, or
  3. In GTM Preview Mode, events automatically send in debug mode

In GA4, go to Admin → DebugView. You'll see events appear in real time with all their parameters. This is where you catch:

  • Events firing multiple times (duplicate tracking)
  • Parameters missing or sending as `(not set)`
  • Events firing in the wrong order
  • Wrong event names (a typo in production will show as a separate event)

Common Event Tracking Mistakes

1. Not registering custom parameters as dimensions Your custom parameters exist in the raw event data, but they're invisible in reports until you go to Admin → Custom definitions → Custom dimensions and register each parameter name. You have a 60-day backfill window — after that, historical data without registered dimensions is gone.

2. Sending PII in event parameters Never send email addresses, full names, phone numbers, or any personally identifiable information as event parameters. This violates GA4's terms of service and GDPR. Use anonymised identifiers instead.

3. Duplicate events from multiple tags If you have both a gtag.js snippet and a GTM container loading GA4, you'll get double-counted events. Audit your tag setup and pick one implementation method.

4. Firing events before consent In markets where consent mode applies (EU, UK, most of the world), your events should respect the user's consent status. Events fired before consent is granted without Consent Mode V2 configured create compliance risk.

5. Inconsistent naming across teams If your dev team pushes form_submit but your GTM setup listens for form_submission, the event is silently missed. Establish a tracking plan document that everyone uses as the source of truth.

Using the Event Inspector Tool

Manually auditing every event across a large site is time-consuming and error-prone. The Event Inspector tool at GA4Audit.ai connects directly to your GA4 property via the Admin API and Data API, then surfaces:

  • All events collected in the last 30 days
  • Which events have complete parameter coverage vs. missing data
  • Events that look like duplicates (same name, high cardinality)
  • Custom parameters that haven't been registered as dimensions
  • Recommended events you're missing based on your site type

Run an event inspection as part of any GA4 audit — it catches the silent failures that manual testing misses.

Building a Tracking Plan

The most important thing you can do before implementing events is write a tracking plan. This is a spreadsheet (or Notion doc, or whatever works for your team) that lists:

  • Event name
  • When it fires (trigger condition)
  • Parameters sent
  • Who owns the implementation
  • Validation status

Without a tracking plan, you end up with events like cta_click, button_click, click_cta, and cta_clicked all in your property — because four different people implemented tracking independently.

A good tracking plan becomes your single source of truth for what GA4 should be collecting. Audit against it quarterly.

---

Connect your GA4 and run a health check in 60 seconds at GA4Audit.ai.

Check your GA4 implementation

Run a free AI-powered audit to see how your tracking stacks up.

Start Free Audit