How To Track Website Forms Using Google Tag Manager
29 January 2018
Share This Post
Time to Learn: 20 Minutes
Time to do: 5 Minutes
A contact page is a standard on almost every website on the net. By having one on your website, it gives the opportunity for your website visitors to communicate with you. There’s usually an email address of the business, a phone number, possibly a fax number and hopefully a contact form.
There are a few business advantages of having a contact form, a call back request form or any kind of form on a website. The main benefit is that of usability. With the majority of internet users now using mobile, a conveniently or strategically placed contact form will enable them to easily get in touch with you.
So you have a contact form or a few on your website. Great news. Now… you are receiving messages from them? It’s always good to test this every now and again – it’s amazing how many I have filled in only to be greeted with an error code.
Tracking a website form means you, as a business owner, marketer or salesperson, will be presented with data about your website visitors such as:
A nice chunk of valuable data huh, bet you wished you’d set this up sooner! So, without further waffle here’s how you can track website contact forms using Google Tag Manager.
Similarly to tracking text, email or button clicks using events in Google Tag Manager, you will need top-level access to the following accounts:
For this method of tracking to work you will need to ensure Google Analytics is being loaded with Google Tag Manager, i.e. GA tracking code is not on your website in raw code format.
You can tell whether it is or not by using our new trusted friend Google Tag Assistant (GTA). So head on over to your website and click on the GTA smiley icon. Click “Enable” and then refresh your website.
If you see a single Google Analytics result, you (or your developer) will need to remove this. You will then need to add the Tag Manager code in replacement of this and set up Google Analytics to load via GTM.
Before you start make sure you have Google Analytics set up on your Google Tag Manager.
First off, we need to find out how your website contact form loads i.e. when someone completes the form does it redirect to another page or does it load on the same page?
A. Load on the same page (the URL doesn’t change from pre to post form completion? – You will need to track the form using button click tracking.)
B. Redirect to another page (the URL changes) read on…
MAKE A NOTE OF THE URL THAT THE CONTACT FORM REDIRECTS TO. IT MAY LOOK SOMETHING LIKE:
In the sidebar select the “Triggers”, and New, then give your trigger a name, I’ve called it “Form Tracking”. Next, you will need to configure your trigger. You can do this by selecting the following options after you have clicked on the “Trigger Configuration” text
Your screen should then look something like this.
Looking good? Save and move on.
The last step in setting up your contact form tracking is set up a tag. This essentially tells GTM to “I want an event to be triggered when this action is made on my website and then to tell Google Analytics it has done.”
In the side area, click on the “Tags” and New. Then complete the following:
The testing process is exactly the same as if you were testing a button or email click. To find out how to do this and test your contact form you can pick this up from Step 4 here.