Free GTM Trigger Builder for GA4
Scan a page or pick what to track, and get the exact Tag Manager trigger, the GA4 event tag and every step to set it up and test it. No Tag Manager? You get the GA4 code instead.
- Forms, calls, clicks, downloads and scroll
- Import file or step-by-step setup
- Free, no signup
Not sure what to track? Scan a page and we will suggest the triggers.
Leave blank to track every form. Use the form's ID, or a class starting with a dot.
generate_lead is Google's recommended event name for leads.
GA4: Admin, Data streams, your stream.
Your trigger
- Name
- Form Submit - All forms
- Trigger type
- Form Submission
- Wait for Tags
- Unticked
- Check Validation
- Ticked, so it fires only when nothing stops the form's normal send
- Enable this trigger when
- Page URL matches RegEx .*
- Fires on
- All Forms
Built-in variables to tick: Form ID, Form Classes
Your GA4 event tag
- Name
- GA4 Event - generate_lead
- Tag type
- Google Analytics: GA4 Event
- Measurement ID
- your G- ID
- Event name
generate_lead- Event parameters
- form_id: {{Form ID}}
- Triggering
- Form Submit - All forms
Set it up, step by step
Build it in Tag Manager yourself, with the settings on the right. About ten minutes.
How to set up a GTM trigger by hand (105 seconds, no sound). The screens are drawn from Tag Manager and GA4, not recorded, and the example is phone clicks; the steps below are for your goal.
- Track phone clicks with Google Tag Manager. Set it up by hand, step by step, with our free GTM trigger builder.
- Step 1: In the free GTM trigger builder, pick what to track. Phone number clicks. It writes the trigger, the GA4 tag and every step.
- Step 2: In Tag Manager, open Variables. Click Configure. Tick Click URL.
- Step 3: Open Triggers. Click New.
- Step 4: Click Trigger Configuration. Choose Just Links, under Click.
- Step 5: Choose Some Link Clicks, then set the condition: Click URL starts with tel:
- Step 6: Name the trigger. Click Save.
- Step 7: Open Tags. Click New. Click Tag Configuration. Choose Google Analytics. Then Google Analytics: GA4 Event.
- Step 8: Paste your measurement ID. Event Name: phone_click.
- Step 9: Click Triggering. Choose your new trigger. Name the tag. Click Save.
- Step 10: Click Preview. Enter your site's address. Click Connect.
- Step 11: On your site, click a phone link.
- Step 12: In Tag Assistant, open Link Click: your tag fired.
- Step 13: GA4 DebugView shows phone_click arrive.
- Step 14: Back in Tag Manager, click Submit. Name the version. Click Publish: it is live.
- Step 15: In GA4, open Admin, Key events, and click New key event. Type phone_click. Save: phone clicks now count as leads.
- Check the basics
GTM is on every page (both snippets: one high in the head, one right after the opening body tag), and a Google tag with your G- measurement ID (GA4 Admin, Data streams) fires on Initialization - All Pages. In GTM, Tags lists it with the type Google Tag.
- Switch on the built-in variables
In GTM, open Variables, click Configure next to Built-In Variables and tick Form ID, Form Classes.
- Create the trigger
In GTM, open Triggers, click New and name it "Form Submit - All forms". Click Trigger Configuration and choose Form Submission. Set Wait for Tags: Unticked; Check Validation: Ticked, so it fires only when nothing stops the form's normal send; Enable this trigger when: Page URL matches RegEx .*. Under This trigger fires on, choose All Forms. Save.
- Create the GA4 event tag
Open Tags, click New and name it "GA4 Event - generate_lead". Click Tag Configuration, choose Google Analytics, then Google Analytics: GA4 Event. Measurement ID: your G- measurement ID (GA4 Admin, Data streams). Event Name: generate_lead. Under Event Parameters, add form_id with the value {{Form ID}}. Under Triggering, choose "Form Submit - All forms". Save.
- Test it in Preview mode
In GTM, click Preview, enter your site's address and click Connect. On your site, send the form with test details. Back in Tag Assistant, click the Form Submit event in the list on the left: "GA4 Event - generate_lead" should be under Tags Fired. If it is under Tags Not Fired, click it to see which condition failed.
- Check it arrived in GA4
In GA4, open Admin, then DebugView (under Data display). With Preview still running, generate_lead should appear within a few seconds.
- Publish the container
In GTM, click Submit, name the version "Form Submit - All forms" so you can find it later, and click Publish. Nothing goes live until you publish.
- Mark it as a key event
In GA4, open Admin, Data display, Key events, click New key event, type generate_lead exactly and save. It counts from then on; standard reports can take 24 to 48 hours to show it.
- Many forms send in the background (AJAX): they cancel the browser's normal send and post the data themselves. With Check Validation ticked, GTM then never fires; unticked, it also counts tries the server rejects. Test it in Preview first; if nothing fires, track the success message, the thank-you page or a dataLayer event instead.
- If the form sits inside an iframe (HubSpot, Typeform and Jotform embeds), GTM on your page cannot see it. Set the form to redirect to a thank-you page and track that.
Load the trigger, the tag and their variables in one go with GTM's Import Container. About two minutes.
How to import a GTM trigger in two minutes (66 seconds, no sound). The screens are drawn from Tag Manager and GA4, not recorded, and the example is phone clicks; the steps below are for your goal.
- Import your trigger in two minutes. One file from our free GTM trigger builder, loaded with Import Container.
- Step 1: In the builder, open GTM import. Download the import file.
- Step 2: In Tag Manager, open Admin. Click Import Container.
- Step 3: Choose the file you downloaded.
- Step 4: Choose Merge, never Overwrite. Then Rename conflicting tags, triggers and variables.
- Step 5: Check the summary, then click Confirm.
- Step 6: Open Tags. Open the GA4 tag. Paste your measurement ID. Click Save.
- Step 7: Click Preview. Enter your site's address. Click Connect.
- Step 8: On your site, click a phone link.
- Step 9: In Tag Assistant, open Link Click: your tag fired.
- Step 10: GA4 DebugView shows phone_click arrive.
- Step 11: Back in Tag Manager, click Submit. Name the version. Click Publish: it is live.
- Step 12: In GA4, open Admin, Key events, and click New key event. Type phone_click. Save: phone clicks now count as leads.
- Download the import file
Click Download import file. It holds the trigger "Form Submit - All forms", the tag "GA4 Event - generate_lead" and the built-in variables they use.
- Open Import Container
In GTM, open Admin and click Import Container. Choose the file, then choose Existing workspace, Default Workspace (or New, to review it in a separate workspace first).
- Choose Merge, never Overwrite
Choose Merge, then Rename conflicting tags, triggers, and variables. Overwrite would replace everything already in the workspace. Check the summary lists only what this file adds, then click Confirm.
- Add your measurement ID
In Tags, open "GA4 Event - generate_lead" and paste your G- measurement ID (GA4 Admin, Data streams) into Measurement ID. Save.
- Test it in Preview mode
In GTM, click Preview, enter your site's address and click Connect. On your site, send the form with test details. Back in Tag Assistant, click the Form Submit event in the list on the left: "GA4 Event - generate_lead" should be under Tags Fired. If it is under Tags Not Fired, click it to see which condition failed.
- Check it arrived in GA4
In GA4, open Admin, then DebugView (under Data display). With Preview still running, generate_lead should appear within a few seconds.
- Publish the container
In GTM, click Submit, name the version "Form Submit - All forms" so you can find it later, and click Publish. Nothing goes live until you publish.
- Mark it as a key event
In GA4, open Admin, Data display, Key events, click New key event, type generate_lead exactly and save. It counts from then on; standard reports can take 24 to 48 hours to show it.
- Many forms send in the background (AJAX): they cancel the browser's normal send and post the data themselves. With Check Validation ticked, GTM then never fires; unticked, it also counts tries the server rejects. Test it in Preview first; if nothing fires, track the success message, the thank-you page or a dataLayer event instead.
- If the form sits inside an iframe (HubSpot, Typeform and Jotform embeds), GTM on your page cannot see it. Set the form to redirect to a thank-you page and track that.
No Tag Manager on your site? This sends the same GA4 event with Google's own gtag.js code.
How to track a GA4 event without Google Tag Manager (41 seconds, no sound). The screens are drawn from Tag Manager and GA4, not recorded, and the example is phone clicks; the steps below are for your goal.
- No Tag Manager? Track it with GA4 code. The same event, sent with Google's own gtag.js.
- Step 1: In the builder, open GA4 code. Copy the code.
- Step 2: In your site's settings, click the footer code box. Paste the code. Save, then publish your site.
- Step 3: Open Tag Assistant and click Add domain. Enter your site's address. Click Connect.
- Step 4: On your site, click a phone link.
- Step 5: Tag Assistant shows phone_click sent to GA4.
- Step 6: GA4 DebugView shows it too.
- Step 7: In GA4, open Admin, Key events, and click New key event. Type phone_click. Save: phone clicks now count as leads.
<script>
document.addEventListener("submit", function (e) {
var form = e.target;
gtag("event", "generate_lead", { form_id: form.id });
});
</script>- Check GA4 is on the page
View your page's source and search for gtag/js?id=G-. If it is not there, GA4 is not installed directly: add it from GA4 Admin, Data streams, your stream, View tag instructions, or use the Tag Manager routes instead.
- Add the code to your site
Paste the code below on every page, after the GA4 tag and before the closing body tag. In WordPress, a code snippets plugin's footer box does it; in Webflow, Site settings, Custom code, Footer code; in Shopify, theme.liquid, just before the closing body tag.
- Test it with Tag Assistant
Open tagassistant.google.com, click Add domain, enter your site and connect. On your site, send the form with test details. The generate_lead event should appear in Tag Assistant and in GA4 DebugView (Admin, Data display, DebugView) within a few seconds.
- Mark it as a key event
In GA4, open Admin, Data display, Key events, click New key event, type generate_lead exactly and save. It counts from then on; standard reports can take 24 to 48 hours to show it.
- The submit event also fires when the server rejects the form, so this can count failed tries. The success message or thank-you page goal counts only real leads.
- Forms inside an iframe (HubSpot, Typeform and Jotform embeds) cannot be seen by code on your page.
Want tracking that counts every lead once, built for you? See our PPC management
Google Tag Manager Trigger Types
A trigger is the rule that tells Tag Manager when to fire a tag. These are the trigger types the builder uses, and what each one is good for.
- Page View
- Fires when a page loads. Use it for thank-you pages, with the condition Page Path contains /thank-you/. DOM Ready and Window Loaded are the same idea, later in the load. Google: Tag Manager trigger types
- Click - All Elements
- Hears every click on anything: buttons, images, menu items. Match the element by Click ID, Click Classes, Click Text or a CSS selector.
- Click - Just Links
- Hears clicks on links only. The one for phone (tel:), email (mailto:), outbound and file download links, matched on Click URL.
- Form Submission
- Fires when a form is sent. Forms that send in the background cancel the browser's normal send, so with Check Validation ticked it never fires for them; always test it in Preview.
- Element Visibility
- Fires when an element appears on screen, such as a form's success message. Tick Observe DOM changes for elements added after the page loads.
- Scroll Depth
- Fires as visitors pass the percentages you set, such as 25, 50, 75 and 90, and reports the one reached in Scroll Depth Threshold.
- Custom Event
- Fires when your site pushes a named event to the dataLayer. The most reliable trigger for leads, because the site says exactly when a form succeeded.
- History Change
- Fires when the address changes without a page load, in single-page apps built with React, Vue or Next.js.
- GA4 event tag
- The tag a trigger fires to send an event to Google Analytics. Google recommends generate_lead for leads; your own events use lowercase words joined by underscores. Google: GA4 recommended events
How to Set Up a GTM Trigger
Four steps from what you want to track to an event you can trust in GA4.
Scan your page, or pick a goal
The scan reads your page for forms, phone and email links, buttons and file links, spots form plugins such as Contact Form 7 and Gravity Forms, and checks whether Tag Manager or GA4 is installed.
Fill in only what that goal needs
The thank-you page, the button's ID, your domain. The GA4 event name starts as Google's recommended name where one exists.
Choose how to set it up
By hand in Tag Manager with the settings shown, with an import file through Admin, Import Container, or with GA4 code if your site has no Tag Manager.
Test it before you publish
Preview mode and Tag Assistant show the tag firing; GA4 DebugView shows the event arriving. Publish only when both work, then mark leads as key events.
When You Want It Done for You
Count every lead, then make every lead cheaper.
PPC management
The Lead Cost Engine: conversion and call tracking rebuilt in week one, then Google Ads managed to lower your cost per lead.
OpenDigital marketing services
SEO, ads and maps run as one plan, so every channel brings leads you can count.
OpenSEO services
The 90-Day Lead Engine: rank higher in 90 days or less, or we work free until you do.
OpenGTM Trigger Builder Questions
What is a trigger in Google Tag Manager?
What is the difference between a tag, a trigger and a variable?
How do I track form submissions in Google Tag Manager?
Why is my GTM form submission trigger not firing?
What is the difference between Click - All Elements and Click - Just Links?
How do I track phone number clicks with Google Tag Manager?
Can I track GA4 events without Google Tag Manager?
How do I import the file into Tag Manager?
What does the site scan look at?
How do I test a trigger before publishing?
Which events should be key events in GA4?
Is this GTM trigger builder free?
Find Out Where Your Ad Budget Goes
Triggers count your leads. Our free PPC audit shows what each one costs and which searches bring them, from your own account, in about a week.
- Every search term that spent without bringing a lead
- Whether your tracking counts the right leads, once
- Your cost per lead against your industry's average
- An honest answer on whether you need us at all
Rather talk it through? Call +1 (217) 677-5905