Sub topic 5
Recommended events: predefined names and parameters
Assume you know the GA4 event model, can edit JavaScript, and have a web data stream configured. This chapter focuses on recommended events: predefined event names and parameter schemas that GA4 uses to interpret common user actions.
What recommended events provide
A recommended event is an event name documented by Google for a common business action. You send the event with the expected parameters. GA4 then recognizes the action more consistently across reports, audiences, explorations, and other products.
Recommended events do not collect themselves. Your website or app must send them when the relevant action occurs. The event name and parameter names are case-sensitive, so use the documented spelling.
| Measurement need | Recommended event | Common parameter |
|---|---|---|
| A user signs in | `login` | `method` |
| A user creates an account | `sign_up` | `method` |
| A user views a product | `view_item` | `items` |
| A user completes a purchase | `purchase` | `transaction_id`, `value`, `currency`, `items` |
The parameter value adds context to the event. For example, method: 'Google' identifies how a user signed in. The event name identifies the action, while the parameter describes that action.
Choosing the event and parameters
Start with the closest documented event. Do not create user_logged_in when login describes the action. A standard name makes your implementation easier to understand and lets GA4 apply event-specific behavior.
Use the recommended parameters that describe the event. For ecommerce events, items is an array of product objects. Each object can contain fields such as item_id, item_name, price, and quantity.
gtag('event', 'login', {
method: 'Google'
});
gtag('event', 'purchase', {
transaction_id: 'T_12345',
value: 59.98,
currency: 'USD',
items: [
{
item_id: 'SKU_123',
item_name: 'Trail Shoes',
price: 29.99,
quantity: 2
}
]
});The purchase event should represent a completed transaction, not a button click. The transaction_id should identify the transaction and remain stable if the page is reloaded. A stable identifier helps prevent duplicate purchase reporting.
Additional parameters can provide useful context, but keep the recommended name and structure intact. If your organization needs a value that the standard schema does not include, add a clearly named custom parameter only when necessary.
Recommended events versus custom events
Recommended events describe broadly understood actions such as signing up, searching, sharing, or purchasing. Custom events describe behavior that has no suitable predefined event. For example, newsletter_signup_click may be appropriate for a specific interaction if the action is not an actual account sign-up.
Keep the distinction clear:
- Use
sign_upwhen the user creates an account. - Use
loginwhen the user authenticates. - Use
purchasewhen an order is completed. - Use a custom event when no recommended event matches the business action.
Exercise
Which event should represent a completed order containing two products, and which parameter identifies the order?
Show answer
Use the recommended purchase event. Use transaction_id to identify the order, together with value, currency, and items to describe it.