GA4 Event Builder

Build and validate Google Analytics 4 gtag event snippets — correct naming, parameters, and copy-ready code.

GA4 Dashboard PreviewValid
Event: sign_up
event_categoryconversion
event_labelform
gtag snippet
gtag('event', 'sign_up', { event_category: 'conversion', event_label: 'form' });
dataLayer push
window.dataLayer = window.dataLayer || []; dataLayer.push({ "event": "sign_up", "event_category": "conversion", "event_label": "form" });

What this tool does

Custom GA4 events need correct naming and parameter structure — malformed events pollute reports or fail to fire.

This builder validates event names and outputs copy-ready gtag snippets entirely in your browser.

How to use it

  1. 1

    Choose a recommended event or enter a custom event name.

  2. 2

    Add category, label, and optional value parameters.

  3. 3

    Review validation warnings and copy the gtag snippet into your site.

Event naming best practices

Use lowercase snake_case: sign_up, not Sign Up or signUp. Stick to recommended events when they fit — Google pre-maps them in reports.

Keep parameter names consistent across events so you can build comparisons and explorations later.

Tips

  • Test events in GA4 DebugView before deploying to production.
  • Document custom events in a shared spec sheet for your team.

Related tools

All tools →

Frequently asked questions

Does this send data to Google?

No. Snippets are generated entirely in your browser — nothing is uploaded or tracked here.

What makes a valid GA4 event name?

Use lowercase letters, numbers, and underscores only. Names must start with a letter — no spaces or special characters.