Sub topic 5
Defining Steps and Conditions
A funnel step is a rule that identifies users who performed a particular action. In GA4, that rule usually matches an event name, a parameter value, or another dimension. This chapter assumes you understand GA4 events and parameters and can open the Explore workspace with Analyst access.
A funnel is useful only when its steps represent the same journey. For example, an online store might measure:
- A user views a product.
- The user adds the product to a cart.
- The user completes a purchase.
Each step should describe an observable event. Avoid defining a step as a vague intention such as “interested shopper.”
Start with event-based steps
In Explore, open the Funnel exploration template and edit the Steps section. Give each step a clear name, then add a condition.
A basic funnel can use these event-name conditions:
| Step name | Condition |
|---|---|
| View item | Event name exactly matches `view_item` |
| Add to cart | Event name exactly matches `add_to_cart` |
| Purchase | Event name exactly matches `purchase` |
GA4 evaluates each condition against the events recorded for users in the selected date range. The event must already exist in the property. Creating a step does not create or repair missing tracking.
gtag('event', 'view_item', {
currency: 'USD',
value: 29.99,
items: [{ item_id: 'SKU_123', item_name: 'Canvas Tote', price: 29.99 }]
});
gtag('event', 'add_to_cart', {
currency: 'USD',
value: 29.99,
items: [{ item_id: 'SKU_123', item_name: 'Canvas Tote', price: 29.99, quantity: 1 }]
});
gtag('event', 'purchase', {
transaction_id: 'T_12345',
currency: 'USD',
value: 29.99,
items: [{ item_id: 'SKU_123', item_name: 'Canvas Tote', price: 29.99, quantity: 1 }]
});Add parameter conditions
An event name can be too broad. Add a parameter condition when only some events should qualify.
For example, a purchase step could require:
- Event name exactly matches
purchase currencyexactly matchesUSDvalueis greater than0
A parameter is a value attached to an event. In this example, currency and value are parameters. Use the matching operator that fits the data. “Exactly matches” is safer for fixed values. “Contains” can include unintended values, such as both USD and USD_TEST.
Conditions within one step normally narrow the step to events meeting all required rules. Review the preview after adding conditions. If the step count becomes zero, check the parameter name, value, spelling, and whether the parameter is actually sent with the event.
Build the logic before interpreting results
Think of each step as a test:
Use consistent names such as “View item” and “Add to cart.” Do not combine unrelated actions in one step unless the business question requires it. After the steps are correct, configure whether users must start at the first step and how strictly the steps must follow one another.
Exercise
You want a step for purchases of products costing more than $50. Which conditions should you add?
Show answer
Add an event name condition matching purchase and a value condition requiring the purchase value to be greater than 50. Also verify that the value parameter is sent with the purchase event.