Fundamentals

Event Naming Conventions That Don't Fall Apart

Event Naming Conventions That Don't Fall ApartDo — snake_caseview_itemadd_to_cartbegin_checkoutpurchaseAvoid — driftviewItemAdd-to-CartBeginCheckoutPurchase_Done

Event names feel trivial until you have three hundred of them, half signup, half sign_up, a few Sign-Up, and your reports quietly split one action across three lines. A naming convention is the cheapest insurance in analytics. Here's a simple set of rules that scales.

Why naming is a real problem

GA4 and most tools treat event and parameter names as exact strings. add_to_cart and addToCart are two different events; Value and value are two different parameters. Inconsistency doesn't error, it silently fragments your data, and you only notice when a report doesn't add up.

The rules that prevent most pain

Do

  • snake_case for events and parameters
  • Lowercase, no spaces, no punctuation
  • Use GA4's recommended names where they exist
  • Consistent verbs: view_, add_, select_, begin_

Avoid

  • camelCase / PascalCase drift
  • Spaces, hyphens, capitals
  • Synonyms (signup vs register vs join)
  • Encoding values into names (purchase_129)
// Good: predictable, GA4-aligned
view_item, add_to_cart, begin_checkout, purchase, generate_lead

// Bad: same actions, fragmented forever
viewItem, AddToCart, Begin-Checkout, Purchase_Complete, lead

Before inventing a name, check whether GA4 already has a recommended event for it (login, search, add_to_cart, purchase, and many more). Using the recommended names unlocks built-in reports and is the closest thing to a free upgrade in analytics.

Make a decision, once

The specific convention matters less than picking one and writing it down. snake_case, lowercase, GA4-recommended where possible, documented in your measurement plan so everyone reaches for the same name.

Parameters need conventions too

  • Keep parameter keys consistent across events: value, currency, item_id, not price in one place and amount in another.
  • Be consistent about types: value is always a number with no currency symbol; ids are strings.
  • Mind GA4's limits (event and parameter name lengths, counts) so names don't get truncated.

Practice this on a real container

Naming lives inside the measurement plan and the container. See conventions applied to real events and a dataLayer schema, then keep your own container tidy as it grows.

Read: naming conventions →

Keep it consistent as you grow

Conventions only help if they're enforced. Document the rules once, reuse names from the measurement plan rather than reinventing them, and audit the container periodically for drift, the stray SignUp that snuck in during a rushed launch. A little governance keeps the whole dataset trustworthy.

Now go practice it

Reading sticks when you do it. These hands-on lessons load your own GTM container and let you debug in Tag Assistant.

Frequently asked questions

What naming convention should I use for GA4 events?

Use snake_case: lowercase words separated by underscores, no spaces, hyphens or capitals (add_to_cart, begin_checkout, generate_lead). Use GA4's recommended event names where they exist, keep verbs consistent, and never encode values into names (avoid purchase_129).

Why do inconsistent event names cause problems?

GA4 and most tools treat event and parameter names as exact strings, so add_to_cart and addToCart are two different events, and Value and value are two different parameters. Inconsistency doesn't throw an error, it silently splits one action across multiple report lines, which you only notice when a report doesn't add up.

Should I use GA4's recommended event names?

Yes, where they exist. Recommended names like login, search, add_to_cart and purchase unlock GA4's built-in reports and dimensions, so using them is close to a free upgrade. Only invent custom names when there's no recommended event for what you're tracking.

Do parameters need naming conventions too?

Yes. Keep parameter keys consistent across events (value, currency, item_id, not price here and amount there), be consistent about types (value is a number with no currency symbol, ids are strings), and mind GA4's name-length and count limits so names aren't truncated.

Related posts

About the author

Nathan Gage
Nathan Gage

Analytics & Tag Management Consultant

Nathan Gage got his start in marketing through Google Tag Manager. Seeing how tracking customer behavior could turn raw clicks into insight you can actually act on is what pulled him into the field. Since then he has worked both full time and as a consultant with 15 marketing agencies, supporting brands that spend anywhere from a thousand dollars a month to over a million. Along the way he built a multi-touch attribution app, and he created The Happy Tagger so anyone can practice GTM, GA4 and server-side tracking on a real container instead of a production site.