Sub topic 2
Events and parameters: the raw material of funnel steps
Assume you know the basic GA4 interface and understand that GA4 records behavior as events. You also need Analyst access to a GA4 property with ecommerce or other journey data. A funnel step is built from the events and parameters that your property has collected.
How GA4 represents an action
An event is a record of something a user or system did. Examples include page_view, sign_up, view_item, and purchase. Each event has an event name and can include additional fields called parameters.
A parameter describes the event in more detail. For example, a view_item event might include the product ID, product name, price, and currency.
gtag('event', 'view_item', {
currency: 'USD',
value: 29.99,
items: [{
item_id: 'SKU_123',
item_name: 'Canvas Tote',
price: 29.99
}]
});In a funnel exploration, you can use the event name as a broad condition, such as “users who generated view_item.” You can also add parameter conditions, such as “users who generated view_item where item_id equals SKU_123.”
| Data element | Meaning | Funnel example |
|---|---|---|
| Event name | The action that occurred | `add_to_cart` |
| Event parameter | A detail attached to the action | `currency = USD` |
| Parameter value | The specific value recorded | `item_id = SKU_123` |
| User property | A longer-term user attribute | `customer_type = member` |
Standard, recommended, and custom events
GA4 automatically collects some events, including page_view. Enhanced measurement can collect events such as scrolls and outbound clicks. Google also defines recommended events for common actions. Ecommerce events such as view_item, add_to_cart, begin_checkout, and purchase are recommended examples.
A custom event is an event name and parameter design that you create for your own product. For example, a learning site might send lesson_started with a lesson_id parameter.
Use consistent names and parameter meanings. The event checkout_started and the recommended event begin_checkout should not represent the same action in different parts of the site. Inconsistent naming splits the data and makes funnel results incomplete.
Designing data for funnel steps
Start with the business action, then choose the event that represents it. Keep the event name stable and use parameters for changing details.
For a purchase journey, the raw sequence might be:
The purchase event should include a unique transaction_id. Without a stable transaction identifier, duplicate sends can inflate purchase counts. Likewise, send currency and value consistently if you will analyze revenue.
Before building a funnel, check that:
- Each required event appears in DebugView or the relevant reports.
- Event names use the intended spelling and capitalization.
- Parameters are populated for the users and events you want to analyze.
- Values use consistent formats, such as numeric prices rather than text.
- The implementation sends the event only when the action actually occurs.
Exercise
You want a funnel step for users who add the blue version of product SKU_123 to a cart. Which data must the implementation send?
Show answer
It must send an addtocart event with reliable parameters such as itemid = SKU123 and a color value that identifies blue. The funnel can then filter the event and its parameters.