Four frontend skills are on sale now. Pay once, download straight away with your licence key.

See the catalogue
AI Skill Up
Browse skills

GA4 event names: the rules that silently drop your events

GA4 ignores events whose names break its rules, often without an error. The limits, a naming style that stays consistent, and a normaliser to enforce it.

GA4 is strict about event names and quiet about breaking them. A name with a hyphen or a space may simply never appear, and you find out weeks later.

The rules to follow

  • Letters, numbers and underscores only, starting with a letter.
  • Stay within the length limit; 40 characters is the safe ceiling.
  • Avoid reserved names and prefixes Google uses itself.
  • Pick one case, lowercase, and never vary it.

Enforce it in code

gtag("event", name.replace(/[^a-z0-9_]/gi, "_").slice(0, 40), props);

One line in the tracking wrapper, and no call site can send a name GA will drop. A consistent verb_noun style, such as checkout_clicked, keeps the list readable. Which events to send at all is in an event plan for a landing page.

Questions

What characters can a GA4 event name use?

Letters, numbers and underscores, starting with a letter, and a limited length. Spaces and hyphens are not allowed.

Are GA4 event names case-sensitive?

Yes. page_viewed and Page_Viewed are two different events, which is one reason to pick lowercase and stick to it.

Why is my event not appearing in GA4?

Check the name against the rules and the reserved names list, check that it reached the debug view, and remember standard reports can lag.

Or skip the afternoonand drop one in.

Every skill in the catalogue is a folder you drop into your skills directory. Each ships with its design rules, worked examples and a troubleshooting table, and downloads the moment you pay.