How To Track Button Clicks with Google Tag Manager and Google Analytics 4

  • Post author:
  • Post category:SEO / OnPage SEO
  • Post last modified:December 20, 2023

Businesses can gain significant information from button clicks. They can assist you in tracking how users interact with your website or app, as well as measuring the success of your marketing activities.

We’ll show you how to track button clicks with Google Tag Manager and Google Analytics 4 in this blog post.

What are button clicks?

A button click is an event that occurs when a user clicks on a button on your website or app. This could be a call to action button, a navigation button, or any other type of button.

Why track button clicks?

There are several reasons why you might want to track button clicks. For example, you could track button clicks to:

  • Understand how users interact with your website or app.
  • Measure the success of your marketing campaigns.
  • Track the performance of different button designs.
  • Identify which buttons are most effective at driving conversions.

Installing Google Tag Manager and GA4

– To track button clicks, you need to have Google Tag Manager installed on your website.
– You also need to have GA4 set up in your GTM container.
– The speaker provides tutorials on how to install GTM and GA4 in the video description.

Setting Up Click Tracking in GTM

– By default, GTM does not enable click tracking features.
– To enable click tracking, go to Triggers > Click > New > Trigger Configuration > All Element Clicks.
– Make sure that click variables such as click ID and click classes are enabled in Variables.
– Use the click ID variable to make the trigger more specific for tracking only certain button clicks.

Sending Click Information to GA4

– Create a new tag configuration for GA4 event.
– Select your existing GA4 configuration tag and enter an event name (e.g. CTA).
– Add an additional parameter called link text using the recommended parameter from GA4.
– Insert the variable that returns the text of a button (click text) into link text parameter.

Tracking button clicks is important for understanding user engagement on a website. By following these steps, you can use GTM and GA4 to track button clicks and gain insights into user behavior.

Testing and Publishing Call to Action Button Tracking with Google Analytics 4

Testing the Event in Google Analytics 4

– Click “Save” and test everything by clicking “Preview”.
– Refresh the preview mode by clicking “Preview” again.
– Click “Continue”, then go to the website and click the button being tracked.
– Go to the preview of Google Tag Manager, click on the event, and verify that it has fired successfully.
– Click on the event to see what information was sent and to which property.
– Go to Google Analytics 4, configure debug view, and find the event in the stream.
– Expand link text to see which button was clicked.

Publishing Changes

– Once you have verified that everything is working properly, click “Submit”.
– Add a version name like “Call-to-action Button Tracking with GA4” and click “Publish”.
– The tracking will now be live for all website visitors.
– After 24 hours, check engagement events in GA4 reports to see if your event was received properly.

Building a Custom Report

– To track multiple call-to-action buttons with different texts, build a custom report in GA4.
– Go to Analytics > Explore > Select Blank.
– Add dimensions such as event name and link text.
– Import link text parameter from events list.
– Add metrics such as total users or select event count.
– Import selected metrics.
– Drag link text dimension into rows.
– Drag event count into values.

Narrowing Down Events for Custom Reports

To exclude other events without link text value:

1. Create a filter
2. Select event name
3. Enter the name of the button click event that matches your event
4. Click “Apply

– The report will now be narrowed down to only those particular events.
– You can see how many times each button was clicked with different texts.

Tracking Menu Link Clicks

– To track menu link clicks, use a similar process as for call-to-action buttons.
– Create an event and enter its name in the filter instead of the call-to-action button’s name.


Tracking button clicks is a valuable way to understand how users interact with your website or app. By tracking button clicks, you can measure the success of your marketing campaigns, track the performance of different button designs, and identify which buttons are most effective at driving conversions.

I hope this blog post has helped you learn how to track button clicks with Google Tag Manager and Google Analytics 4. If you have any questions, please leave a comment below.


My Name is Ajay, I have 10 Yrs Hands-on experience - 15+ millions visits/Month from Google. Good at scaling SEO traffic from Zero to Millions using all white hat proven SEO methods. Acquired 1 million visits from organic through Google in less than 15 months. I have an extensive knowledge about Google algorithms that how they and work and which sites will get penalised etc.