Master GA4's event-based tracking architecture with detailed explanations, real-world examples, and best practices for every event type.
A GA4 event is a record of something specific that happens on your website or app. Every interaction—from clicking a button to completing a purchase—is an event. This event-based architecture is what makes GA4 fundamentally different from Universal Analytics.
Each event has two components: an event name (what happened) and parameters (additional context). Think of an event like a sentence: the event name is the verb, and parameters are the nouns and adjectives that describe it.
Understanding these three concepts prevents confusion:
A single user might have 5 sessions per day, with each session containing 20 events. Grasping this hierarchy prevents misinterpreting your analytics.
GA4 automatically tracks certain events without any setup required. These include:
| Event Name | Triggered When | Common Uses |
|---|---|---|
| page_view | A user views a page | Track website traffic and navigation |
| session_start | A new session begins | Measure new vs. returning visitors |
| user_engagement | User actively engages with content (auto-generated) | Measure session quality and time-on-site |
| scroll | User scrolls past 90% of page height (if enhanced measurement enabled) | Understand content engagement depth |
| click | User clicks outbound links (if enhanced measurement enabled) | Track clicks to external sites |
| file_download | User downloads a file (PDF, ZIP, etc.) | Track resource downloads |
These automatic events provide a foundation, but custom events give you the power to track what matters to your business.
Google optimizes GA4 reporting for a set of Recommended Events. Using these standardized event names ensures you get proper reports, forecasting, and insights.
If you run an online store, these are essential:
// Track when someone views a product
window.dataLayer.push({
event: 'view_item',
items: [{
item_id: 'SKU123',
item_name: 'Blue Sneakers',
price: 89.99,
currency: 'USD',
item_category: 'Footwear'
}]
});
// Track when someone adds to cart
window.dataLayer.push({
event: 'add_to_cart',
items: [{
item_id: 'SKU123',
item_name: 'Blue Sneakers',
quantity: 1,
price: 89.99,
currency: 'USD'
}]
});
// Track a completed purchase
window.dataLayer.push({
event: 'purchase',
transaction_id: 'ORDER-2024-001',
value: 149.98,
currency: 'USD',
items: [{
item_id: 'SKU123',
item_name: 'Blue Sneakers',
quantity: 1,
price: 89.99
}]
});
For SaaS, agencies, and service businesses:
// Contact form submission
window.dataLayer.push({
event: 'generate_lead',
value: 0,
currency: 'USD',
lead_type: 'contact_form',
form_name: 'contact-us',
form_destination: 'sales@example.com'
});
// Newsletter signup
window.dataLayer.push({
event: 'generate_lead',
value: 0,
currency: 'USD',
lead_type: 'newsletter_signup'
});
Track how users interact with your content:
// Video starts playing
window.dataLayer.push({
event: 'video_start',
video_title: 'Getting Started with GA4',
video_duration: 420
});
// Search performed on your site
window.dataLayer.push({
event: 'search',
search_term: 'GA4 setup'
});
Beyond recommended events, create custom events for actions unique to your business. The process is simple:
Decide what action you want to track and name it clearly (use snake_case, all lowercase):
Use the dataLayer to send the event:
// Track a demo request
document.getElementById('demo-button').addEventListener('click', function() {
window.dataLayer.push({
event: 'demo_request',
product: 'analytics_platform',
company_size: 'enterprise'
});
});
In Google Tag Manager:
Open GA4's real-time reports and confirm events appear with correct parameters.
Parameters add context to events. Without parameters, you know that something happened, but not what or why.
| Parameter | Purpose | Example Value |
|---|---|---|
| value | Monetary value of the action (e.g., revenue, lead value) | 49.99 |
| currency | Currency code (ISO 4217) | USD, EUR, GBP |
| transaction_id | Unique ID for a purchase or transaction | ORDER-2024-001 |
| user_id | Your system's user ID (requires consent) | user_12345 |
| items | Array of products/items in the action | [{item_id: 'SKU123', price: 29.99}] |
You can create custom parameters for your business needs:
// Track a feature usage with custom parameters
window.dataLayer.push({
event: 'feature_used',
feature_name: 'export_to_csv',
user_plan: 'premium',
processing_time_ms: 2345
});
Keep parameter names consistent across events—if you use "user_plan" on one event, don't switch to "subscription_tier" on another.
If you're migrating from UA, understand the key differences:
| Feature | Universal Analytics | GA4 |
|---|---|---|
| Architecture | Session-based (groups hits into sessions) | Event-based (every action is an event) |
| Event limit | Unlimited but limited reporting | 500 unique events + custom dimensions/metrics |
| Parameters | Limited to dimensions/metrics | Unlimited custom parameters per event |
| Cross-device tracking | User ID feature (limited) | User ID + Google-based cross-device matching |
| Reporting latency | 24 hours | Real-time + 24-hour standard |
Using "form_submit" on one page and "form_submission" on another breaks reporting. Create an event naming convention → and stick to it.
Creating custom events when recommended events exist means missing out on GA4's optimized reports (e.g., conversion funnels, revenue attribution). Use recommended events when they fit your tracking needs.
Never send personally identifiable information (email addresses, phone numbers, credit card info) as event parameters. This violates privacy regulations and GA4's policies.
Tracking every click on your website creates noise and makes analysis harder. Focus on events that answer business questions.
Always use GTM Preview mode and GA4's real-time reports to verify events fire correctly and include the right parameters before publishing to production.
GA4 supports 500 unique event names per property. This is enough for most businesses. If you're approaching this limit, you likely need to consolidate or restructure your tracking.
Once an event is live and collecting data, changing its name doesn't retroactively rename historical data. Create a new event with the correct name, then gradually migrate tracking to it while keeping the old event running temporarily for comparison.
No. GA4 is free and has no per-event charges. However, Google Ads Smart Bidding does require conversion events for optimization.
You can't directly track individual form field values (and shouldn't—that's PII). Instead, track form submission with metadata like "form_type: contact" or "form_step: 2_of_3".
No. Event definitions in GA4 are immutable. Create a new event if you need to change parameters or logic.
Use GA4's Measurement Protocol or Data Import feature to send server-side events (phone calls, in-store purchases, CRM interactions) to GA4.
Start with our step-by-step setup guide and learn to configure your GA4 property from scratch.
Read the Beginners Guide →Step-by-step setup guide for beginners implementing GA4 for the first time.
Read →Framework and template for documenting all GA4 events and parameters.
Read →Build a clean, maintainable dataLayer architecture for reliable event tracking.
Read →