This tool helps you create, validate, and implement Google Analytics 4 event names that comply with Google’s official naming rules. Enter a plain-text description of your event, and the generator converts it to a valid snake_case GA4 event name. The validator checks any event name against reserved names, naming rules, and recommended events. The code generator outputs ready-to-use gtag.js or GTM snippets.
Whether you are migrating from Universal Analytics or building a new GA4 measurement plan from scratch, consistent and valid event naming is critical to clean reporting and accurate data analysis.
Type a human-readable description of your event into the input field — for example, User Clicks Download Button or Newsletter Signup Complete. The tool automatically:
Copy the generated name directly into your tracking implementation.
Paste an existing event name to check whether it meets all GA4 naming requirements. The validator returns a pass/fail result for each rule:
firebase_, google_, ga_)If the name matches a GA4 recommended event, the validator displays the recommendation so you can use the standard name instead of a custom one.
After generating or validating an event name, switch to the Code Generator tab to get implementation code. Select your method (gtag.js or Google Tag Manager dataLayer push), add custom parameters if needed, and copy the output. The generated code follows Google’s current documentation format and is ready to paste into your codebase.
Google Analytics 4 uses an event-based data model that replaces the session-and-pageview model of Universal Analytics (UA). In UA, the primary data unit was a pageview, supplemented by events structured as Category / Action / Label. GA4 eliminates that hierarchy entirely — every user interaction is an event, including pageviews.
Each GA4 event consists of an event name and up to 25 custom parameters (key-value pairs). Parameters carry the contextual detail: a purchase event might include transaction_id, value, currency, and an items array. This flat structure gives you more flexibility but demands stricter naming discipline.
1. Automatically collected events — Fired by default with no code changes. Examples: first_visit, session_start, user_engagement. These events are always recorded when the GA4 tag is present.
2. Enhanced measurement events — Toggled on or off in the GA4 admin interface. Examples: scroll, click (outbound), file_download, video_start, video_progress, video_complete, view_search_results. No code required, but you need to enable them in the data stream settings.
3. Recommended events — Predefined by Google with specific names and expected parameters. Examples: purchase, add_to_cart, sign_up. You must implement them manually, but using the standard names unlocks built-in reports and audience definitions in GA4.
4. Custom events — Any event you define yourself. Use custom events only when no recommended event fits your use case. Custom event data does not appear in GA4’s standard reports — you need Explorations or custom reports to analyze it.
Google enforces strict rules for GA4 event names. Events that violate these rules are silently dropped or cause implementation errors. The following table summarizes every requirement:
| Rule | Requirement | Example (Valid) | Example (Invalid) |
|---|---|---|---|
| First character | Must be a letter (a-z, A-Z) | click_button |
1st_click |
| Allowed characters | Letters, numbers, underscores only | form_submit_v2 |
form-submit |
| Maximum length | 40 characters | newsletter_subscription_complete |
Any name exceeding 40 chars |
| Case sensitivity | Event names are case-sensitive; use snake_case | add_to_cart |
Add_To_Cart (treated as different event) |
| Reserved prefixes | Cannot start with firebase_, google_, or ga_ |
app_firebase_login |
firebase_login |
| Reserved names | Cannot use names reserved by GA4 (see table below) | custom_purchase |
app_remove |
Important: GA4 treats Add_To_Cart and add_to_cart as two separate events. Google’s recommended events all use lowercase snake_case. Mixing cases leads to fragmented data and broken built-in reports. Always use lowercase snake_case.
The following event names are reserved by Google Analytics and the Firebase SDK. If you send an event with one of these names, GA4 discards it or processes it incorrectly. Do not use them for custom events.
| Reserved Event Name | Description |
|---|---|
ad_activeview |
Ad viewability measurement (internal) |
ad_click |
Ad click tracking (internal) |
ad_exposure |
Ad exposure tracking (internal) |
ad_impression |
Ad impression logging (internal) |
ad_query |
Ad query tracking (internal) |
ad_reward |
Rewarded ad completion (Firebase) |
adunit_exposure |
Ad unit exposure measurement (internal) |
app_clear_data |
App data cleared by user (Firebase) |
app_exception |
App exception/crash logged (Firebase) |
app_install |
App installed (automatically collected) |
app_remove |
App uninstalled (automatically collected) |
app_store_refund |
App store refund processed (internal) |
app_update |
App updated to new version (automatically collected) |
app_store_subscription_cancel |
Subscription canceled in app store (internal) |
app_store_subscription_convert |
Free trial converted to paid (internal) |
app_store_subscription_renew |
Subscription renewed in app store (internal) |
dynamic_link_app_open |
App opened via dynamic link (Firebase) |
dynamic_link_app_update |
App updated via dynamic link (Firebase) |
dynamic_link_first_open |
First open via dynamic link (Firebase) |
error |
Reserved for error tracking (internal) |
first_open |
First time app is opened (automatically collected) |
first_visit |
First visit to website (automatically collected) |
in_app_purchase |
In-app purchase completed (automatically collected) |
notification_dismiss |
Notification dismissed by user (Firebase) |
notification_foreground |
Notification received while app in foreground (Firebase) |
notification_open |
Notification opened by user (Firebase) |
notification_receive |
Notification received by device (Firebase) |
os_update |
Device OS updated (automatically collected) |
screen_view |
Screen viewed in app (automatically collected) |
session_start |
New session started (automatically collected) |
user_engagement |
App/site in foreground for >1 second (automatically collected) |
Google defines recommended events for common user interactions. Using these exact names — with their expected parameters — enables built-in GA4 reports, audience triggers, and Google Ads integrations that custom events cannot access.
| Event Name | Category | When to Use | Key Parameters |
|---|---|---|---|
add_payment_info |
E-commerce | User submits payment information during checkout | currency, value, payment_type |
add_shipping_info |
E-commerce | User submits shipping information during checkout | currency, value, shipping_tier |
add_to_cart |
E-commerce | User adds an item to the shopping cart | currency, value, items |
add_to_wishlist |
E-commerce | User adds an item to a wishlist | currency, value, items |
begin_checkout |
E-commerce | User initiates the checkout process | currency, value, items |
earn_virtual_currency |
Engagement | User earns in-app virtual currency (points, coins) | virtual_currency_name, value |
generate_lead |
Lead gen | User submits a form or contact request | currency, value |
join_group |
Engagement | User joins a group or community | group_id |
level_end |
Gaming | User completes a level in a game | level_name, success |
level_start |
Gaming | User starts a level in a game | level_name |
level_up |
Gaming | User levels up in a game | level, character |
login |
Engagement | User logs in to an account | method |
post_score |
Gaming | User posts a score | score, level |
purchase |
E-commerce | User completes a purchase | transaction_id, value, currency, items |
refund |
E-commerce | A refund is issued | transaction_id, value, currency, items |
remove_from_cart |
E-commerce | User removes an item from the cart | currency, value, items |
search |
Engagement | User performs a search | search_term |
select_content |
Engagement | User selects a content item (article, product) | content_type, item_id |
select_item |
E-commerce | User selects a product from a list | items, item_list_name |
select_promotion |
E-commerce | User clicks on a promotional banner or link | promotion_id, promotion_name |
share |
Engagement | User shares content via social or other methods | method, content_type, item_id |
sign_up |
Engagement | User creates a new account | method |
spend_virtual_currency |
Engagement | User spends virtual currency | item_name, virtual_currency_name, value |
tutorial_begin |
Engagement | User starts a tutorial or onboarding flow | — |
tutorial_complete |
Engagement | User finishes a tutorial or onboarding flow | — |
unlock_achievement |
Gaming | User unlocks an achievement | achievement_id |
view_cart |
E-commerce | User views the shopping cart | currency, value, items |
view_item |
E-commerce | User views a product detail page | currency, value, items |
view_item_list |
E-commerce | User views a list of products (category page, search results) | items, item_list_name |
view_promotion |
E-commerce | User views a promotional banner | promotion_id, promotion_name |
An event named button_click tells you nothing useful. pricing_plan_select tells you exactly what happened. Your future self — and anyone else reading the reports — should understand the event without looking at documentation.
GA4 event names are case-sensitive. If one developer sends form_Submit and another sends form_submit, GA4 records them as two separate events. Enforce lowercase snake_case across your entire implementation: video_play, pdf_download, newsletter_signup.
Use prefixes to create logical event families. For example:
checkout_start, checkout_shipping, checkout_payment, checkout_completevideo_play, video_pause, video_completeform_view, form_start, form_submit, form_errorThis makes filtering and analysis straightforward — you can use regex filters in GA4 Explorations to pull all checkout_* events at once.
GA4 allows a maximum of 25 custom event parameters per event and 50 custom event parameters per property (for registered parameters that appear in reports). Plan your parameter structure carefully:
button_location, form_name)subscription_tier, account_type)Maintain a shared spreadsheet or document listing every custom event, its parameters, expected values, and which team or feature owns it. Without documentation, event names drift over time: one developer adds click_cta, another adds cta_click, and you end up with fragmented data.
cta_click with a button_name parameter.sign_up, do not create user_registration — you lose built-in reporting.john_purchase or parameters containing email addresses violate Google’s terms of service.The gtag() function is the standard method for sending events to GA4 from a website. The basic syntax is:
gtag('event', 'event_name', {
parameter_key: 'parameter_value',
another_param: 123
});
The first argument is always the string 'event'. The second argument is your event name (following all the rules above). The third argument is an optional JavaScript object containing event parameters.
document.getElementById('contact-form').addEventListener('submit', function() {
gtag('event', 'generate_lead', {
currency: 'USD',
value: 50.00,
form_name: 'contact_page',
form_location: 'footer'
});
});
This uses the recommended generate_lead event with two standard parameters (currency, value) and two custom parameters (form_name, form_location).
gtag('event', 'pdf_download', {
file_name: 'ga4-migration-guide.pdf',
file_category: 'whitepaper',
page_section: 'resources'
});
If you use Google Tag Manager (GTM), you send events via the dataLayer instead of calling gtag() directly:
dataLayer.push({
event: 'pdf_download',
file_name: 'ga4-migration-guide.pdf',
file_category: 'whitepaper',
page_section: 'resources'
});
In GTM, you then create a GA4 Event tag that triggers on this custom event and maps the dataLayer variables to GA4 event parameters. GTM gives you more control over when and how events fire, supports version control, and lets non-developers manage tracking changes through the GTM web interface.
After implementation, verify your events using these tools:
'debug_mode': true to your gtag config or installing the Google Analytics Debugger Chrome extension.google-analytics.com/g/collect to inspect the raw payload being sent. The en parameter in the URL contains the event name.events_* tables to verify event names, parameters, and volumes.