Sub topic 8
Deciding which kind of event to use
This chapter assumes you know the GA4 event model (events, parameters, user properties) and the four event categories: automatically collected, enhanced measurement, recommended, and custom. It also assumes you can read basic JavaScript objects and function calls. The goal here is a repeatable way to pick the right kind of event for any measurement need, and to avoid the errors that come from picking the wrong one.
Why the choice matters
Every interaction you want to measure can be sent as an event, but the kind of event you pick changes what you get back.
- GA4 already understands the names and parameters of recommended events. Some reports, such as the monetization reports, depend on them.
- Custom events are only understood by your own team. They appear in event reports, but nothing in GA4 treats them specially until you register their parameters.
- Sending the same interaction twice under different names inflates counts and splits your data.
A wrong choice is expensive to fix later. Historical data keeps the old event name, and renaming an event in your code does not rewrite past data.
The decision order
Work through these questions in order and stop at the first "yes".
- Does GA4 already collect it? Check automatically collected events (for example
first_visit,session_start,page_view) and enhanced measurement events (for examplescroll,clickfor outbound links,file_download,video_start,view_search_results). If the behavior is covered and enabled, do nothing. - Does a recommended event describe it? Recommended events have fixed names and parameters, such as
login,sign_up,purchase,add_to_cart,begin_checkout,generate_lead, andsearch. If one matches the meaning of the interaction, use it with its documented parameters. - Neither fits? Send a custom event with a clear snake_case name and your own parameters.
The order is deliberate. Existing collection costs nothing to maintain. Recommended events give you predefined meaning. Custom events give you freedom but also full responsibility for naming, documentation, and registration.
Step 1: check what you already have
Enhanced measurement is a set of toggles on the web data stream. Before writing code, open the stream settings and see what is on. Then confirm in DebugView or the Events report that the event actually arrives.
Existing collection has limits. Enhanced click only fires for links that leave your domain. The scroll event fires once per page when a user reaches 90% depth. If you need to know about 25% or 50% scroll depth, or clicks on internal buttons, enhanced measurement does not cover you, and you move on to a custom event.
A common error is to rebuild an event that exists. For example, adding a custom file_downloaded event while file_download is already on produces two parallel records of the same action.
Step 2: match against recommended events
A recommended event is a good match when the meaning is the same, not merely when the words are similar. Ask what the user did, not what your button is called.
| Situation | Better choice | Reason |
|---|---|---|
| User signs in with Google | `login` with `method` | Same meaning as the recommended event |
| User completes an order | `purchase` with `transaction_id`, `value`, `currency`, `items` | Monetization reports read these fields |
| User submits a contact form that creates a sales lead | `generate_lead` | Meaning is a lead being created |
| User clicks a newsletter button in the footer | Custom event | No recommended event describes a newsletter click |
| User opens a pricing tab | Custom event | Specific to your site |
If you choose a recommended event, send it with the documented parameters. Leaving out currency on a purchase with a value leads to revenue that GA4 cannot attribute properly. Adding extra parameters is allowed, but they behave like custom parameters until registered.
Here is a recommended event sent correctly:
gtag('event', 'login', {
method: 'Google'
});And a purchase with the fields GA4 expects:
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
}
]
});Do not bend a recommended event
Using a recommended name for something that only looks similar corrupts the data. Sending purchase when a user clicks "Buy" but before payment succeeds would count revenue that never happened. Sending login when a user merely opens a login page would count visits as logins. If the meaning is not the same, use a custom event.
Step 3: design the custom event
When you reach a custom event, make three decisions: the name, the parameters, and what you will do with it later.
gtag('event', 'newsletter_signup_click', {
placement: 'footer',
plan_type: 'free'
});Name for the action, not the element
- Use lowercase snakecase, such as `newslettersignup_click`.
- Name the action.
footer_button_3breaks when the page changes and tells nobody what happened. - Do not use reserved names or prefixes. GA4 rejects or ignores names that begin with
google_,ga_, orfirebase_, and some names (for examplefirst_visitandsession_start) are reserved for automatic collection. - Keep the event name count in mind. Standard properties have a cap on distinct custom event names, so avoid generating names dynamically.
Prefer one event with parameters over many events
This is the most common design error. Compare two approaches.
- Many events:
signup_click_footer,signup_click_header,signup_click_popup. - One event:
signup_clickwith aplacementparameter.
The single event keeps your event list short, stays below the event name limit, and lets you compare placements in one report once placement is registered as a custom dimension. The many-events approach forces you to add up several rows and creates a new name for every new placement.
A useful rule: if the things differ only by a value, that value is a parameter. If they differ by meaning, they are different events.
Plan for reporting at the same time
Parameters you send are collected but do not appear in standard reports or Explorations until you register them as event-scoped custom dimensions or custom metrics. Decide now which parameters you will need to report on, because registration only applies to data collected after you register. Registration is covered in a later chapter. The rule for this chapter is to choose parameters you can explain, not parameters you might want someday.
Choosing the delivery method
The event type and the delivery method are separate decisions. Once you know the event, pick how to send it.
| Method | Use when |
|---|---|
| gtag.js | You control the site code and want events written directly by developers |
| Google Tag Manager with the data layer | Marketing or analytics staff need to change tags without code releases |
| Measurement Protocol | The event happens on a server, such as a back-end confirmed sign-up |
The same event can come from any of them. For instance, a custom event pushed to the data layer for a GTM Custom Event trigger looks like this:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'tutorial_complete',
tutorial_id: 'ga4-events-101'
});Avoid sending the same event from two methods without a plan. A browser purchase and a server purchase for the same order double-count revenue unless you deduplicate on transaction_id.
Common mistakes
- Duplicating automatic collection. Check enhanced measurement first.
- Reusing a recommended name loosely. The meaning must match.
- Encoding values in event names. Use parameters for values such as plan, placement, or category.
- Inconsistent naming.
SignUp,sign-up, andsignupare three different events. Event names are case sensitive. - Forgetting registration. A parameter that never appears in a report was probably never registered.
- Skipping documentation. Without a written record, the next person will create a near-duplicate event.
A worked decision
Suppose a product team wants to measure these four things on a shop site.
- Page views of product pages. This is covered by automatic
page_view. No work needed. - Clicks on a link to a partner site. Enhanced measurement
clickcovers outbound links when enabled. Verify it, then stop. - Completed orders. The recommended
purchaseevent matches, so send it withtransaction_id,value,currency, anditems. - Clicks on a "compare products" button. No recommended event exists for this. Send a custom event
compare_products_clickwith a parameter such asproduct_count.
Three of the four needs required no custom event. That ratio is typical, and it keeps the property easy to maintain.
Exercise
A site wants to count how many visitors click the "Download brochure" button, which links to a PDF on the same domain. Enhanced measurement file downloads are turned on. Should you create a custom event named brochure_download_click? Explain your answer.
Show answer
No, not at first. Enhanced measurement already sends file_download for links to common file types such as PDF, so you should verify in DebugView that the event arrives for this link. If it does, use it and filter on its file parameters (for example file_name). Create a custom event only if enhanced measurement does not capture the click, for example because the button is not a plain link, and then name it for the action and add parameters instead of one event per brochure.
Exercise
A developer proposes the custom events cta_click_header, cta_click_footer, and cta_click_sidebar. What would you change, and why?
Show answer
Replace them with one event, cta_click, that carries a placement parameter with the values header, footer, and sidebar. This keeps the event list short, avoids adding a new event name for each placement, and lets you compare placements in one report after registering placement as an event-scoped custom dimension.