Quantcast
Channel: DAGMAR
Viewing all articles
Browse latest Browse all 167

How to Set up and Track Button Clicks In Google Analytics 4 Using Google Tag Manager

$
0
0

Behind every click of a button lies powerful metrics you can leverage to improve your business and your website. That is, of course, if you know how to set up and track button clicks. Button click tracking enables you to create custom Google Analytics 4 events that deliver button track data to GA4. 

In this blog, we will show you how to track one of the most common events in Google Analytics 4 (GA4) using Google Tag Manager (GTM).

Tracking Button Clicks in Google Tag Manager (GTM):

If your website has buttons, it is essential to monitor whether your users are clicking them or not. We will demonstrate how to use Google Tag Manager to track buttons and send these button clicks as events to GA4.

Step 1: 

Step 2: 

A trigger is what helps define the conditions you would like to have tracked from the click button. Since Google Tag Manager doesn’t track button clicks by default, these steps are required to track clicks on our website.

how to track clicks in ga4 with gtm step1
  • Create a new trigger, and name it. Then, select “Click – All Elements” as a trigger type. Be sure to save your progress after.
how to track clicks in ga4 with gtm step2
how to track clicks in ga4 with gtm step3

Step 3: 

  • Enter the page URL where you want to track button clicks in GTM by clicking preview.
how to track clicks in ga4 with gtm step4
how to track clicks in ga4 with gtm step5
how to track clicks in ga4 with gtm step6

Step 4: 

  • After clicking the “Get the Guide” button, we will receive Click events in the GTM preview and debug mode. 
how to track clicks in ga4 with gtm step7
  • In this example, we will use “Click Classes” and “Click URL” to track our button.
  • Because the text may change in the future, we do not advise using “Click Text” for button tracking.

Step 5: 

  • In Google Tag Manager, we will update the “Element trigger” we created in Step 2 and rename our trigger to “SEO for Lawyers – CTA.”
  • In the image below, we have updated our trigger with the information we received in preview and debug mode in the previous step.
  • These values will be different on your website. You may only have the Click ID, which you can use to track your button, rather than the Click Classes or Click URL.
how to track clicks in ga4 with gtm step8

Step 6: 

  • Create a new Tag in GTM and name it.

A tag is responsible for developing the button click event data. However, this can only occur once it has been paired with a trigger.  

  • Select “Google Analytics: GA4 Event” as the Tag Type.
  • Pick the Configuration Tag you created by following the steps in “How to Set Up a Google Analytics 4 Account Using Google Tag Manager”.
  • Name your event; we have named it “SEO for Lawyers – Button Clicks”.
  • Choose the trigger we created in the previous step.
  • Save your tag.
how to track clicks in ga4 with gtm step9

Step 7: 

  • To reconnect the Tag Assistant to your website and update the preview and debug mode, click “Preview” once more.
  • In order to verify whether the tag we created is firing or not, we will now click the “Get the Guide” button.
  • Yay! Our Tag is firing.
how to track clicks in ga4 with gtm step10

Step 7: 

  • The next step is to check if the GTM sends the event to GA4. 
  • Please review Steps 17, 18, and 19 in the blog we mentioned earlier to verify this.

Google Analytics 4 + Google Tag Manager = Seamless Tracking 

Google Tag Manager makes setting up button tracking capabilities in GA4 faster and easier. Suppose you have successfully followed our step-by-step instructions. In that case, you should now be ready to start tracking the conversions from your website’s buttons and enjoying all of the added benefits of custom event tracking using Google Tag Manager (GTM).        

The post How to Set up and Track Button Clicks In Google Analytics 4 Using Google Tag Manager appeared first on DAGMAR.


Viewing all articles
Browse latest Browse all 167

Trending Articles