Not every click on your website is tied to a traditional link. Sometimes, buttons, icons, or other interactive elements are built in a way that standard link click triggers just won’t catch. That’s where the All Elements trigger comes in.
Think of it as your fallback when the Just Links trigger doesn’t cut it. All Elements gives you a much wider net—it listens for clicks on anything, not just hyperlinks. Whether it’s a styled div, a call-to-action button, or even a custom JavaScript element, this trigger ensures you’re not missing key interactions just because they weren’t coded as traditional links.
Here’s how it works: once enabled, GTM begins listening for any click across the page, no matter what type of element it lands on. These events show up in Preview Mode, giving you the info you need to isolate the exact component you’re interested in tracking.
So if you’ve tried tracking a button and nothing shows up using the Just Links trigger, don’t worry. Flip over to All Elements and you’ll almost certainly find it there.
From here, you can build a more specific trigger using element attributes like ID, classes, or even the button text itself. That way, you’re not just capturing everything, you’re capturing exactly what matters.
Creating Your All Elements Trigger in GTM
Tracking email clicks, or mailto links is a simple process in Google Tag Manager. It requires a catch all trigger and a little know how. Assuming you have a Google Tag Manager container to work within let’s get started:
1. Create a new All Elements Trigger
Go to your Tag Manager dashboard and click on the trigger section from the left side. From here you can create a new trigger, choosing the “All Elements” option for this exercise.

Name your trigger appropriately and save the trigger.
2. Enable built-in click variables
Now find your way to the variables tab. From here you want to configure the built-in variables. Built-in variables in Google Tag Manager are predefined pieces of information that GTM can automatically grab from your site as users interact with it. Think of them as shortcuts that help you track common things like the page URL, click text, form ID, or video title without having to write custom code. You just enable the ones you need, and GTM will start collecting that info behind the scenes, ready to be used in tags, triggers, and debug mode.

For this exercise we will enable click element, click classes, click ID and click URL.

Once done, click save then submit your changes in Google Tag Manager.
3. Preview the element you want to track
In most cases, the All Elements trigger is your go-to for tracking button clicks—but its flexibility goes well beyond that. It can also be used to capture interactions like image clicks, dead clicks (clicks that don’t lead anywhere), heading clicks, and more. In the example below, we’ll focus on tracking buttons and image clicks, since those are some of the most common and useful applications.
Open the preview mode in your Google Tag Manager dashboard and preview the site you are looking to track. Once here start clicking on the elements that you want to track.
In my case I want to track the “get started” button and this image on my home page.


In preview mode, I click both of these elements. Going back to the preview dashboard I can see two new click events. This is exactly what we want to see and expect to see after clicking on two different elements on the site.

4. Inspect the click event
Upon inspection of these events we can view the values of the built-in variables we enabled earlier. Starting first with the image click, this is what our variables output looks like:

Here we see the built in variables we enabled previously. These unique variables allow us to distinguish this click between other clicks that occur on the site. Perhaps the easiest and likely unique way in this circumstance would be to track the click classes, which in this scenario has a value of “uag-image-337”.
Not all circumstances allow for the click class variable, especially with buttons. We have found that it is not uncommon for buttons to have similar click classes, which can cause your tag to misfire. In the case of a button it is typically best suited to a click ID, click element, or click URL (more on link clicks here).

Now that we have inspected and found our unique variables for each of the click elements we want to track, copy those values and save them to your notepad or keep the preview tab open while we complete the next step.
5. Create your trigger
Now that we have the values from both of our click events, we can now build our triggers and tags. We’ll first want to head back to Tag Manager and create a new All Elements trigger. In both circumstances you want to match the variable to the value we found for each click. So for the image we want to choose the Click Classes variable, and for the button click we want to choose the Click ID variable.
The image trigger would look like this:

Highlighted here is the click class variable and the value that was directly copied from the Tag Manager preview mode.
For tracking our button click we are referring to the Click ID variable. For the value we copied the “GET STARTED” id from the GTM preview mode.

Now click save on your respective trigger and you’re all set! Now you can start adding your trigger to different tags in your account.
Tracking Email Clicks Using Google Tag Manager
While button and image click tracking gives you visibility into what’s being interacted with on your site, it only tells part of the story. That’s why we built Email Click Insights, a tool specifically designed to go beyond the click and uncover what happens after someone clicks an email link. With it, you can finally tie mailto interactions to sessions, sources, and user behavior helping you close the loop on your attribution and get a more complete view of your email-driven traffic.