How a GA4 key event works
Follow a visitor from submitting a form to becoming a measurable key event.
The visitor submits a form
A visitor fills out your contact or lead-generation form. After they submit it, your website sends them to a confirmation page.
GA4 receives a page_view
When the confirmation page loads, the GA4 tag records a page_view event automatically. It carries the full URL in page_location.
event_name = page_view
page_location = https://example.com/thank-you GA4 checks your conditions
Your custom event tells GA4 to look for a page_view where the page URL contains thank-you. Both conditions have to be true.
event_name equals page_view ✓
page_location contains thank-you ✓ The custom event fires
Both conditions match, so GA4 creates your generate_lead event next to the original page_view. With "copy parameters" on, it keeps the page and traffic source details.
generate_lead
page_location = https://example.com/thank-you
source / medium = newsletter / email The event becomes a key event
Because generate_lead is marked as a key event, GA4 counts it as a conversion. You can now compare leads by source, medium and campaign in your acquisition reports.
generate_lead → KEY EVENT
Reports → Acquisition → Traffic acquisition Tip: click any step, or use the ← → arrow keys.
Ready to build your own?
Test your conditions against real URLs, then follow the setup guide.
Frequently Asked Questions
What is a key event in GA4? ▾
Does the page_view disappear when the custom event fires? ▾
What if my form doesn't redirect to a thank-you page? ▾
You Might Also Like
Building an AI Sales Research Agent for Outbound
AIHow an ai sales research agent turns filings and job posts into personalized cold email hooks — the architecture, the tools, and the real cost per email.
E.164 Phone Validator
DevelopmentCheck whether a phone number is valid E.164, with examples and the rules explained.
Case Study: Find First and Last Position of Element in Sorted Array (LeetCode 34)
DSAA real attempt-by-attempt debugging journey through LeetCode 34 with the two-pass boundary binary search.