{"id":4886,"date":"2023-06-02T17:18:03","date_gmt":"2023-06-02T11:48:03","guid":{"rendered":"https:\/\/easyinsights.ai\/blog\/?p=4886"},"modified":"2025-04-17T11:38:50","modified_gmt":"2025-04-17T06:08:50","slug":"how-to-set-up-ga4-button-click-event-tracking-with-gtm","status":"publish","type":"post","link":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/","title":{"rendered":"Setting Up GA4 Button Click Event Tracking with GTM"},"content":{"rendered":"<span class=\"span-reading-time rt-reading-time\" style=\"display: block;\"><span class=\"rt-label rt-prefix\">Reading Time: <\/span> <span class=\"rt-time\"> 8<\/span> <span class=\"rt-label rt-postfix\">minutes<\/span><\/span>\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"536\" src=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-1024x536.png\" alt=\"How to Set Up GA4 Button Click Event Tracking with GTM\" class=\"wp-image-4896\" srcset=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-1024x536.png 1024w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-300x157.png 300w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-768x402.png 768w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-940x492.png 940w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-345x181.png 345w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-525x275.png 525w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-720x377.png 720w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-626x328.png 626w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-298x156.png 298w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-455x238.png 455w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-625x327.png 625w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-508x266.png 508w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-764x400.png 764w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-340x178.png 340w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-293x153.png 293w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-267x140.png 267w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-195x102.png 195w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-50x26.png 50w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-60x31.png 60w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Button click tracking is a valuable way to gather data every time a significant button on your website is clicked. This guide will take you through the process of setting up GA4 button click tracking with GTM.&nbsp;<\/p>\n\n\n\n<p>Tracking button clicks is a crucial component of establishing a Google Analytics measurement ecosystem. While GA4&#8217;s built-in enhanced measurement events can track many interactions, button clicks typically require a custom event.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 ez-toc-wrap-center counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Jump ahead to:<\/p>\n<span class=\"ez-toc-title-toggle\"><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Why_Should_You_Be_Tracking_Button_Clicks\" >Why Should You Be Tracking Button Clicks?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Is_button_click_tracking_an_automatic_feature_in_GA4\" >Is button click tracking an automatic feature in GA4?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Why_is_Tag_Manager_Required_to_Track_Button_Clicks_in_GA4\" >Why is Tag Manager Required to Track Button Clicks in GA4?<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Steps_to_enable_Button_Click_Tracking_%E2%80%93\" >Steps to enable Button Click Tracking &#8211;&nbsp;<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Tracking_Button_Click_Events_Using_a_Link_Click_Trigger\" >Tracking Button Click Events Using a Link Click Trigger&nbsp;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Tracking_Button_Click_Events_Using_Click_Classes\" >Tracking Button Click Events Using Click Classes&nbsp;<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Tracking_the_Inside_of_the_Button_Click_using_Click_Class\" >Tracking the Inside of the Button Click using Click Class<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Tracking_the_Outside_of_the_Button_Click_using_Click_Class\" >Tracking the Outside of the Button Click using Click Class<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Creating_the_Button_Click_Custom_Event_in_GA4\" >Creating the Button Click Custom Event in GA4<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Step_1_%E2%80%93_Setting_Up_Tag_Configuration\" >Step 1 &#8211; Setting Up Tag Configuration<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Step_2_%E2%80%93_Adding_Triggers_that_Fire_the_Tag\" >Step 2 &#8211; Adding Triggers that Fire the Tag<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Configuring_Built-in_Variables_in_Google_Tag_Manager\" >Configuring Built-in Variables in Google Tag Manager<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#Wrapping_Up\" >Wrapping Up<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"#\" data-href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#About_EasyInsights\" >About EasyInsights<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Should_You_Be_Tracking_Button_Clicks\"><\/span><strong>Why Should You Be Tracking Button Clicks?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are at least two compelling reasons for tracking button clicks &#8211;<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Firstly, it helps you understand where visitors are clicking on the site, which may reveal areas where they are confused or trying to interact with non-clickable elements like images. This data can also assist in configuring internal links to enhance user experience.&nbsp;<\/li><li>Secondly, tracking button clicks can measure how visitors engage with significant buttons that correspond to your conversion actions.&nbsp;<\/li><\/ul>\n\n\n\n<p>In this blog, we will focus on how to set up button click tracking on the website, when users click on the YouTube subscribe button for a channel<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Is_button_click_tracking_an_automatic_feature_in_GA4\"><\/span><strong>Is button click tracking an automatic feature in GA4?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>GA4 tracks button clicks for clicks on outbound links and file downloads. The tracking is enabled via enhanced measurement events. <strong>However, when it comes to tracking button clicks that lead to another page on your domain or those that do not have a link destination,&nbsp; there is no built-in solution in GA4.<\/strong><\/p>\n\n\n\n<p>For this purpose, you will <strong>need the Google Tag Manager to create a GA4 custom event tag<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_is_Tag_Manager_Required_to_Track_Button_Clicks_in_GA4\"><\/span><strong>Why is Tag Manager Required to Track Button Clicks in GA4?<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Many custom events in GA4 can be created without the assistance of Google Tag Manager. However, in order to track button click events, creating a GA4 event tag is typically required. You have to create an event in GTM, and pair it with its pertinent trigger<\/p>\n\n\n\n<p>Following are the steps involved in the process &#8211;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Steps_to_enable_Button_Click_Tracking_%E2%80%93\"><\/span><strong>Steps to enable Button Click Tracking &#8211;&nbsp;<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>Ensure the <strong>Google Tag Manager Container code is installed on your website<\/strong>, and the GA4 Configuration Tag is up and active.<\/li><li>Configure the built-in click variables<\/li><li>Now you have to create the button click trigger wherein you specify the user actions\/conditions you wish to track. The way you set up the trigger will depend on the specific button and your site&#8217;s setup. Herein, we will use a<strong> link click trigger <\/strong>(that uses the destination URL of the button click). We can also use an <strong>all clicks element trigger<\/strong> (that uses click classes of the button you want to track).<\/li><li>Now, <strong>create a GA4 event tag<\/strong> with an event name that will show up in your GA4 reports.<\/li><li>If you want to send additional data with your button click event, you can <strong>set one or more event parameters.<\/strong> Here, we will send in the click text of the button that you\u2019re tracking.<\/li><li>Pair the GA4 button click event tag with the corresponding button click trigger.<\/li><li>After testing to confirm everything works correctly, <strong>publish the GTM container<\/strong> which will make your tag and trigger live.<\/li><\/ol>\n\n\n\n<p class=\"has-text-color has-background\" style=\"background-color:#e2dff4;color:#2c01ca\">Whichever event parameters you have set in your custom event in GTM, ensure you have registered those custom dimensions in GA4 as well. This is required so that all the data captured by the tag is accessible for reporting in GA4.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Tracking_Button_Click_Events_Using_a_Link_Click_Trigger\"><\/span><strong>Tracking Button Click Events Using a Link Click Trigger&nbsp;<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>With the link click trigger,<strong> specify the trigger condition as the click destination URL of the button you want to track.<\/strong> For this purpose, create a new trigger in GTM and select the <strong>Just Links<\/strong> trigger type.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"875\" height=\"662\" src=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1.png\" alt=\"Tracking button click GA4\" class=\"wp-image-4888\" srcset=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1.png 875w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-300x227.png 300w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-768x581.png 768w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-674x510.png 674w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-247x187.png 247w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-375x284.png 375w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-515x390.png 515w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-448x339.png 448w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-206x156.png 206w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-315x238.png 315w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-432x327.png 432w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-352x266.png 352w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-529x400.png 529w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-410x310.png 410w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-305x231.png 305w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-263x199.png 263w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-267x202.png 267w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-195x149.png 195w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-345x261.png 345w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-50x38.png 50w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1-60x45.png 60w\" sizes=\"(max-width: 875px) 100vw, 875px\" \/><\/figure>\n\n\n\n<p>You will now see the screen shown below. Here, configure the trigger to fire on &#8220;Some link clicks&#8221; and <strong>specify the condition to fire only on the destination URL of the button click.<\/strong>&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"505\" src=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-1024x505.png\" alt=\"button click tracking GA4\" class=\"wp-image-4890\" srcset=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-1024x505.png 1024w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-300x148.png 300w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-768x379.png 768w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-940x464.png 940w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-345x170.png 345w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-525x259.png 525w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-720x355.png 720w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-626x309.png 626w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-316x156.png 316w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-482x238.png 482w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-663x327.png 663w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-539x266.png 539w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-811x400.png 811w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-455x224.png 455w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-340x168.png 340w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-293x145.png 293w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-267x132.png 267w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-195x96.png 195w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-50x25.png 50w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3-60x30.png 60w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-3.png 1202w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"has-text-color has-background\" style=\"background-color:#e2dff4;color:#2c01ca\"><strong>It&#8217;s important to note that this method will work only if the button click leads to a specific destination URL. If there are other ways to reach the same destination URL, this trigger will be activated each and every time, a link to that destination is clicked. Therefore, this trigger is suitable for tracking a button only if it&#8217;s the sole means of reaching the destination from the site, as in the example of tracking a subscription button for a YouTube channel.<\/strong><\/p>\n\n\n\n<p>Therefore, it makes sense to explore alternate methods for setting up a button click event.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Tracking_Button_Click_Events_Using_Click_Classes\"><\/span><strong>Tracking Button Click Events Using Click Classes&nbsp;<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Click Class refers to the value of the class attribute of the HTML element that was clicked. By using click classes in the trigger, we can track the button click <strong><em>event associated with a particular button.<\/em><\/strong>&nbsp;<\/p>\n\n\n\n<p>It stands to reason that there will be multiple click classes that needs to be managed in button click trigger. In the case of the <em>Subscribe to YouTube button<\/em>, one click class will control the inside of the button, where the button title is located, while another click class will control the outside of the button click.<\/p>\n\n\n\n<p>We will need to set up two separate triggers to track this button <strong>using Click Classes with the All Elements click trigger.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"404\" src=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-1024x404.png\" alt=\"button clicks infographic\" class=\"wp-image-4895\" srcset=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-1024x404.png 1024w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-300x118.png 300w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-768x303.png 768w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-1536x605.png 1536w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-940x371.png 940w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-345x136.png 345w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-525x207.png 525w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-720x284.png 720w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-626x247.png 626w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-586x231.png 586w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-880x347.png 880w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-455x179.png 455w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-340x134.png 340w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-293x115.png 293w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-267x105.png 267w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-195x77.png 195w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-50x20.png 50w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic-60x24.png 60w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/button-clicks-infographic.png 1682w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Tracking_the_Inside_of_the_Button_Click_using_Click_Class\"><\/span><strong>Tracking the Inside of the Button Click using Click Class<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"423\" src=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-1024x423.png\" alt=\"Tracking the Inside of the Button Click using Click Class\" class=\"wp-image-4889\" srcset=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-1024x423.png 1024w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-300x124.png 300w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-768x317.png 768w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-940x389.png 940w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-345x143.png 345w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-525x217.png 525w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-720x298.png 720w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-626x259.png 626w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-586x242.png 586w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-880x364.png 880w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-455x188.png 455w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-340x141.png 340w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-293x121.png 293w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-267x110.png 267w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-195x81.png 195w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-50x21.png 50w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2-60x25.png 60w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-2.png 1200w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>When choosing the trigger type, this time select the <strong>All Elements trigger which will enable click classes<\/strong>. The screen shown below will appear.<\/p>\n\n\n\n<p>This trigger will fire on <strong>Some Clicks where the Click Class is equal to &#8220;avia_iconbox_title&#8221;<\/strong>.&nbsp;<\/p>\n\n\n\n<p><strong>Pro-Tip<\/strong><\/p>\n\n\n\n<p class=\"has-text-color has-background\" style=\"background-color:#e2dff4;color:#2c01ca\">How to use Preview and Debug in GTM to view variables\u2019 output during target click events?<\/p>\n\n\n\n<p class=\"has-text-color has-background\" style=\"background-color:#e2dff4;color:#2c01ca\">To understand why we have set Click Class as \u201cavai_iconbox_title\u201d, we use the Preview and Debug mode to see the output generated by variables when the target click occurs. These are the steps you need to follow &#8211;&nbsp;<\/p>\n\n\n\n<ol class=\"has-text-color has-background wp-block-list\" style=\"background-color:#e2dff4;color:#2c01ca\"><li>Open the Google Tag Manager container for the website you want to track.<\/li><li>Click the Preview button in the top right corner of the screen.<\/li><li>Visit the website in a new tab.<\/li><li>Click on the element you want to track.<\/li><li>The Variables pane will show you a list of the Variables that were output when you clicked on the element.<\/li><\/ol>\n\n\n\n<p class=\"has-text-color has-background\" style=\"background-color:#e2dff4;color:#2c01ca\">You can now use the Click Class Variable to create a trigger that fires when a button with a specific class is clicked.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Tracking_the_Outside_of_the_Button_Click_using_Click_Class\"><\/span><strong>Tracking the Outside of the Button Click using Click Class<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>To account for clicks outside the button, a secondary trigger is necessary. This trigger captures all outside button clicks. Consider the screen below &#8211; Everything quill be the same as above (inside click) except the trigger will be fired upon detecting clicks with the Click Class attribute containing &#8220;avia_button&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"424\" src=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1024x424.png\" alt=\"Tracking the Outside of the Button Click using Click Class\" class=\"wp-image-4887\" srcset=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-1024x424.png 1024w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-300x124.png 300w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-768x318.png 768w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-940x390.png 940w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-345x143.png 345w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-525x218.png 525w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-720x298.png 720w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-626x259.png 626w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-586x243.png 586w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-880x365.png 880w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-455x189.png 455w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-340x141.png 340w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-293x121.png 293w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-267x111.png 267w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-195x81.png 195w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-50x21.png 50w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-60x25.png 60w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image.png 1197w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>If you opt to employ the Click Class approach for configuring your button click trigger, it is essential to incorporate both triggers within your corresponding GA4 button click tag. Now, let&#8217;s examine the details of that tag.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Creating_the_Button_Click_Custom_Event_in_GA4\"><\/span><strong>Creating the Button Click Custom Event in GA4<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_1_%E2%80%93_Setting_Up_Tag_Configuration\"><\/span><strong>Step 1 &#8211; Setting Up Tag Configuration<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>After the triggers have been created, it&#8217;s now time to create the tag. Go to the New Tag option in your container, and in the tag configuration section, <strong>choose GA4 Event as the tag type<\/strong>.<\/li><li>The Event Name given here is what will be reflected in your GA4 data. The best practice is to keep this name as direct and concise as possible, and separated by underscores.<\/li><li>The Event Parameter click_text with value {{Click Text}} will send you the name\/text of the button that is clicked, which is necessary. But remember, you have to create a corresponding custom dimension in GA4 for this event parameter in order to capture the tracking data for reporting purposes<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"468\" src=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-1024x468.png\" alt=\"Setting Up Tag Configuration\" class=\"wp-image-4891\" srcset=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-1024x468.png 1024w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-300x137.png 300w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-768x351.png 768w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-940x430.png 940w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-345x158.png 345w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-525x240.png 525w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-720x329.png 720w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-626x286.png 626w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-341x156.png 341w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-520x238.png 520w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-715x327.png 715w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-582x266.png 582w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-875x400.png 875w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-455x208.png 455w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-340x156.png 340w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-293x134.png 293w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-267x122.png 267w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-195x89.png 195w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-50x23.png 50w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4-60x27.png 60w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-4.png 1185w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>The same event name is reflected in the GA4 report.To access your events in GA4, <strong>navigate to Engagement reports<\/strong> and <strong>then select Events<\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Step_2_%E2%80%93_Adding_Triggers_that_Fire_the_Tag\"><\/span><strong>Step 2 &#8211; Adding Triggers that Fire the Tag<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h3>\n\n\n\n<p>The trigger&#8217;s role is to detect a significant action, such as a button click. On the other hand, the tag is responsible for transmitting data to GA4 when the trigger is activated. Each component alone is insufficient, but when combined, they form a potent custom button click event that yields valuable data.<\/p>\n\n\n\n<p>Below, you&#8217;ll find the button click event tag seamlessly linked with both triggers: one for inside button clicks and another for outside button clicks. However, if you opt for the link click trigger instead, only that specific trigger will be shown in this pairing.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"754\" src=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-1024x754.png\" alt=\"Adding Triggers that Fire the Tag\" class=\"wp-image-4894\" srcset=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-1024x754.png 1024w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-300x221.png 300w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-768x565.png 768w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-693x510.png 693w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-254x187.png 254w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-386x284.png 386w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-530x390.png 530w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-461x339.png 461w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-212x156.png 212w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-323x238.png 323w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-444x327.png 444w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-361x266.png 361w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-544x400.png 544w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-421x310.png 421w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-314x231.png 314w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-270x199.png 270w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-267x196.png 267w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-195x144.png 195w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-345x254.png 345w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-50x37.png 50w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7-60x44.png 60w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-7.png 1117w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Configuring_Built-in_Variables_in_Google_Tag_Manager\"><\/span><strong>Configuring Built-in Variables in Google Tag Manager<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"has-text-color has-background\" style=\"background-color:#e2dff4;color:#2c01ca\">Here\u2019s what Google says from their <a href=\"https:\/\/support.google.com\/tagmanager\/answer\/7683056?hl=en\">support article<\/a>:<\/p>\n\n\n\n<p class=\"has-text-color has-background\" style=\"background-color:#e2dff4;color:#2c01ca\">Variables in Google Tag Manager are named placeholders for values that are populated when code is run on your website or mobile app. For example, the Tag Manager variable named \u201cPage URL\u201d returns the current web page URL.<\/p>\n\n\n\n<p class=\"has-text-color has-background\" style=\"background-color:#e2dff4;color:#2c01ca\">Herein, there are two options for the variables used in triggers: either the &#8216;Click URL&#8217; variable or the &#8216;Click Classes&#8217; variable. Also, if we set an event parameter when setting up the tag, we utilize the &#8216;Click Text&#8217; variable. These three variables are visible in the list provided below. To enable these variables, just toggle on the relevant checkboxes.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"710\" height=\"590\" src=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5.png\" alt=\"Configuring Built-in Variables in Google Tag Manager\" class=\"wp-image-4892\" srcset=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5.png 710w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-300x249.png 300w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-614x510.png 614w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-225x187.png 225w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-342x284.png 342w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-469x390.png 469w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-408x339.png 408w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-188x156.png 188w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-286x238.png 286w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-394x327.png 394w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-320x266.png 320w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-481x400.png 481w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-373x310.png 373w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-278x231.png 278w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-239x199.png 239w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-247x205.png 247w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-179x149.png 179w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-318x264.png 318w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-50x42.png 50w, https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/image-5-60x50.png 60w\" sizes=\"(max-width: 710px) 100vw, 710px\" \/><\/figure>\n\n\n\n<p>Therefore, it&#8217;s crucial that this configuration step is completed. You can verify by <strong>navigating to Variables<\/strong> in the left-hand navigation menu of GTM, <strong>selecting Built-In Variables,<\/strong> and enabling any necessary variables.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Wrapping_Up\"><\/span><strong>Wrapping Up<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>After confirming that your GA4 event tag is functioning correctly, proceed to test it in Google Tag Manager&#8217;s Preview Mode. Once you are satisfied with the results, publish the container.<\/p>\n\n\n\n<p>For those who are still in the process of migrating from UA to GA4,&nbsp; I suggest taking a look at this ebook that will make your transition smooth.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"About_EasyInsights\"><\/span><strong>About EasyInsights<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>EasyInsights is a comprehensive marketing analytics tool that provides end-to-end data extraction and aggregation from various marketing platforms. It generates detailed reports that offer a granular perspective of your brand\u2019s overall marketing performance. The tool can efficiently import and combine data from multiple platforms, including Google Ads, Google Analytics, Facebook Ads, CRM tools, and Search Console.<\/p>\n\n\n\n<p><a href=\"https:\/\/easyinsights.ai\/blog\/easyinsights-a-better-alternative-to-supermetrics\/#EasyInsights\"><strong>Additional Reading \u2013<\/strong><strong> What makes EasyInsights, the next-gen marketing platform<\/strong><\/a><\/p>\n\n\n\n<p>To start, <strong><a href=\"https:\/\/easyinsights.ai\/book-demo\/\">request a free dashboard setup.<\/a> <\/strong>Our team will contact you to walk you through the process. Visit <strong><a href=\"https:\/\/easyinsights.ai\/\">EasyInsights<\/a> <\/strong>to learn more about our offerings.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Button click tracking is a valuable way to gather data every time a significant button on your website&hellip;<\/p>\n","protected":false},"author":6,"featured_media":4896,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[158],"tags":[94,209,93],"class_list":["post-4886","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-analytic-platform","tag-ga4","tag-ga4-reports","tag-google-analytics"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.3.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>A Guide to Set Up GA4 Button Click Event Tracking with GTM<\/title>\n<meta name=\"description\" content=\"Learn to set up GA4 button click tracking with GTM for valuable data insights every time a significant button is clicked on your website\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"A Guide to Set Up GA4 Button Click Event Tracking with GTM\" \/>\n<meta property=\"og:description\" content=\"Learn to set up GA4 button click tracking with GTM for valuable data insights every time a significant button is clicked on your website\" \/>\n<meta property=\"og:url\" content=\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/\" \/>\n<meta property=\"og:site_name\" content=\"EasyInsights\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/EasyInsightsai-522100504893809\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-02T11:48:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-17T06:08:50+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Piyush Gupta\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@easy_insights\" \/>\n<meta name=\"twitter:site\" content=\"@easy_insights\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Piyush Gupta\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/\"},\"author\":{\"name\":\"Piyush Gupta\",\"@id\":\"https:\/\/easyinsights.ai\/blog\/#\/schema\/person\/dd83bf4d1b4aad23688bb459fedf62d4\"},\"headline\":\"Setting Up GA4 Button Click Event Tracking with GTM\",\"datePublished\":\"2023-06-02T11:48:03+00:00\",\"dateModified\":\"2025-04-17T06:08:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/\"},\"wordCount\":1716,\"publisher\":{\"@id\":\"https:\/\/easyinsights.ai\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png\",\"keywords\":[\"GA4\",\"GA4 Reports\",\"google analytics\"],\"articleSection\":[\"Analytic Platform\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/\",\"url\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/\",\"name\":\"A Guide to Set Up GA4 Button Click Event Tracking with GTM\",\"isPartOf\":{\"@id\":\"https:\/\/easyinsights.ai\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png\",\"datePublished\":\"2023-06-02T11:48:03+00:00\",\"dateModified\":\"2025-04-17T06:08:50+00:00\",\"description\":\"Learn to set up GA4 button click tracking with GTM for valuable data insights every time a significant button is clicked on your website\",\"breadcrumb\":{\"@id\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#primaryimage\",\"url\":\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png\",\"contentUrl\":\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png\",\"width\":1200,\"height\":628,\"caption\":\"1200x628\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/easyinsights.ai\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting Up GA4 Button Click Event Tracking with GTM\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/easyinsights.ai\/blog\/#website\",\"url\":\"https:\/\/easyinsights.ai\/blog\/\",\"name\":\"EasyInsights\",\"description\":\"Uncover Growth in Digital Marketing Data\",\"publisher\":{\"@id\":\"https:\/\/easyinsights.ai\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/easyinsights.ai\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/easyinsights.ai\/blog\/#organization\",\"name\":\"Easyinsights\",\"url\":\"https:\/\/easyinsights.ai\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/easyinsights.ai\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2022\/11\/easyinisghts_logo.png\",\"contentUrl\":\"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2022\/11\/easyinisghts_logo.png\",\"width\":649,\"height\":117,\"caption\":\"Easyinsights\"},\"image\":{\"@id\":\"https:\/\/easyinsights.ai\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/EasyInsightsai-522100504893809\",\"https:\/\/x.com\/easy_insights\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/easyinsights.ai\/blog\/#\/schema\/person\/dd83bf4d1b4aad23688bb459fedf62d4\",\"name\":\"Piyush Gupta\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/easyinsights.ai\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7ea55084ee665a8e40648a7afe3dcac4?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7ea55084ee665a8e40648a7afe3dcac4?s=96&d=mm&r=g\",\"caption\":\"Piyush Gupta\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"A Guide to Set Up GA4 Button Click Event Tracking with GTM","description":"Learn to set up GA4 button click tracking with GTM for valuable data insights every time a significant button is clicked on your website","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/","og_locale":"en_US","og_type":"article","og_title":"A Guide to Set Up GA4 Button Click Event Tracking with GTM","og_description":"Learn to set up GA4 button click tracking with GTM for valuable data insights every time a significant button is clicked on your website","og_url":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/","og_site_name":"EasyInsights","article_publisher":"https:\/\/www.facebook.com\/EasyInsightsai-522100504893809","article_published_time":"2023-06-02T11:48:03+00:00","article_modified_time":"2025-04-17T06:08:50+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png","type":"image\/png"}],"author":"Piyush Gupta","twitter_card":"summary_large_image","twitter_creator":"@easy_insights","twitter_site":"@easy_insights","twitter_misc":{"Written by":"Piyush Gupta","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#article","isPartOf":{"@id":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/"},"author":{"name":"Piyush Gupta","@id":"https:\/\/easyinsights.ai\/blog\/#\/schema\/person\/dd83bf4d1b4aad23688bb459fedf62d4"},"headline":"Setting Up GA4 Button Click Event Tracking with GTM","datePublished":"2023-06-02T11:48:03+00:00","dateModified":"2025-04-17T06:08:50+00:00","mainEntityOfPage":{"@id":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/"},"wordCount":1716,"publisher":{"@id":"https:\/\/easyinsights.ai\/blog\/#organization"},"image":{"@id":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#primaryimage"},"thumbnailUrl":"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png","keywords":["GA4","GA4 Reports","google analytics"],"articleSection":["Analytic Platform"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/","url":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/","name":"A Guide to Set Up GA4 Button Click Event Tracking with GTM","isPartOf":{"@id":"https:\/\/easyinsights.ai\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#primaryimage"},"image":{"@id":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#primaryimage"},"thumbnailUrl":"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png","datePublished":"2023-06-02T11:48:03+00:00","dateModified":"2025-04-17T06:08:50+00:00","description":"Learn to set up GA4 button click tracking with GTM for valuable data insights every time a significant button is clicked on your website","breadcrumb":{"@id":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#primaryimage","url":"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png","contentUrl":"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628.png","width":1200,"height":628,"caption":"1200x628"},{"@type":"BreadcrumbList","@id":"https:\/\/easyinsights.ai\/blog\/how-to-set-up-ga4-button-click-event-tracking-with-gtm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/easyinsights.ai\/blog\/"},{"@type":"ListItem","position":2,"name":"Setting Up GA4 Button Click Event Tracking with GTM"}]},{"@type":"WebSite","@id":"https:\/\/easyinsights.ai\/blog\/#website","url":"https:\/\/easyinsights.ai\/blog\/","name":"EasyInsights","description":"Uncover Growth in Digital Marketing Data","publisher":{"@id":"https:\/\/easyinsights.ai\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/easyinsights.ai\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/easyinsights.ai\/blog\/#organization","name":"Easyinsights","url":"https:\/\/easyinsights.ai\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/easyinsights.ai\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2022\/11\/easyinisghts_logo.png","contentUrl":"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2022\/11\/easyinisghts_logo.png","width":649,"height":117,"caption":"Easyinsights"},"image":{"@id":"https:\/\/easyinsights.ai\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/EasyInsightsai-522100504893809","https:\/\/x.com\/easy_insights"]},{"@type":"Person","@id":"https:\/\/easyinsights.ai\/blog\/#\/schema\/person\/dd83bf4d1b4aad23688bb459fedf62d4","name":"Piyush Gupta","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/easyinsights.ai\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7ea55084ee665a8e40648a7afe3dcac4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7ea55084ee665a8e40648a7afe3dcac4?s=96&d=mm&r=g","caption":"Piyush Gupta"}}]}},"fimg_url":"https:\/\/easyinsights.ai\/easyinsights_wordpress\/wp-content\/uploads\/2023\/06\/1200x628-1024x536.png","reading_time":"9 minutes","_links":{"self":[{"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/posts\/4886"}],"collection":[{"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/comments?post=4886"}],"version-history":[{"count":5,"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/posts\/4886\/revisions"}],"predecessor-version":[{"id":5557,"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/posts\/4886\/revisions\/5557"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/media\/4896"}],"wp:attachment":[{"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/media?parent=4886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/categories?post=4886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easyinsights.ai\/blog\/wp-json\/wp\/v2\/tags?post=4886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}