Website Tracking

Track Forms Without a Thank You Page in GTM [GA4 Update]

No matter what kind of business you are running, you want to make sure you track all of your leads.

Setting up goal tracking in Google Analytics is the way to get a better understanding of where your leads are coming from. You can get valuable data from this that you can use to optimise your website or marketing channels.

Back in the days, most contact forms had a separate thank you page hosted on a different URL. You could easily track your forms by setting up a goal with this URL.

However, we notice that more and more websites are using a different approach. Instead of a separate thank you page, visitors will stay on the same page. Then, they simply get a notification that their message has been delivered.

A lot of WordPress plugins, like Contact Form 7, are using a similar approach.

In this article, I will give you a step-by-step guide on how you can track these contact forms regardless.

Pre-step: install Google Tag Manager

Now, we are going to use Google Tag Manager (GTM) for this.

If you are not familiar with GTM yet, have a look at our introduction to Google Tag Manager article. We highly recommend to set this up for your website, as it will make tracking a lot easier going forward.

GTM also enables to set up additional tracking, like the one described in this article.

Once you installed GTM you can follow the next steps to track your contact forms.

Step 1: check your website code

Screenshot how to set up form tracking in GTM step 1

Go to the page where your contact form is located. On the button, press right click and click inspect. This will open a side screen if your working in Google Chrome.

Screenshot how to set up form tracking in GTM step 2

Now, you want to copy the part that is behind the class= tag. In this example that would be “gform_button button”.

Step 2: add custom variables to GTM

Next, we will need to add a custom variable to GTM.

Screenshot how to set up form tracking in GTM step 3

Go to the GTM container of your website and go to “Variables” in the left-hand menu.

Then, click configure and find “Click Classes” on the list and make sure “Click Classes” is enabled.

Step 3: Create a trigger in GTM

Go to “Triggers” in the left-hand menu and click New to add a new trigger.

Screenshot how to set up form tracking in GTM step 4

For Trigger Type select Click – All Elements. Then, fire this trigger for some clicks.

Lastly, select Click Classes contains whatever you copied from step 1.

Step 4: Create an Event Tag in GTM

Go to Tags in the left-hand menu and add a new tag.

Create an GA4 tag in Google Tag Manager.

Select Google Analytics: GA4 as the Tag Type.

Screenshot how to set up form tracking in GTM step 6

Then, select Event for the Track Type.

Basically, you can fill in anything you think would suit for the Event Name. I would recommend using Google’s standard naming conventions for this, as it will improve the reporting. In the case of lead generation, this would be generate_lead.

That’s it from the GTM end. Make sure you publish your changes!

Step 5: Add a goal in Google Analytics

Now, we will need to go to GA4 to make one final goal. You will need to get some data in Google Analytics, so I would recommend doing a test conversion first and wait until this data is populated within Google Analytics. You might have to wait 24 hours for this.

Once the data is in Google Analytics, all we need to do is mark this event as a conversion.

To do this, simply go to the Google Analytics admin area > Data display > Events.

Then, toggle the “mark as a conversion” on for the generate_lead event.

En voila you will be tracking your contact form even without a thank you page. Additionally, make sure you track your phone calls in Google Ads as well!

Form Tracking in GTM FAQ

Can I track conversions without having a thank-you page?

Yes, you can. The easiest way to do this is by installing Google Tag Manager on your website. This will make it easy to track certain button clicks on your website, which will allow you to track forms even if they don’t have a separate thank-you page.

How can I track Contact Form 7 in Google Analytics?

You can track leads from Contact Form 7 by setting up extra triggers in Google Tag Manager. By setting up an event in both GTM and Google Analytics you can make sure that your Contact Form 7 leads are being tracked as a goal within Google Analytics.

What do I need to do to set up form tracking in Google Analytics?

In most cases, you will have to set up additional triggers within Google Tag Manager. It’s easy, just follow the steps in our article.

Does Google Analytics automatically track my forms as a goal?

No. You will need to set up additional tracking and goals to make this work.

Share this:

By Jeroen

Having worked as a PPC freelancer for many years, Jeroen helps businesses to get more results out of their online advertising budgets.

He is the founder of Vazooky Digital, a Google Ads agency in Sydney, Australia.

10 replies on “Track Forms Without a Thank You Page in GTM [GA4 Update]”

HI Jeroen, thanks for the helpful post. Just a quick question: if the ‘Cateogory’ and ‘Action’ is different from GTM to GA, then will it track correctly?


Hi Andrew,

You have a few matching options within GA (eg. exact or regular expressions), but it will need to match with GTM in order for the tracking to work!

Hi Jeroen, these steps have been really helpful. I have managed to set up GTM well and have tested the triggers. However, nothing is showing up on Google Analytics. I set up the goal and matched details like category, value, action.. with what I put in GTM. It would be wonderful if you can help out with this. Thanks in advance!

Hi Jeroen,
Cool solution. Aren’t you worried you will over-report since some users will fill out the form wrong and will click multiple times on the “submit” button you are tracking?

Hi Jeroen,

Thanks for this very helpful article.

However, it doesn’t work on my end.

I followed step by step, but my GA goal is not recording any conversions (although I know we do have some submited forms).

The only thing I find confusinf in your article is that in STEP1, you copied “gform_button button” and in STEP3, you only pasted “gform_button”.

Is this intented or a mistake? Can you comment on this as this could be the reason of my failure?



Hi Patrick,

The settings from step 3 mention contains “gform_button”, so this will also track “gfrom_button button” from step 1. So this wouldn’t be the reason your goal tracking isn’t working.

Hard to say why you’re not seeing any conversions within GA. Perhaps there’s a filter set up in GA that filters out certain traffic (eg. your own IP)?

Either way, let me know if you need some more guidance.


We have multiple forms with the same class and we want to set up contact us page form submits. Have tried multiple combinations like click classes, click classes and page url/path, form classes, form classes and page url/path but nothing works. Can you please help, Jeroen?

Leave a Reply

Your email address will not be published. Required fields are marked *