How to track signups in Google Analytics 4
Two ways to count signups in GA4: send a sign_up event from your code, or create one from your welcome page with no code at all. Then mark it as a key event.
There are two ways to count signups in Google Analytics 4. If you can edit your code, send GA4's recommended sign_up event when someone finishes signing up. If you can't, create a sign_up event in GA4 from views of the page people see right after signing up. Either way, then mark it as a key event.
Which way to choose
| Send an event from code | Create an event from a page | |
|---|---|---|
| Needs code | Yes, one line | No |
| Works when | Signup happens without a new page (a modal, a single-page app) | People land on a page only new users see, like /welcome |
| Accuracy | Best: fires exactly when signup succeeds | Good, if that page is only reached after signing up |
Way 1: send a sign_up event from your code
Right after a signup succeeds (not when the form is submitted, which might fail), run:
gtag("event", "sign_up", {
method: "Google", // or 'Email', 'GitHub': how they signed up
});sign_up is one of GA4's recommended event names, so GA4 knows what it means. The method parameter is optional.
If your site uses Google Tag Manager instead of gtag, push a dataLayer event and send it with a GA4 Event tag:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({ event: "sign_up", method: "Email" });Way 2: create the event from your welcome page (no code)
In GA4, open Admin → Data display → Events → Create event → Create.
Name the new event sign_up.
Add two matching conditions:
event_nameequalspage_viewpage_locationcontains/welcome(use your own page's path)
Leave Copy parameters from the source event on, and choose Create.
GA4 creates sign_up from then on. It can't create it for visits before today.
Then: mark it as a key event
Admin → Data display → Events → turn on Mark as key event for sign_up. If it isn't in the list yet, add it under Key events → New key event. Key events, step by step.
Check it works
Sign up on your own site (or reach the welcome page), then look in GA4's Realtime overview under events, or in DebugView. How to check.
Related
Sources
- Google: Recommended events: sign_up
- Google: Rename and generate new events
Last updated
Key events
Key events are GA4's new name for conversions. What they are, how to mark an event as a key event in a minute, and the counting setting most people miss.
Track purchases
Send GA4's purchase event with a value, currency and transaction ID, including after Stripe Checkout or Payment Links, so GA4 shows sales and revenue by source.