HomeНаука и техникаRelated VideosMore From: Measureschool

Google Tag Manager Button Click Tracking (2018 version) for Google Analytics, Facebook and AdWords

1032 ratings | 47566 views
Tracking Button Clicks used to take serious technical chops to pull off. If you have Google Tag Manager installed you simply need to follow a few steps and will be able to send Events to Google Analytics, Facebook and AdWords. In this video you are going to learn the 4 steps you need to follow to setup your Events correctly with Google Tag Manager The Steps are: 1. Setup a generic Click Trigger 2. Perform the Click to see what GTM picks up 3. Inspect the variables and refine your Trigger 4. Connect your Trigger to a Tag (such as Google Analytics, Facebook, AdWords and more….) #ButtonClickTracking #GoogleAnalytics #GoogleTagManager 🔗 Links from the video: GTM Event-Tracking Playlist: https://www.youtube.com/watch?v=b48PbFCNyOM&list=PLgr_8Hk8l4ZHqk0w9OU2IypiZsH2qqdoS&index=1&t=0s GTM for Beginners series: https://www.youtube.com/watch?v=WCmdRivjvRk&list=PLgr_8Hk8l4ZEY-rBGG99Y9V10Dc7g7cHt 🎓 Learn more from Measureschool: http://measureschool.com/products 🚀Looking to kick-start your data journey? Hire us: https://measureschool.com/services/ 📚 Recommended Measure Books: https://kit.com/Measureschool/recommended-measure-books 📷 Gear we used to produce this video: https://kit.com/Measureschool/measureschool-youtube-gear 👍 FOLLOW US Facebook: http://www.facebook.com/measureschool Twitter: http://www.twitter.com/measureschool
Html code for embedding videos on your blog
Text Comments (151)
izrrael sandrea (1 day ago)
Great video, thanks a million!
Tammy Creaser (2 days ago)
Thanks so much. Love your work.
Lobo (3 days ago)
Hello, thank you for making this great tutorial @measureschool. I followed it and think I've got everything set up correctly. The tag I fired shows as having been successful when I click on one of the button I've specified for it. However when I test it in google analytics, in Real-Time -- as described in your video from 11:23 to 11:32 -- nothing shows in my Events panel when I click. On the Tag Manager side it shows a successful "Tags Fired on This Event" though. I know it's hard for you to say with being able to see for yourself, but can you imagine what I might be doing wrong? Thanks in advance for any advice! And thanks again for the tutorial.
Lobo (3 days ago)
I figured it out! I realized have a filter set up to ignore traffic coming from the within my office, so obviously it wouldn't trigger the event. I tested on my phone set to roaming and it worked perfectly.
Alexander Stepanov (4 days ago)
Does it track clicks on mobile version of the website ? I configured it and it only tracks clicks made from desktop
Measureschool (4 days ago)
well... if you have a responsive website, yes it should work as well. If your mobile version is completely different then you need to retag.
Antonia Bezinovic (9 days ago)
Excellent tutorial, thank you!
MrNangiro (13 days ago)
Hey bro, thanks a lot for the tutorial... It really helps me!!! Just a note I've watched your old video but I could figure out everything, so I decided to write a comment and then I saw your description "updated video" and I was like "oh I'm f****** stupid" Just saying again your tutorial save my day =)
iPublishing (20 days ago)
Great! Thanks man
GotCourts AG (21 days ago)
Always a pleasure!
Toss3 (21 days ago)
Really amazing guide! Thank you!
Jagdish Bharathi (22 days ago)
Hi, can u pls make a video on how to declare variables in GTM
vijender rawat (23 days ago)
Thanks for sharing these videos. But i have a question have ever made a video of A/B testing for adwords campaign? If yes pls can u share here.
Calin Gabriel (25 days ago)
thanks man!
rendy kusnan (26 days ago)
how to track all clicks sums up on a particular button within the 30 days
Measureschool (24 days ago)
track the click and then check Analytics stats after 30 days
Jérôme L (27 days ago)
Hi there Julien, it says that my tag is fired 2 times, do you have any idea why ?
Measureschool (24 days ago)
because it's triggered twice? Maybe check the triggers?
Flow In Motion (1 month ago)
Just great easy and fast. I hate these slow over info videos. Love it he made a mistake, so you really understand how it works
Pablo Del Hierro (1 month ago)
Fantastic video you saved my life, I was a doubt in one step. When filtering when the trigger is activated you choose "click-element", but in the web page the value was in "click classes". Which one is the right one?
Rute Gomes (28 days ago)
I think he then changes to "Click Classes"
EWorld Fulfillment (1 month ago)
Great video, this was super helpful for me. I also appreciate you leaving in that specific mistake. As it was happening I knew it was wrong but figured the preview would show you and we'd learn something. I had already done mine right so I wouldn't have learned about that debug where it shows you what went wrong. I'll def subscribe to your channel and see if there are other helpful videos. Thanks again!
Debora Ramos (1 month ago)
Thank you so much for your great tutorials. They have been really helpful so far. I just have one question. I have an e-commerce website with configurable products. So until the customer selects the colour and the size, they can click on the "Add to basket button" but it only gets added to the basket after the user selected the desired options. How can we set the triggers to only track events that really add the items to the cart? Thank you :)
Measureschool (1 month ago)
there are several methods to accomplish this, but none that are easy. You would need to build a validation with different variables that check wether the options are filled and then only fire the tag if the variables are filled correctly. Alternatively ask your developer to build in a custom dataLayer push
Great tutorial! Thanks for uploading this.
Vanja Bijelic (1 month ago)
Hi Julian, is there any way to track Facenook Customer Chat on the website? https://developers.facebook.com/docs/messenger-platform/discovery/customer-chat-plugin/ Class or click tracking don't work. I don't know how to solve this problem. There is no solution anywhere... Thank you.
MágicaOnline.com.br (1 month ago)
You are the best, Julien. Incredible video!
When I set it up is shos me in the that it is fired and counts to 2.. but in the analytics there is always just a 1. It doesnt count
wongtouski (1 month ago)
Fantastic video! Just applied it to my website, I love it!
Dan H (1 month ago)
Hi Julian, great tutorials BTW!! Quick question, before i added the footer GTM code i was able to see each GTM events just like in your video. However after installing the full code i am not able to see the event gtm. on the website panel? Why is that? Should i remove the footer code?
Dan H (1 month ago)
+Measureschool Hi Julian, let me ask a different question.. If I use the PageView tag will that also generate a gtm.pageview just like the Click does?
Measureschool (1 month ago)
not really sure what you mean.
Nguyễn Doanh Đông (1 month ago)
hi there! I wanna setup a event tracking to popup view. Can you tell me how could i do that? i want to count popup thank via form ID.
Measureschool (1 month ago)
yea, just watch our videos https://www.youtube.com/watch?v=PZA-5Nav0Bo
Javier Yranzo (1 month ago)
Fisnik Berisha (1 month ago)
You should show how to add click tags for facebook without any other previous set up
Measureschool (1 month ago)
so no GTM? Well then you are just hardcoding, that would involve JavaScript
Mark Clover (2 months ago)
I tried about 3 tutorials before finding this one. This explains it so clearly. THANK YOU!
Paolo Angelino Guerrero (2 months ago)
Thanks man! Definitely helpful!
Renato Gonçalves Pires (2 months ago)
Amazing content. Thanks you for sharing!
Andrea Zoccarato (2 months ago)
Clear and above all "correct" explanation. Thank you! 👍🏽
Lucas G (2 months ago)
Great stuff ! Thanks for those good content tutorials ! There is just one thing : I've been trying to make a trigger from a button Click ID. Once I get in preview mode to see the variables nothing appears on Click ID. Here is how I coded my button (with id="getyourpromotiondesktop01) " [su_button url="" style="flat" color="#ffffff" size="12" id="getyourpromotiondesktop01" class="popmake-waiting-list"]Get your promotion ![/su_button] What did I do wrong for it not to print any variables in Click ID when I click the button ? If someone got the answer that'd be great ! Thanks !
Andrew Schuh (2 months ago)
Hi. Thanks for this video! I have a problem. We use an embedded typeform on our website and we need to track submit clicks in Analytics, but when I make clicks within the embedded form in the listener functionality, it is not picking up any clicks. Is there any way around this?
Santiago Casas (2 months ago)
One question Julian, I followed the tutorial and it's working great. But once the click fires up the tag, how can I make a goal in GA when somebody clicks the ATC button? I am having a difficult time finding that. Thank you!
Jeff Abramovitz (2 months ago)
Julian, great tutorial. You are very good at teaching us step by step. Really appreciate it. I have a question. How do I track phone calls using this method? For instance, I set up the button click event so I capture when someone clicks the phone number on the website. However, how do I track whether they actually went through with the call (because you can click cancel once you click the call number on the site)? We do have Conversions set up in AdWords for Calls using some time requirements for it to be considered a conversion. Thanks for your help in advance.
Florian Wells (2 months ago)
Very nice! Thank you for this! But how can I see on Analytics, which exact links have been clicked?
Woo Tehcno (2 months ago)
thanks, I've followed your steps and successfully to track all my links. But there is a problem, this method won't work if we use mobile browser. Do you have solution for this problem ?
Mike Miz (2 months ago)
A client wants to basically track almost every button click on their website, what is the best way to go about doing this?
Gil Su Kim (3 months ago)
Thanks, Julian! Now I "know" how to setup GTM's button click tracking! Yay! :)
Gil's super channel (3 months ago)
Hey thank you you're awesome. You can tell me please were do edit your awesome videos?
Conor Lynch (3 months ago)
Good stuff, like this a lot!
Eckaez (3 months ago)
Is there a way to only track button clicks from adwords visitors?
Eckaez (3 months ago)
Thanks. I had a look; however, I'm not very familiar with coding etc and it seems a bit confusing to me
Measureschool (3 months ago)
yes, you would need to save that information in a cookie. Look up our Source Cookie video
Hans Dekker (3 months ago)
You've earned my subscription by not editing the 'blooper'. Quick question for you: I have a new Google AdWords client that is selling antique furniture trough his webshop. For every item he has one unit in stock. How would you track webshop conversions for AdWords, without manually adding 500+ units/codes/events?
Hans Dekker (3 months ago)
Dude, you're effing awesome! Found the answer to my own question by going through one of your I don't know how many awesome vids. Still one small error but no doubt I'll have it fixed. Thank you!
Srikanth Anupoju (3 months ago)
Hey Thanks for great video, While creating the button click filter "add to cart". In filters for some clicks why you choose "Click Element instead of Click Class". Can you use Click Class also?
Measureschool (3 months ago)
yes, this is just an example. It depends on how your variables get filled
Katrin Troeva (3 months ago)
Great tutorial, thanks a lot!
Adela Mincea (3 months ago)
thanks for the video. when I'm triggering clicks on the website, my variables are "null" and "undefined" and don't get classes/text and many variables are missin. Can I still create the event?
Measureschool (3 months ago)
first ensure they are enabled under Built-In Variables in GTM. If they don't get filled then the build-in capabilities won't work for your site. There are a host of other workarounds, but more technical. I would recommend to get some help in this case.
May (3 months ago)
Hi Julian, I followed these steps and they worked fine but I tried to follow the same steps for adding checkout track button but they are not firing. Could you please help? :(
Nebworx (3 months ago)
IS it possible to send this information to ActiveCampaign as well?
Viola Eva (3 months ago)
Hello Julian. Love your videos! How would I setup a click event if the buttons do not have unique click classes? Meaning the java script/data layer return the same value or non for click class for different events? Thank you!
Rohan Bagayatkar (4 months ago)
Great info... One quick question... I have contact form in different service pages of my website and I am redirecting them all to one thank you page after successful submission.. Can I separate the thank you page event data by tracking them by the source page of thank you page in this case or should I make different thank you page for every service page contact form Thanks in advance
Rijo Thomas (4 months ago)
Hi Julian, thanks a ton for this video, I have a question.....I have implemented UTM on the ads.......My worry is if I am having just a single page and wanted to track if it was the Facebook AD / Adword Ad that triggered the form submission how will I do it? I understand the point of tracking button clicks but how will I know if it is Facebook / AdWords? Could you explain the last part in the video where you mention how we can attribute button clicks to these platforms? .... My purpose is to remarket separately to people who filled a Form coming from Facebook Ads / Adwords for loyalty based benefits they can get
SuperVujke (4 months ago)
Hi very nice video helping me a lot :) but i have a little problem my click text is showing up as undefined but I am clicking on on a button ( add to cart in croation dodaj u košaricu ) ty in advance
Alexander Skibinskiy (4 months ago)
Thank you very much! Great Stuff!
Fernando Z. (4 months ago)
This vídeo is Gold! Thank you so much :)
Inca Lake (4 months ago)
thanks so much
Nathan Ellingson (4 months ago)
Nice little tutorial. I was happy to showed how to correct a mistake if you make one. Thanks!
Michael Austin (4 months ago)
Just great stuff! Keep it up!
Morgan Vogt (4 months ago)
Julian - thank you for putting out these incredible tutorials. I took one of your Udemy courses on Tag Manger, and now I don't go to anyone else. I appreciate that you keep your tutorials updated for each year's changes and that they're so easy to follow. I do have one question - I would like to try setting up button click tracking that goes to our marketing automation platform - have you ever done something like this before? I have no problem setting it up for GA, FB or AW, but this is a new one that I'm not sure can be done. Thanks!
Morgan Vogt (4 months ago)
I would imagine the basic steps are the same, but I wasn't sure how to connect the tag to our MA platform.
Measureschool (4 months ago)
Hi Morgan! Yes, that should be possible. You could follow the steps from this video?
kiran paul (4 months ago)
I'm unable to see the summary module on my system
Michael T (4 months ago)
This doesn't work for me... I've setup the trigger, and enabled the variables. Why do I not see the gtm.click event firing? I've tried clicking on a button and an anchor (link).
Michael T (4 months ago)
Okay figured it out... It's because the dataLayer was defined after GTM not before...
Moe Saadeh (4 months ago)
Great Vid as usual, many thanks :)
214 Interactive (4 months ago)
Great video. Lots of help
Ali Senejani (4 months ago)
Hi. How about social media share buttons?
Measureschool (4 months ago)
could be tracked with this method as well
Takeshi Kitano (5 months ago)
cheers, the amount of outdated guides at the top of google search was driving me crazy
marjonel micka (5 months ago)
Hi there. Thank you for the tutorial. I was wondering if we have a specific url under a button and we have this button like 10 times in our website and we want to measure all the click that these buttons will receive. How can we do that? Also how can we measure different clicks on different buttons? Do we need to do the same procedure for all the buttons? Thank you
Measureschool (5 months ago)
the trigger configurations will let you dynamically define rules. As long as the variables that you choose stay the same when you click on that button you would only need to define one trigger and tag to capture all of them
Amit Hemed (5 months ago)
7:35 i see the click as (_event) and the value is (gtm4wp.formElementLeave) but i dont know what to choose on that page 8:01 . please im really stuck on this. thanks!
陈炜栋 (5 months ago)
Thank you! Very informative!
Josh May (5 months ago)
THANKS for the great content! Had a quick question: is there a way to filter specific event tracking in different GA views? I'm trying to re-organize a clients GA account without touches what is already in place. Does this make sense? Thanks again :)
Measureschool (5 months ago)
yes, there is a filter option in the admin section, which only would filter (new) incoming events. If you wanted to filter your current views, you would need to use custom segments
Guilherme lopes (5 months ago)
Would the click trigger work on any product on the website with the "Add-to-cart" feature?
Measureschool (5 months ago)
yes, by chaining several conditions inside of the trigger
Guilherme lopes (5 months ago)
Thanks for the reply. So, is there a way to configure it just for a specific button?
Measureschool (5 months ago)
yes, once you have configured it, it will fire on every button click that matches this condition
Ryan Wu (5 months ago)
Thanks for your sharing.
Janis Daugavietis (5 months ago)
Thank you so much :)
Olga Summerhayes (5 months ago)
Thank you for the tutorial, this helped a lot.
Fernando Costa (5 months ago)
ze kotch (5 months ago)
Thank you very much, helped me a lot. Is it possible to track the first click of the visitor on my website ?
Ibrahim Khalil (5 months ago)
Very clean and nice instruction. Thank you very much!
Yasir Nawaz (5 months ago)
You are a life saver
Jason Black (5 months ago)
Thank You!! You have helped me a lot!
Cody Albright (5 months ago)
Hi, Julian, thank you for this! I've very much enjoyed learning more about GTM through your detailed videos, and I'm looking forward to more of them. I noticed that for your Facebook Add To Cart event that you had the base pixel and the event pixel on the same tag; could you just have the base pixel fire on all web views and then have a separate tag that fires only when the button is clicked using the "fbq('track', "AddToCart');", assuming that you include the script tags around the tracking code and ensure that the base pixel fires first?
Measureschool (5 months ago)
yes, see my other video about the Facebook pixel
Alex Yoesting (5 months ago)
So will every button click go to fb analytics or just ones that came from facebook? Would i need to set up to only trigger when the referrer contains facebook.com?
Measureschool (5 months ago)
everything would go to FB analytics. Only if a user goes through an ad it will show up in your Ads account as a conversion. Referrer would only be valid on the Landingpage
Mony Chhim (5 months ago)
I suck at coding and I used to go back and forth with a developer to implement this kind of tracking. Thanks to your video I managed to do everything by myself. You're awesome Julian thank you so much!!
Ojasweb Digital Solution (6 months ago)
Julian is such an amazing guy. How i wish i could work with him. Quick question, i setup event tracking to capture clicks on "CALL NOW" button. it fires on computer but not on mobile phone. How do i fix this?
Measureschool (5 months ago)
ensure that GTM is installed on your mobile site, then adjust the trigger to fire on the phone click as well. You can test it in the Mobile view in chrome
Keith Trigwell (6 months ago)
Ace... Thank you for making this accessible. Sadly my buttons weren't really coded with class information, but I still managed to identify a specific button click using other variables. Especially useful seeing how you debugged the failed click. Whats the best series of videos to watch moving forwards?
T K (6 months ago)
Thank you appreciate the content as always. One unrelated question I have relates to Adwords Manager accounts. Do they have similar accounts if you are going to be managing multiple analytics accounts, tag manager accounts, etc? Or would you just directly request access with those and log on to your own analytics/tag manager and access such?
Measureschool (6 months ago)
they don't have an MCC accounts for GA, but you can have multiple GA accounts under your Google account. Just get invited.
Roman Saavedra (6 months ago)
Amazing video!! The best tutorial
Thank you very much for the video! Everything is very clearly explained, I had to adjust everything from the first time!
Ramdhani Rakhmat (6 months ago)
Hi Julian, thank you for your video, it's very helpful. I have a question, how if we want to track specific button? (e.g add to cart button Happy Ninja). Cheers!
Ramdhani Rakhmat (6 months ago)
Is there any video of yours talking about form submission tracking? Thank youu :))
Measureschool (6 months ago)
you could input another condition in your trigger to only fire on certain pages
Slamet Purwanto (6 months ago)
Eishventura (6 months ago)
Hello I would like you to help me:u know why my web page, is getting a lot of view between 40mil and 2mil click, I do not know what to do and I contacted godaddy and they told me that my page does not have any malicious code. I already have 4 days with this problem, until the ads I deactivate and I still have all that visit.
X3 Tradesmen (6 months ago)
Thank you for the great video! I have a form submit tag created with a form submit trigger on our website x3tradesmen.com. We should only receive 5-10 events/form submits on our website per day, however, recently we have noticed that we are getting 10,000+ events a day for some reason. We also saw a massive spike in users per day as well. Is there any common issues that are known for causing this type of behavior? Thanks!
Bawabba (5 months ago)
That can be the google bots.
Shawon Kayum (6 months ago)
Thank you so much. You're awesome.
Carlos Martinez Martinez (6 months ago)
Awesome video. Very clear and helpful. Congrats!
Brad Ames (6 months ago)
Thank you, very well done.
Simon Vincent (6 months ago)
Great tutorial. Easy to follow and helped a lot :)
TESTEX Testing Equipment (6 months ago)
Thanks for your share. But I want to know when we should set the Non-Interaction Hit True?
TESTEX Testing Equipment (6 months ago)
Thanks a lot.
Measureschool (6 months ago)
when you don't want to affect bounce rate from the default. GA defines a Bounce as a Session with only one interactions. If a User start his session on the page you wanted to fire an event on he already registers the Pageview as the first Interaction. If he performs your interaction or event (and non-interaction is set to false) then your User will automatically counted as NOT bounced. Long story short: Non-Interaction Hit should be set to true for interactions like a Scroll, where the user will be performing an action anyways regardless of him bouncing.
Sebastian Richter (6 months ago)
Great - helped a lot. Are there more courses from you than the one in udemey?
Sebastian Richter (6 months ago)
Looking forward to this. How much does it cost, if you make something in tracking for me?
Measureschool (6 months ago)
I currently don't sell my courses. The next product we will launch is MeasureMasters
Michael Weinstock (6 months ago)
Thank you Julian! Very educational and practical. I'm a bit confused about the next step in Google Analytics though. Where can I see the data that gets accumulated, rather than just look at what happens in real-time? Maybe something you would want to add if you ever do an update :) Thanks again!
Measureschool (6 months ago)
already answered this at minute 11:30
com af (6 months ago)
Hi, How if i wanna track several buttons, should I create one trigger for one tag ? Or one trigger can be created for all my buttons tracking ? Thank you in advance
Upside of Downsizing® (6 months ago)
Great information, Julian - Thank you!
Vanja Bijelic (6 months ago)
Hi Julian, you have great and educative videos. Here is idea for next video. Many people don't know that Google Analytics don't track time by default if user is bounce. It would be very good and educative to create GTM and Google Analytics (Custom Metrics) whole process of tracking time for bounce users (not with timer in GTM), but with beforeunload and beacon.. :)
Measureschool (6 months ago)
pretty advanced to setup and a bounce is hard to measure, because it is dependent on the session (which is computed serverside). I guess what you would be possible is to measure time on site with this technique?
Dave Nilsson (6 months ago)
Very good thanks for the awesome content

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.