Home » Articles » Web Analytics » Google Tag Manager click tracking with GA4: Step-by-step tutorial

Google Tag Manager (GTM) gives you complete control over click tracking in GA4. Unlike GA4’s built-in Enhanced Measurement, GTM lets you track specific buttons, menu items, and custom elements while adding detailed information to each click event.

This method is perfect when you need to track specific interactions that matter to your business, like newsletter signups, product demos, or navigation menu clicks.

How to set up click tracking with Google Tag Manager

Enable click tracking in GTM

By default, Google Tag Manager doesn’t track any clicks. You need to create a click trigger first to enable the click tracking functionality.

  1. Go to your GTM container
  2. Click Triggers → New
  3. Choose trigger type: “Just Links” only tracks HTML link elements, while “All Elements” tracks any clickable element (buttons, images, divs)
  4. Name your trigger (like “All Link Clicks”)
  5. Keep settings as “All Link Clicks” or “All Element Clicks” for now
  6. Save the trigger

Enable click variables

Click variables capture information about the clicked element. You’ll need these to identify which specific elements were clicked.

Go to Variables → Configure (Built-in Variables section) and check Click Element, Click Classes, Click ID, Click Target, Click Text, and Click URL.

Test click tracking in Preview mode

Before creating tags, test that click tracking is working. Click Preview in GTM, go to your website in the same browser, click any link or button on your site, return to GTM Preview panel, and look for “Link Click” or “Click” events in the left sidebar.

If you don’t see these events, make sure you completed the previous steps correctly.

Create a GA4 event tag

Now create a tag that sends click data to GA4:

  1. Go to Tags → New → Tag Configuration
  2. Select Google Analytics → GA4 Event
  3. Set Measurement ID to your GA4 Measurement ID
  4. Set Event Name to a descriptive name like “menu_click” or “button_click”
  5. Add Event Parameters like click_text, click_url, and click_id using GTM variables
  6. Save the tag

Create specific triggers

Instead of tracking all clicks, create triggers for specific elements you want to monitor.

For tracking menu link clicks, edit your click trigger, change “This trigger fires on” to “Some Link Clicks”, add condition Click Classes contains “menu-link” (adjust based on your site’s CSS), save the trigger, and assign this trigger to your GA4 event tag.

For tracking a specific button, create a new “All Elements” trigger, set it to “Some Clicks”, add condition Click ID equals “signup-button” (use your button’s actual ID), save and assign to a GA4 event tag.

Test your setup

Enable GTM Preview mode, click the elements you’re tracking, verify tags fire in GTM Preview, check GA4 DebugView (Admin → DebugView) to see events arriving, and confirm event parameters contain the right information.

Set up custom dimensions in GA4

To see your custom click parameters in GA4 reports, register them as custom dimensions:

  1. Go to GA4 → Admin → Custom Definitions
  2. Click “Create Custom Dimensions”
  3. For each parameter, set Dimension name (how it appears in reports), Scope as “Event”, and Event parameter as exact parameter name
  4. Save each dimension

Custom dimensions take 24-48 hours to show data in GA4 reports.

Publish your container

When testing confirms everything works, click Submit in GTM, add a version name and description, and click Publish.

Common click tracking examples

For tracking navigation menu clicks, use trigger type Just Links, fire on Some Link Clicks, condition Click Classes contains “nav-link”, and event name “menu_click”.

For tracking CTA button clicks, use trigger type All Elements, fire on Some Clicks, condition Click Classes contains “cta-button”, and event name “cta_click”.

For tracking outbound link clicks, use trigger type Just Links, fire on Some Link Clicks, condition Click URL does not contain “yourdomain.com”, and event name “outbound_click”.

For tracking file download clicks, use trigger type Just Links, fire on Some Link Clicks, condition Click URL matches RegEx .(pdf|doc|docx|xls|xlsx)$, and event name “file_download”.

Conclusion

Google Tag Manager gives you powerful control over click tracking in GA4. You can track any clickable element, add custom information to events, and create detailed reports about user interactions.

Use GTM click tracking when you need to track specific buttons or menu items, add custom details to click events, monitor complex user interactions, or filter which clicks to track.

While GTM requires more setup than Enhanced Measurement, it provides much more detailed and actionable data for optimizing your website and understanding user behavior.

Wave

Enjoy our articles? Join our free list and get more.

Sign Up

Book a Discovery Call