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" });

About this tool

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 the GA4 Event Builder

  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.

Pro tips

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

Social Media Specs & Character Limits

Optimal text formatting, length guidelines, and parameters for all major platforms:

PlatformMax LengthIdeal LengthHashtag Policy
Instagram Feed & Reels2,200 chars125 - 150 chars3 - 5 tags (Recomm.)
TikTok Posts4,000 chars100 - 200 chars3 - 5 tags (Ideal)
YouTube Description5,000 chars1,500 chars (SEO)3 - 10 tags
X / Twitter Post280 chars100 - 140 chars1 - 2 tags
LinkedIn Articles & Posts3,000 chars500 - 1,000 chars3 - 5 tags

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.