Free Tool · Runs in your browser

GA4 Event Name Generator

GA4 Event Name Generator & Validator

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.

How to Use This GA4 Event Generator

Tab 1: Generator

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:

  • Converts the text to snake_case format
  • Strips invalid characters (spaces, hyphens, special symbols)
  • Truncates the result to 40 characters if necessary
  • Checks the output against GA4 reserved event names
  • Suggests a matching GA4 recommended event if one exists

Copy the generated name directly into your tracking implementation.

Tab 2: Validator

Paste an existing event name to check whether it meets all GA4 naming requirements. The validator returns a pass/fail result for each rule:

  • Starts with a letter (a-z or A-Z)
  • Contains only letters, numbers, and underscores
  • Does not exceed 40 characters
  • Does not use a reserved prefix (firebase_, google_, ga_)
  • Is not a reserved event name

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.

Tab 3: Code Generator

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.

What Are GA4 Events?

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.

Four Types of GA4 Events

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.

GA4 Event Naming Rules

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:

RuleRequirementExample (Valid)Example (Invalid)
First characterMust be a letter (a-z, A-Z)click_button1st_click
Allowed charactersLetters, numbers, underscores onlyform_submit_v2form-submit
Maximum length40 charactersnewsletter_subscription_completeAny name exceeding 40 chars
Case sensitivityEvent names are case-sensitive; use snake_caseadd_to_cartAdd_To_Cart (treated as different event)
Reserved prefixesCannot start with firebase_, google_, or ga_app_firebase_loginfirebase_login
Reserved namesCannot use names reserved by GA4 (see table below)custom_purchaseapp_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.

GA4 Reserved Event Names You Cannot Use

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 NameDescription
ad_activeviewAd viewability measurement (internal)
ad_clickAd click tracking (internal)
ad_exposureAd exposure tracking (internal)
ad_impressionAd impression logging (internal)
ad_queryAd query tracking (internal)
ad_rewardRewarded ad completion (Firebase)
adunit_exposureAd unit exposure measurement (internal)
app_clear_dataApp data cleared by user (Firebase)
app_exceptionApp exception/crash logged (Firebase)
app_installApp installed (automatically collected)
app_removeApp uninstalled (automatically collected)
app_store_refundApp store refund processed (internal)
app_updateApp updated to new version (automatically collected)
app_store_subscription_cancelSubscription canceled in app store (internal)
app_store_subscription_convertFree trial converted to paid (internal)
app_store_subscription_renewSubscription renewed in app store (internal)
dynamic_link_app_openApp opened via dynamic link (Firebase)
dynamic_link_app_updateApp updated via dynamic link (Firebase)
dynamic_link_first_openFirst open via dynamic link (Firebase)
errorReserved for error tracking (internal)
first_openFirst time app is opened (automatically collected)
first_visitFirst visit to website (automatically collected)
in_app_purchaseIn-app purchase completed (automatically collected)
notification_dismissNotification dismissed by user (Firebase)
notification_foregroundNotification received while app in foreground (Firebase)
notification_openNotification opened by user (Firebase)
notification_receiveNotification received by device (Firebase)
os_updateDevice OS updated (automatically collected)
screen_viewScreen viewed in app (automatically collected)
session_startNew session started (automatically collected)
user_engagementApp/site in foreground for >1 second (automatically collected)

