Google Tag Manager (GTM) lets you add and manage tracking events on a business website without editing code every time. This guide walks through setting up a lead-generation event end to end, from the GA4 tag to a published GTM container.
Prerequisites
- GA4 property
- GA4 Web Data Stream
- Google Tag Manager account and web container
- GTM container installed on the website
- Access to the website for testing
Step 1: Get the GA4 Measurement ID
Copy the Measurement ID, for example: G-XXXXXXXXXX
Step 2: Install the Google Tag in GTM
- Tag Type: Google tag
- Tag ID: G-XXXXXXXXXX
- Trigger: Initialization → All Initialization Events
Click Save.
Step 3: Create the GA4 Event Tag
- Tag Name: GA4 Event | Contact Form
- Measurement ID: Your GA4 Measurement ID
- Event Name: generate_lead
Use a recommended GA4 event name where one exists instead of creating an unnecessary custom event.
Step 4: Create the Event Trigger
Click Triggering → New.
- Trigger Type: All Elements
- Select: Some Clicks
- Example condition: Click Text → contains → Get Quote
Name the trigger: Click | Get Quote. Click Save.
Step 5: Connect the Trigger to the Event Tag
Open the GA4 Event tag. Under Triggering, select Click | Get Quote, then save.
Step 6: Test the Event
In GTM, click Preview. Enter your website URL and click Connect.
Perform the tracked action on the website.
Example: Click Get Quote → Tag Assistant → check whether the GA4 Event tag fired.
Step 7: Verify the Event in GA4
Perform the event again and check whether generate_lead appears.
You can also use GA4 → Admin → DebugView when testing with debug mode enabled.
Step 8: Publish GTM
After successful testing, go to:
Add a version name such as: Added Generate Lead Event. Click Publish.
Common Business Website Events
| Website Action | GA4 Event |
|---|---|
| Contact form submission | generate_lead |
| Quote request | generate_lead |
| Phone click | phone_click |
| WhatsApp click | whatsapp_click |
| Brochure download | file_download |
| Appointment booking | generate_lead |
| Newsletter signup | sign_up |
Important
Avoid creating duplicate events through both website code and GTM. Test the event before publishing to prevent duplicate conversions.
Recommended resources: Google Tag Manager Help and Google Analytics Help.