How to Track Button Clicks with GTM
Enable Click Variables in GTM (Variables > Configure > enable Click Element, Click Classes, Click ID, Click URL, Click Text). Create a Click trigger: Trigger Type = 'All Elements' or 'Just Links,' filter by Click Text, Click ID, Click Classes, or CSS Selector to target your specific button. Create a
Quick Summary
Enable Click Variables in GTM (Variables > Configure > enable Click Element, Click Classes, Click ID, Click URL, Click Text). Create a Click trigger: Trigger Type = 'All Elements' or 'Just Links,' filter by Click Text, Click ID, Click Classes, or CSS Selector to target your specific button. Create a GA4 Event tag with a descriptive event name (e.g., 'cta_button_click') and parameters (button_text, page_url). Test in Preview Mode — click the button and verify the tag fires with correct parameters.
Overview
Enable Click Variables in GTM (Variables > Configure > enable Click Element, Click Classes, Click ID, Click URL, Click Text). Create a Click trigger: Trigger Type = 'All Elements' or 'Just Links,' filter by Click Text, Click ID, Click Classes, or CSS Selector to target your specific button. Create a GA4 Event tag with a descriptive event name (e.g., 'cta_button_click') and parameters (button_text, page_url). Test in Preview Mode — click the button and verify the tag fires with correct parameters.
Related Guides
See our complete guide library for detailed coverage of setup, tracking, analysis, and optimisation across all platforms.
Process Flow
Interactive diagram — drag to pan, scroll to zoom
Step-by-Step Guide
Follow these 3 steps to complete this guide
Step-by-Step Setup
Best Practices
Common Issues and Solutions
Frequently Asked Questions
Common questions about this topic
Was this guide helpful?
Your feedback helps us improve our guides