How To Fire Events On Button Clicks With Google Tag Manager šŸ”„

The Power Of Button Clicks

Clicks are an important metric when looking at your marketing performance.Ā 

We always track the cost per click when looking at the ad level, so why don’t we show the same respect to button clicks on our landing pages?

There’s a huge amount of information that could be gathered based on what and where people are clicking on our pages.

For example, we ran an advertorial and have events on each button click, at different stages of the page.

  1. The button above the fold
  2. The button in the middle
  3. The button at the bottom

From this, we created audiences based on which button they clicked.Ā 

People who clicked the third button, at the bottom of the page were a great quality audience as they had read through the advertorial and decided to click through to the next page.

This is also great for button clicks on PDF’s, downloadable content and clicks off-site.

So, here’s how to do it…

Generic Button Click Trigger in Google Tag Manager

Firstly we want to add a generic button click trigger, so we can track all clicks on the page.

(I am assuming you have already got GTM on your page. If not, follow these instructions)

Follow these simple steps to implement…

  1. On the workspace tab, on the left-hand menu, select “Triggers”.
  2. Click “New”.
  3. Ā Select “Click – All Elements”.
  4. Select “All Clicks”
  5. You want to then save.
Button Clicks

Ensure Click Variables Are In Place

Now we want to make sure we configure the correct variables in google tag manager, so our button click information shows up when we test.

We can do this by…

  1. Go to the variables tab in the left-hand menu.
  2. You want click “configure”.
  3. Then make sure you check all the click related variables.

Google Tag Manager in Debug Mode

So now we want to test some clicks on the page and see what the feedback into Google Tag Manager.

Follow these simple steps to test…

  1. Click “Submit” in the top right-hand corner and save your work.
  2. Click “Preview” next to submit to open the “Debug View”.
  3. Type your URL of the page you want to track button clicks on, into the popup window.
  4. Click “Connect”
  5. This will open your page in “Debug View” Start clicking on a few things, making sure you remember which order you did it.
  6. Then go back to the tab called “Tag Assistant [Connected]”.
  7. Below is what you should see…
Button Clicks GTM 3
Ā 

Now you want to check all these clicks and look at the variables.

  1. Click on one of the options in the land had bar that says “click”. There should be a few of them.
  2. Then you want to click on the “Variables” tab.
  3. Here you can see the unique identifiers of the click.

Setting Up Your Button Click Trigger

This is where you want to find what you want to trigger the click on.

I’ve decided I will trigger my click on the “Click Text” variable as that was the most unique variable I had available.

So to set up your Button Click trigger you need to…

  1. Come out of “debug mode” and back to Google Tag Manager.
  2. Go back to triggers.
  3. Click “New”.
  4. Ā Click Trigger configuration and select “Click – All Elements”.
  5. Select “Some Clicks”
  6. Select “Click Text” from the drop-down menu (Or which ever variable you’ve chosen).
  7. Select “Contains”
  8. Then the text that showed in the debug view. Ours was “SEND ME THE ESCAPE PLAN”

Setting Up Your Tag

Now the trigger is set up, you want to add a tag to it, to ensure that everything is working well.

We always start with a google analytics event.

(Again, we assume you already have Google Analytics set up. If not follow this…)

  1. Click on “Tags” in the left-hand menu.
  2. Select “New”.
  3. Click “Tag Configuration” and select “Google Analytics: Universal Analytics”
  4. Change “Track Type” to “Event”
  5. Add a category, (we put “Click”).
  6. Then add an Action, (we put Escape Plan Button).
  7. Then scroll down and at the bottom click “Enable overriding settings in this tag”.
  8. In Tracking ID add your universal tracking number, it should look like UA-*********-1.
  9. You can find this by going to Google Analytics and clicking “Admin -> Tracking Info -> Tracking Code”>.
  10. Then click on “Triggering” and select the trigger that you just created.
  11. Click Save and name it.

Testing Everything Works with Your Button Click

Now to check everything works…

  1. Click “Submit” and save all your changes.
  2. Select “Preview” to re-enter debug mode.
  3. Click “Connect” (your URL should still be there from last time).
  4. Once your page has loaded click on the button you want to track.
  5. Go to the tab “Tag Assistant [Connected].
  6. On the left-hand side click the “Click” option. There should only be one if you clicked once.
  7. Under “Tags” there should be your tag that fired. Click it.
  8. Under firing triggers, it should have ticks against the filters you set up.
  9. Then go into your Google Analytics account. Go to “Real-Time” and then to “Events” and check it showed up.
  10. It should look something like the image below…
  11. Then you should all be set up to fire other tags off this button clicks and create more button click triggers.
Fire events on button clicks

Sick of being a ā€œMaster Of Noneā€ and a slave to your ā€˜whaleā€™ clients?

I would fire a pain-in-the-butt $2,000 a month retainer client for Pay Per Lead PARTNERS that make $3,000 profit a DAY every day of the week.

In fact, I fired them ALL!

Would you?

Then get our “Retainer Prison” escape plan.

It’s free.

Recent posts

TEST DRIVE OUR CHATGPT SALES ANDROID

Qualify, Book & Sell Automatically With Our Sales Android

Try It FREE Now!

Can't Find What You're Looking For? Search Our Posts!

Search

HOLD UP!

ARE YOU HELD HOSTAGE BY DEMANDING LEAD GEN CLIENTS?

Escape ā€œRetainer Prisonā€ And End The Nasty Texts, PM’s & Emails Demanding You Do MORE Work For Less Money

Test Drive Our ChatGPT Sales Android! Qualify, Book & Sell Automatically With AI