How to track button clicks using Google Tag Manager

Tracking button clicks inside Google tag manager without coding.

  1. Open the website with the button to track in a chrome browser.
  2. Install the google tag assistant plugin from here.
  3. Login to your Google tag manager account.
  4. Go to Variables-> Configure-> Clicks and enable the following –
    1. click element
    2. click classes
    3. click id
    4. click target
    5. click url
    6. click text
  5. Click on submit and publish.
  6. Enable the preview mode.
  7. Create a tag for example “subscribe button click” -> custom HTML and choose the trigger as mentioned in the following steps.
  8. Go to triggers and create a new trigger (name it as Click All Buttons). Trigger configuration-> Trigger type-> Click -> all elements.
  9. Under “this trigger fires on”-> Choose All clicks. Click save.
  10. Make sure that you see the Tag manager window at the bottom of the page.
  11. Control + click on the button to be tracked.
  12. In the google tag manager window, you will see a click element under summary. Copy this.
  13. Go to variables and see the click classes value, you can use this to edit “the trigger fires on” value. For example, you can go edit the trigger we previously created and change it to fire only on certain clicks (some clicks) with class equal to the class we copied in step 11. You can use other options like page URL and click class to further track other kinds of buttons. 
  14. Now you can track these events as goals inside google analytics. to do this, edit the type of trigger that we created in step 7. Choose “universal analytics” as the tag type, choost track type as event. Enter suitable category, action and label.
  15. To track this as a goal inside google analytics, go to admin-> goals->new goal->custom goal-> type- “event”-> Enter the category, action, label as the same as your entered in step 14.
  16. Click save.
Exit mobile version