Introduction
Google Analytics 4 is built entirely on an event-based data model. Unlike legacy Universal Analytics, which measured pageviews and sessions, every interaction in GA4—clicks, scrolls, video plays, and form submissions—is recorded as an event with contextual parameters. Mastering custom event architecture and exploration funnels is essential for measuring real customer journeys.
The GA4 Event Hierarchy
GA4 categorizes events into four distinct tiers:
- Automatically Collected Events:
session_start,first_visit,user_engagement. - Enhanced Measurement Events: Configured with a single toggle in GA4 Admin (page views, scroll tracking past 90%, outbound outbound link clicks, site search, file downloads).
- Recommended Events: Standardized names prescribed by Google for ecommerce and lead generation (e.g.,
generate_lead,sign_up,purchase). - Custom Events: Unique events you create when no recommended event fits your specific interaction workflow.
Step 1: Implementing a Custom Event in GTM
Suppose you want to track when users interact with an interactive pricing calculator on your website:
// Client-side JavaScript pushing to dataLayer
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: "calculator_calculation_completed",
tool_name: "Cloud_Pricing_Estimator",
estimated_monthly_spend: 1450.00,
selected_region: "us-central1"
});
In Google Tag Manager:
- Create a Trigger of type Custom Event named
calculator_calculation_completed. - Create Data Layer Variables for
tool_nameandestimated_monthly_spend. - Create a Tag of type Google Analytics: GA4 Event, select your GA4 Measurement ID, set Event Name to
tool_calculation, and map your custom parameters.
Step 2: Registering Custom Dimensions in GA4
An event parameter sent to GA4 cannot be used in standard reports until it is registered as a Custom Dimension:
- Open GA4 and navigate to Admin > Custom definitions > Custom dimensions.
- Click Create custom dimension.
- Enter Dimension name:
Tool Name. - Scope: Event.
- Event parameter:
tool_name. - Click Save. (Allow up to 24 hours for data to populate in standard reporting tables).
Step 3: Building a Closed Funnel Exploration
To identify where prospective customers abandon your onboarding flow:
- Navigate to the Explore tab in GA4 and choose Funnel exploration.
- In the Steps configuration, click the Edit pencil icon.
- Define Step 1:
page_viewwhere page location contains/tools. - Define Step 2:
tool_calculation. - Define Step 3:
lead_form_opened. - Define Step 4:
generate_lead. - Toggle Make funnel closed to ensure only users entering at Step 1 are measured through each successive drop-off stage.