Tracking through GTM

How to track clicks with Google Tag Manager

Share This Post

Difficulty: Easy
Time to Learn: 20 Minutes
Time to do: 5 Minutes

Text or button click tracking on a website will give you an insight into user behaviour. Many websites have contact forms that you can track to see which channels are driving you the best traffic, however, some website visitors may choose to contact you directly by email.

This guide will teach you how to set up a button or email click as a goal in Google Analytics by using Google Tag Manager. So let’s get started!

Before you start configuring your button click tracking, you will need top-level access to the following accounts:

  • Google Tag Manager
  • Google Analytics
  • Google Tag Assistant

Important! Google Analytics must be set up in Google Tag Manager for this to work.

How to track email text clicks

On occasions, website visitors instead of filling out a contact form, will want to contact the company or an individual team member and so they’ll usually do this by either calling them or emailing them. To email they will likely click on the “email” button or email address in their profile or on the contact page like below.

By tracking this button click via Google Tag Manager you will discover

  1. Which traffic source it came from i.e Organic, Direct, Referral, Social, Paid or other
  2. Whether there were more than 1 traffic sources involved in the whole customer journey to conversion
  3. Which website page they clicked the email text on
  4. What time and date the click was made

Google Tag Manager Set Up For Click Tracking

Step 1 – Activate Click Variables

First off, we need to activate the click variables in Google Tag Manager, since this variable if not set up as standard.

To do this, simply click on the “Variables” button on the left menu, then “Configure” and then scroll down to the “Clicks” and tick them all.

Step 2 – Set up a Trigger in Google Tag Manager

To set up a trigger in Google Tag Manager follow these three steps.

  1. Click on the Triggers tab on the left navigation bar
  2. Give the Trigger a name “Email Text Tracking”
  3. You will then be prompted to “Choose a Trigger Type. Select “All Elements”
  4. Select “Some Clicks” and from the first drop down select “Click Target”
  5. Select “Contains” and then enter “mailto”

Step 3 – Creating a tag for your trigger

Now you have your Trigger set up you will need to create a Tag for it so you can add it to the website and test.

  1. Click on the Tags button in the left-hand navigation
  2. Create a New tag by clicking on the red button
  3. Give your Tag a name
  4. The Tag type is “Universal Analytics”
  5. Click on the lego looking icon in the box and select your constant variable “Google Analytics”
  6. Type in the Category
  7. Type in the Action
  8. In the Label select “Page Path”
  9. Select “Google Analytics Settings” (if you haven’t set up GA yet, you will be able to here)
  10. Then below this screen select the TRIGGER you created in STEP 2
  11. Save

Step 4 – Testing your Trigger and Tag

Great! You are now ready to see if your Trigger and Tag have been set up properly and is working as it should.

To test your tag out, click on the arrow to the right of the PREVIEW button and then head over to your website and refresh the page, so you see the white “Debug” bar at the bottom. (If it does not appear you have not properly added your GTM code – speak with your developer)

Click on the “email” text button on your website and you will note that the GA Event you set up appears. All good? Head back to Tag Manager and PUBLISH (see image).

Didn’t appear? click on the variables (after you click on the text email) and see which settings you need to change. See below not many options are available but we can track the “Click Text”

Head back to GTM and change the click trigger type with the following settings:

If it doesn’t appear again you will have to go back and find where you went wrong.

This is the same process if you wanted to track any other button or text click that is an outbound link. For example, a link to an external website or social media profile.

Note: If you want to track all email text clicks across the whole website, then just include in the above Trigger Configuration.

Step 5 – Adding your email button click as a goal in Analytics

The final step you will need to do is to set up a goal in analytics. So head on over there and in Admin > Goals create a new one

Then set up the goal by…

  1. Selecting “Custom Goal”
  2. Give it a name (can match GTM Tag name)
  3. Copy the information over from GTM into the Category and Action fields
  4. Leave the Label and Value blank
  5. Give a value to the Event Goal (£50 for example)
  6. Save

There you have it, you will now be able to track website visitor email or text clicks. If this has been helpful or you need further help then please leave a comment below. Happy tracking everyone!

Looking for powerful SEO? Learn more about what we do here.

More To Explore


Changes to Marketing in 2022

In 2022, the marketing world is set to change. This blog will outline what these changes are expected to be and how they will affect

  • Do you want more traffic?

    Affordable Website Design is a streamlined website and marketing agency that helps you to create a hard working shop window with on point messaging to get you more customers.
    Tracking Website Conversions

    About Affordable Website Design Digital

    We’re Affordable Website Design Digital , an ambitious digital marketing agency based in Bristol. We specialise in PPC, Website design and SEO. We offer a connected, multi-channel marketing service tailored to every client we work with. We’re all about achieving growth for our clients. Our vision is to see all of our clients thrive. We strive to make them look like the best option, no matter what they do.

    Do you want more traffic?

    Affordable Website Design is a streamlined website and marketing agency that helps you to create a hard working shop window with on point messaging to get you more customers.