GA4 Click Tracking with GTM: Buttons, Links and Debugging

Published:
Last Updated:
Category: Web Analytics
Authors: Shusaku Yosa
To measure clicks on internal links or buttons in GA4, use Google Tag Manager (GTM) to define the interaction and send a GA4 event when it occurs.
Some outbound links can already be measured through GA4 enhanced measurement. Check existing automatic tracking before adding a manual event so you can avoid unwanted duplication. This guide covers internal-link and button examples, testing, publication and troubleshooting.
Which clicks need extra configuration?
Interaction | Check first | Important distinction |
|---|---|---|
A normal link to another domain | Enhanced measurement for outbound clicks | Domains configured for cross-domain measurement are handled differently. |
A link within the same website | A custom event through GTM or another implementation | Clicking a link is different from viewing its destination. |
A button that opens a modal | An All Elements click trigger | A non-link button is not covered by Just Links. |
A telephone or email link | Explicitly test tel: or mailto: conditions | A click does not confirm a completed call or sent email. |
Seeing a GA4 event named click does not mean every click on the page is being measured. Enhanced measurement's outbound-click feature concerns navigation to another site. See the official outbound-click guide.
What to prepare before configuring the tag
- The site's installed GTM container and the permissions needed to edit and publish it.
- The destination GA4 property, web data stream and measurement ID beginning with G-.
- A working Google tag for the website.
- The specific link or button to measure and the question its data should answer.
GTM and GA4 permissions are separate. Viewing GA4 data does not imply that you can publish a GTM container. Our GA4 permissions guide explains access and sharing.
Check whether a CMS integration, another tag or page code already sends the intended event. Duplicating the base Google tag can affect more than clicks, so understand the existing implementation before adding configuration.
Track an internal link with GTM
This example sends a custom event named cta_click when someone clicks the following contact link. The ID and path are illustrative; replace them with values from your actual website.
<a id="contact-cta" href="/contact">Contact us</a>
1. Enable the relevant built-in click variables
In GTM, open Variables and configure the built-in variables you need, such as Click ID, Click URL, Click Text, Click Classes and Click Element.
Use Click ID to inspect an element's ID, Click URL for the destination and Click Element for the clicked element itself. Verify the actual values in Preview rather than assuming which one will be populated. Google's built-in variable reference describes them.
2. Create a Just Links trigger
- Open Triggers → New.
- Select Click – Just Links.
- Choose Some Link Clicks.
- Set the condition to Click ID equals contact-cta.
- Save it with a descriptive name, such as Link - Contact CTA.
Check that the ID is unique. If no suitable ID exists, consider another condition such as Click URL. Trailing slashes or query parameters can affect URL matching, so use values observed on the real page during testing.
3. Create the GA4 Event tag
Open Tags → New and choose Google Analytics: GA4 Event. Configure the destination measurement ID and event name, making sure they correspond to the intended Google tag and property.
Field | Example setting |
|---|---|
Tag name | GA4 - CTA Click - Contact |
Measurement ID | The intended property's G- ID |
Event name | cta_click |
Parameter: cta_name | contact |
Parameter: link_url | {{Click URL}} |
Trigger | Link - Contact CTA |
Follow an existing event-naming convention if your team has one. Check that any transmitted URL does not contain names, email addresses or other personal information, and avoid unnecessary parameters.
Google's GA4 event setup guide covers the tag-and-trigger workflow. Saving the workspace configuration does not publish it to the website; test it first.
Track buttons, telephone links and email links
Use All Elements for a button element
For a button that is not an HTML link, choose Click – All Elements. If the button contains a span or an icon, the clicked child may not carry the button's ID:
<button id="open-contact" type="button">
<span>Open the contact form</span></button>
For this example, choose Some Clicks and use Click Element with the matches CSS selector operator:
#open-contact, #open-contact *
This matches the button and its descendants. Test the label, whitespace and icon so each intended interaction produces one event. The official CSS selector documentation explains this operator.
Define telephone and email conditions explicitly
For a telephone link, consider a Just Links trigger where Click URL starts with tel:. For email links, use mailto:. Choose an appropriate event name and test the trigger and transmission on a relevant device.
Clicking a telephone link does not prove the call connected. Opening an email application does not prove a message was sent. Treat these as intermediate interactions unless a separate measurement confirms the final outcome.
Validate with Tag Assistant and DebugView
- Open GTM Preview and connect the target site to Tag Assistant.
- Click the target once and select the corresponding click event.
- Inspect Variables and compare Click ID or Click URL with the trigger conditions.
- Check Tags Fired for the intended GA4 Event tag.
- In GA4 DebugView, select the relevant debug device and verify the received event and parameters.
- Test that unrelated links do not trigger the event and that one interaction is not recorded twice.
- Document the change, publish GTM and check the live implementation again.
Tags Fired shows execution in GTM; it does not, by itself, confirm receipt in GA4. If DebugView shows nothing, check the device, measurement ID, consent settings and browser restrictions. Consult the official DebugView documentation.
Standard reports may take time to update. First establish that the event is sent and received in the debugging tools. Do not add another identical tag simply because a normal report has not yet changed.
Troubleshoot missing or duplicated clicks
Symptom | What to inspect |
|---|---|
No click event appears. | GTM installation, trigger type, page scope and consent state. |
A click appears, but the tag does not fire. | The actual Click ID or URL compared with the trigger conditions. |
Clicking the button's text does not work. | Whether a child element receives the click; test the selector. |
The tag fires, but GA4 receives nothing. | Measurement ID, Google tag, consent or blocking, and the selected debug device. |
One click produces two identical events. | Multiple tags, hard-coded events or duplicate GTM installation. |
Outbound clicks seem unexpectedly high. | Whether enhanced-measurement click and a custom event are being added together. |
A design may intentionally send one click event and one cta_click event for the same action. Keep their purposes separate and do not sum them as if they were distinct actions. If the same event name is duplicated unintentionally, identify each sender before removing anything.
Avoid disabling all automatic measurement to solve one overlap. First determine exactly which event and interaction are duplicated.
Use click data in reports and website improvements
In GA4, filter to cta_click and inspect event counts. If you want to use the custom cta_name parameter in reports or explorations, consider registering it as an event-scoped custom dimension. Registration does not retroactively apply to earlier data, so plan the reporting requirement alongside collection.
A click toward a contact form is not a completed inquiry. If successful submission is the goal, measure a confirmed completion as well. This lets you examine the sequence from article reading to form access to successful submission.
Compare clicks with article readership and relevant user counts. A person may click more than once, so distinguish events from people. Our guide to planned navigation and actual user paths explains how to turn those observations into improvements.
Official information reviewed: September 22, 2026.