GA4 Recommended Events

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 NameCategoryWhen to UseKey Parameters
add_payment_infoE-commerceUser submits payment information during checkoutcurrency, value, payment_type
add_shipping_infoE-commerceUser submits shipping information during checkoutcurrency, value, shipping_tier
add_to_cartE-commerceUser adds an item to the shopping cartcurrency, value, items
add_to_wishlistE-commerceUser adds an item to a wishlistcurrency, value, items
begin_checkoutE-commerceUser initiates the checkout processcurrency, value, items
earn_virtual_currencyEngagementUser earns in-app virtual currency (points, coins)virtual_currency_name, value
generate_leadLead genUser submits a form or contact requestcurrency, value
join_groupEngagementUser joins a group or communitygroup_id
level_endGamingUser completes a level in a gamelevel_name, success
level_startGamingUser starts a level in a gamelevel_name
level_upGamingUser levels up in a gamelevel, character
loginEngagementUser logs in to an accountmethod
post_scoreGamingUser posts a scorescore, level
purchaseE-commerceUser completes a purchasetransaction_id, value, currency, items
refundE-commerceA refund is issuedtransaction_id, value, currency, items
remove_from_cartE-commerceUser removes an item from the cartcurrency, value, items
searchEngagementUser performs a searchsearch_term
select_contentEngagementUser selects a content item (article, product)content_type, item_id
select_itemE-commerceUser selects a product from a listitems, item_list_name
select_promotionE-commerceUser clicks on a promotional banner or linkpromotion_id, promotion_name
shareEngagementUser shares content via social or other methodsmethod, content_type, item_id
sign_upEngagementUser creates a new accountmethod
spend_virtual_currencyEngagementUser spends virtual currencyitem_name, virtual_currency_name, value
tutorial_beginEngagementUser starts a tutorial or onboarding flow
tutorial_completeEngagementUser finishes a tutorial or onboarding flow
unlock_achievementGamingUser unlocks an achievementachievement_id
view_cartE-commerceUser views the shopping cartcurrency, value, items
view_itemE-commerceUser views a product detail pagecurrency, value, items
view_item_listE-commerceUser views a list of products (category page, search results)items, item_list_name
view_promotionE-commerceUser views a promotional bannerpromotion_id, promotion_name

Best Practices for Custom GA4 Event Names

Use descriptive, specific names

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.

Use snake_case consistently

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.

Group related events with common prefixes

Use prefixes to create logical event families. For example:

  • checkout_start, checkout_shipping, checkout_payment, checkout_complete
  • video_play, video_pause, video_complete
  • form_view, form_start, form_submit, form_error

This makes filtering and analysis straightforward — you can use regex filters in GA4 Explorations to pull all checkout_* events at once.

Keep parameter count reasonable

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:

  • Use event-level parameters for data specific to that interaction (e.g., button_location, form_name)
  • Use user properties for persistent user attributes (e.g., subscription_tier, account_type)
  • Register only the parameters you need in GA4 admin — unregistered parameters are still collected but only accessible via BigQuery export

Document your naming convention

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.

Avoid these common mistakes

  • Do not create an event for every button. Use parameters to distinguish button locations or types within a single event like cta_click with a button_name parameter.
  • Do not duplicate recommended events. If Google already provides sign_up, do not create user_registration — you lose built-in reporting.
  • Do not use PII in event names or parameters. Names like john_purchase or parameters containing email addresses violate Google's terms of service.
  • Do not exceed the 500-event limit. GA4 allows up to 500 distinct event names per property. If you approach this limit, consolidate granular events by moving detail into parameters.

How to Implement GA4 Events with gtag.js

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.

Real-world example: tracking a form submission

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).

Real-world example: tracking a custom event

gtag('event', 'pdf_download', {
  file_name: 'ga4-migration-guide.pdf',
  file_category: 'whitepaper',
  page_section: 'resources'
});

Using Google Tag Manager instead

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.

Verifying your events

After implementation, verify your events using these tools:

  • GA4 DebugView — Real-time event stream for devices with debug mode enabled. Enable debug mode by adding 'debug_mode': true to your gtag config or installing the Google Analytics Debugger Chrome extension.
  • GA4 Realtime report — Shows events from all users in the last 30 minutes. Useful for confirming events are arriving, but lacks parameter-level detail.
  • Browser developer tools (Network tab) — Filter for requests to google-analytics.com/g/collect to inspect the raw payload being sent. The en parameter in the URL contains the event name.
  • BigQuery export — For production validation at scale, enable BigQuery export and query the events_* tables to verify event names, parameters, and volumes.