Button Click Tracking with Google Tag Manager - 3 methods

  Рет қаралды 57,905

Analytics Mania - Google Analytics & Tag Manager

Analytics Mania - Google Analytics & Tag Manager

Күн бұрын

Many people are doing this wrong and in some situations, they are missing a lot of clicks.
In this video, I will show how to track button clicks with Google Tag Manager and Google Analytics 4.
Different buttons are coded differently, thus they require respective tracking methods. That's why I will show you three methods of button click tracking in Google Tag Manager.
=== LINKS ===
Subscribe to our KZbin channel / @analyticsmania
✭ Enhanced Measurement events (and their parameters) in GA4
support.google.com/analytics/...
✭ How to install Google Analytics 4
• How to Install Google ...
✭ CSS Selectors
developer.mozilla.org/en-US/d...
✭ Custom Dimensions in Google Analytics 4
• How to configure Custo...
📕 Free e-book: How to get started with Google Analytics 4
www.analyticsmania.com/p/gett...
Timestamps:
00:00 - Intro
01:48 - Method #1
08:36 - Method #2
12:52 - Method #2
22:17 - Final words
=== CONNECT WITH JULIUS & ANALYTICS MANIA ===
✭ Facebook / analyticsmania
✭ Twitter / fedorovicius
✭ Linkedin / fedorovicius
Subscribe to our KZbin channel / @analyticsmania
#googletagmanager #googleanalytics4

Пікірлер: 99
@pikeconsultinggroupinc.5287
@pikeconsultinggroupinc.5287 2 жыл бұрын
Once again, the most drill down and complete explanation of the use of tags, triggers and variables on youtube, along with the testing protocol to show correct application. Julius is indeed a GA master.
@crazydevila
@crazydevila 2 жыл бұрын
You are the best GA expert here. Thank you for all the videos and keep going!
@jennygao7542
@jennygao7542 2 жыл бұрын
Nobody covered this button issue better than you! Can’t thank u enough
@RyanMendenhallSEO
@RyanMendenhallSEO 3 жыл бұрын
Loved how you showed that error that can happen quite easily when setting up the third way and how to solve it using a CSS Selector. Okay, I have a few questions: 1. How do these methods compare w/ using GTM's built in Form Submission trigger? One more reliable than the other? 2. For something like an opt-in form what about just tracking in a destination goal in GA? Would that be more reliable than one of these button click methods? 3. Is it possible to get inflated numbers when tracking button clicks if people click the button more than once before they actually get something added to their cart, say if they're impatient that the page is loading slowly? Thanks again for your videos Julian!
@DOUBLEECaDA
@DOUBLEECaDA 3 жыл бұрын
Julius videos are real value! Cheers
@yipgm1379
@yipgm1379 2 жыл бұрын
Oh my god! You provided the solutions I found so long time ! Like your video so much ! Really solved my GTM problems! Thank you so much
@claudioduartesilva
@claudioduartesilva 2 жыл бұрын
Great Video, that third method was just what I needed!
@yipgm1379
@yipgm1379 2 жыл бұрын
I really found the solutions for long long time. Cannot find the solutions until discovered your video! Great GTM expert
@user-cq7zj7xs9d
@user-cq7zj7xs9d 2 ай бұрын
Thank you so much for your video. Just helped me troubleshoot and correct a trigger that was not firing. The clear explanation and step-by-step walk through is much appreciated!
@eduardozaccaro2519
@eduardozaccaro2519 Жыл бұрын
Awesome video! The third option helped me a lot. Thank you very much.
@rushiljain8574
@rushiljain8574 Жыл бұрын
Wild card css selector was a game changer for me! Thanks so much 👍
@codecontent9717
@codecontent9717 2 жыл бұрын
Your knowledge 7 understanding is unmatched. Amazing, thankx
@RaviSingh-nv9bf
@RaviSingh-nv9bf 2 жыл бұрын
Great video with very nice step by step explanation.
@sergiimisiak2388
@sergiimisiak2388 Жыл бұрын
Your explanations are really helpful! Thanks a lot!
@asevero
@asevero 3 жыл бұрын
Awesome! Your channel is the best! Thanks a lot.
@sl97
@sl97 2 жыл бұрын
very good explanation, especially the third way of tracking is important to know.
@ryanyusuf3393
@ryanyusuf3393 3 жыл бұрын
You're awesome brother. Thank you! ❤️
@calmingmusicstation6968
@calmingmusicstation6968 2 жыл бұрын
You are a great mentor... !!! Thanks for your valuable contents giving us continuously without paying a single dime.
@calmingmusicstation6968
@calmingmusicstation6968 Жыл бұрын
@@SanjarRahmatov-kd7if then?
@calmingmusicstation6968
@calmingmusicstation6968 Жыл бұрын
@@SanjarRahmatov-kd7if Who do you think is better?
@manishjoshi1624
@manishjoshi1624 Жыл бұрын
YOU ARE THE GOD OF ANALYTICS
@rocmarkz6742
@rocmarkz6742 2 жыл бұрын
thank you so much for making this :)
@learngrow9977
@learngrow9977 2 жыл бұрын
Thanks for sharing this informative tutorial. it will help me a lot in my work.👍
@besttravelservices2289
@besttravelservices2289 Жыл бұрын
Unique Video, its worked🥰
@billbainivalu3487
@billbainivalu3487 3 жыл бұрын
Glad I found your channel ...
@kawsarhossain7932
@kawsarhossain7932 Жыл бұрын
Excellent!! Keep it up.
@aminkh6872
@aminkh6872 10 ай бұрын
thank you it was really helpful
@zobecookingcorner4391
@zobecookingcorner4391 Жыл бұрын
Love from Bangladesh boss!
@JohansSamsing
@JohansSamsing Жыл бұрын
Very helpful thx!
@MartinBenesCreative
@MartinBenesCreative 3 жыл бұрын
Thanks for your awesome tutorial. I can see the clicks in TagManager but they are not showing in the DebugView in Analitycs. I can see scrolls, etc but not clicks...any hint please? Thanks.
@sampathvidanapathirana7698
@sampathvidanapathirana7698 Жыл бұрын
Thank you soooo much!
@escapetothemoon9069
@escapetothemoon9069 3 жыл бұрын
Thank you so much!
@thomaskoch3788
@thomaskoch3788 Жыл бұрын
very useful tutorial*
@mdtanbir3723
@mdtanbir3723 8 ай бұрын
You are mentor💙
@sultanulmoeminin7155
@sultanulmoeminin7155 9 ай бұрын
Thank you so much.
@nanajaeminbunny374
@nanajaeminbunny374 2 жыл бұрын
Hi! Thanks for the very clear video explanation! I would like to ask do you think it's possible to track an event but different results in desktop and mobile in GTM? For example -> in desktop when you click it will show a new page, however when you click it on mobile it will direct you to play store. Thanks in advanced!
@AnalyticsMania
@AnalyticsMania 2 жыл бұрын
Hi, you could just track click anyway. And then in Google Analytics, you can see what kind of device was used to better understand the context
@estebancoria2462
@estebancoria2462 2 жыл бұрын
Thanks. Other way to track children inside Button, is put css property "pointer-events: none" to child, so the unique event fire is button click, no span click. Cheers
@WeronikaSalach
@WeronikaSalach 9 ай бұрын
Thank you for this tutorial! I'm wondering if I'm doing the steps right. My scenario is slightly different - I have a gallery of freebies available as downloads. Each download is hidden behind an image, so when someone wants to download a freebie, they have to click on the image. I was wondering if it is enough that I follow your first method of setting up link clicks. I need to re-watch this video but I'd very much appreciate it if you could let me know if I'm going with the right direction with it. Thank you! :)
@hectorcampbell8843
@hectorcampbell8843 3 жыл бұрын
Hello, do you know how to create audiences based on "session duration" like in the old UA audiences, but in GA4? I cannot figure out how to so I'm still using UA to create my session duration audiences
@henrique7860
@henrique7860 2 жыл бұрын
Hi! I need to track clicks and impressions from 15 banners on 3 different websites. They are simple banners made on random banner plugin on WordPress...Should I do the same thing as you do on this? Can you help me please? thank you
@stantan6130
@stantan6130 3 жыл бұрын
The third technique solved my issue. Thank you! Does the * select all child elements including multiple child levels deep?
@AnalyticsMania
@AnalyticsMania 3 жыл бұрын
Yes
@mayasadat4792
@mayasadat4792 Жыл бұрын
Hello, Thank you for this incredibly informative video. I was wondering, why didn't you add "btn" under click classes and just added "hero_btn"?
@rolandking507
@rolandking507 Жыл бұрын
The btn class is a global style for all buttons -- likely used by the developers/system to create uniform button designs (height, border, hover state, etc.) In his example, he needed to target a class that is specific to that particular button on the website. Otherwise, the tag will fire on a very generic trigger, where many of his pages may have a button in the "hero" area of the page. As a best practice, you should always try to assign a custom class name for all redundant elements you wish to track. If you cannot, then you have to set stricter requirements in the trigger like "path url contains /about-me" AND "click classes contains hero__btn". This would allow you to fire the tag on the about-me page ONLY to specifically track the hero button on that page.
@yeinnarayana2644
@yeinnarayana2644 3 жыл бұрын
in 3rd setup, why not just modify the span styling with some css so it acts completely to cover whole button instead create the advance configs ya? great explanation by the way
@AnalyticsMania
@AnalyticsMania 3 жыл бұрын
What if you don't have access to the code to change the class and a developer cannot help because he/she has other priorities?
@ariskaparamitha9634
@ariskaparamitha9634 10 ай бұрын
Dear Julius, I have a question, I track one button with event parameters link_text and the trigger is click just links and I use click classes. On the debug view, I saw two click event pop-ups, one the normal click event and the event I track (already named it), why did this happen? those two click event have the same ga_session_id, but the event I track only showing link text, while the click event showing link_classes..
@amberhan4982
@amberhan4982 2 жыл бұрын
Can I use "Click Text" to fire the trigger? Cause there is no "Click ID" for my add to cart button and the "Click Classes" is soooo long like "product-form__submit button button--full-width button--primary", I am note sure if it's ok with such long paremeters
@lazearteepublicidadedobras6594
@lazearteepublicidadedobras6594 7 ай бұрын
Thannnnks a lot
@yashsinojia6170
@yashsinojia6170 2 жыл бұрын
Hi Julius, I was wondering if it's possible to track the price and other details of the product as tag parameters when someone clicks the 'add to cart' button?
@AnalyticsMania
@AnalyticsMania 2 жыл бұрын
Yes, but it requires javascript and DOM knowledge
@yashsinojia6170
@yashsinojia6170 2 жыл бұрын
@@AnalyticsMania Thanks for your immediate reply. I'd also appreciate if you can point me where can I get that information from?
@akhilrawat3251
@akhilrawat3251 2 жыл бұрын
Thanu so much from india 🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳
@derekcummings4780
@derekcummings4780 2 жыл бұрын
cool, method 1 worked for me, but I didn't see the button click in GA4 debug...it's just stuck on waiting for debug events
@rafaelbp279
@rafaelbp279 Жыл бұрын
It's possible to track variable attributes? I have 10 different images with different links. When I create track some clicks, I can't leave the field blank, since it's an variable attribute. any tips?
@sushiresource
@sushiresource 2 жыл бұрын
For method #1 how do you see the parameters for call_to_action_click event from beginning of time? In GA4 I can see it in Engagement > Events but it only shows event parameters in last 30 minutes.
@AnalyticsMania
@AnalyticsMania 2 жыл бұрын
Use exploration reports
@ampliadigitalagency
@ampliadigitalagency Жыл бұрын
Thanks
@KevserKurt-os8ni
@KevserKurt-os8ni 2 ай бұрын
can we use Click - All Elements for Click - Just Links
@shreekantshrivastava9764
@shreekantshrivastava9764 3 жыл бұрын
Awesome information. but I want to track 3 buttons with the same class name & id then how to track these buttons? Any hint Please. Thanks
@AnalyticsMania
@AnalyticsMania 3 жыл бұрын
Then use that id and/or class?
@shreekantshrivastava9764
@shreekantshrivastava9764 3 жыл бұрын
@@AnalyticsMania if we use the same id or same class name for three buttons. then how we track? ... if we use id or class, we can't identify which button was clicked by the user.
@AnalyticsMania
@AnalyticsMania 3 жыл бұрын
@@shreekantshrivastava9764 Either learn how to work with CSS selectors, or ask a developer to add additional parameter to each button (e.g. button name) and then use auto-event variable to access that information. Both of these options are covered here www.analyticsmania.com/courses/intermediate-google-tag-manager-course/
@shreekantshrivastava9764
@shreekantshrivastava9764 3 жыл бұрын
@@AnalyticsMania Now I got your point. Thank you very much.
@yishay_yosef
@yishay_yosef 6 ай бұрын
Thanks but how you change the class name? I tried with CSS CLASS but it doesn't work ! I have multiple buttons with the same class name but I want to detect click from a specific button
@AnalyticsMania
@AnalyticsMania 6 ай бұрын
Class is not something you should change in GTM. It's developer's responsibility to do that in the code. But I doubt he/she will be changing classes just because you need it in GTM. In that case, it sounds like you need to go advanced and learn CSS selectors to work with multiple elements that have similar classes.
@seniorseoIR
@seniorseoIR 3 жыл бұрын
Greattttt
@user-uq5hm7ps3h
@user-uq5hm7ps3h Жыл бұрын
My code block doesn't have an id value. It only has class value but has the exact text and background click situation, as shown in the video. It's a toggle button. How can I use matches_ccs_selector for a class?
@AnalyticsMania
@AnalyticsMania Жыл бұрын
.class But in general, you need to learn CSS selectors to be able to use it properly
@sincere1115
@sincere1115 2 жыл бұрын
謝謝!
@gabz1989a
@gabz1989a 5 ай бұрын
what if I have the link but it says tags not fired? and I have one for google tag
@anastasiyashevchenko3535
@anastasiyashevchenko3535 2 жыл бұрын
Hi Julius, thank you for the video, it is really helpful, however, speaking about the 3rd method, if the main element doesn't have an "id", but has a "class" (similar to the "class" that goes after "id" in your video), will it work if I use "class" instead of "id" in the trigger? Please advise, my main element looks like this: SIGN UP
@AnalyticsMania
@AnalyticsMania 2 жыл бұрын
Classes are more fragile than IDs, they are more prone to cause false positives or break. Maybe in your case they will work ok. But in general, I would recommend learning more about the CSS selectors. I have a module about them where I teach fundamentals specifically tailored to GTM www.analyticsmania.com/courses/intermediate-google-tag-manager-course/
@nehauk9314
@nehauk9314 2 жыл бұрын
my button is contain with link but in variables it has no click classes.how i can crrst trigger for that
@AnalyticsMania
@AnalyticsMania 2 жыл бұрын
you need to have the Just Links trigger configured in your container.
@asevero
@asevero 2 жыл бұрын
I do not know how to code. The website I am working on there is no ID or Class for the button, just URL. Is that a good idea to track this URL? Its a WhatsApp API url.
@AnalyticsMania
@AnalyticsMania 2 жыл бұрын
If that URL ks unique enough and you don't have any other whatsapp urls on a site, you can track by url
@asevero
@asevero 2 жыл бұрын
@@AnalyticsMania thanks! your channel is helping me a lot.
@Tripwithadi
@Tripwithadi 2 жыл бұрын
Why would tag fired, but status is failed..?
@praveenchandrasekaran7064
@praveenchandrasekaran7064 2 жыл бұрын
Hi, Nice video how to track the add to cart button with item name, item value
@AnalyticsMania
@AnalyticsMania 2 жыл бұрын
Ask a developer to push that data to the data layer in a properly formatted way, then configure tags, triggers and variables to send that data to GA. Not a simple task. Everything is explained in great detail here www.analyticsmania.com/courses/intermediate-google-tag-manager-course/
@tomtao6098
@tomtao6098 3 жыл бұрын
Can we just request data layer event to developer and let the developer worry about this? My understanding is all three approaches you introduced here are less reliable than the data layer approach
@AnalyticsMania
@AnalyticsMania 3 жыл бұрын
Yes you can. But that way, you will be much more dependent on the IT. There are more fragile cases where developer's input is a must.
@itskills1047
@itskills1047 8 ай бұрын
in google analytics where i can store click counts
@AnalyticsMania
@AnalyticsMania 8 ай бұрын
If you are tracking click events, the counts are already stored in GA
@AndreMR
@AndreMR 9 ай бұрын
this have to be revisited by google. we have to create a lot of names and steps for 1 single event detected. for a custom click: trigger name, tag name, event name, parameter name...
@nikssluk
@nikssluk 2 жыл бұрын
ok, what if my tag is not firing?
@abdqz5370
@abdqz5370 3 ай бұрын
ok the first method and i havent click id i only have click url how can i resolve that
@AnalyticsMania
@AnalyticsMania 3 ай бұрын
Check the other methods
@abdqz5370
@abdqz5370 3 ай бұрын
@@AnalyticsMania I'm really glad for your replay I will check the other methods and give the feedback I apply for the fb community, hope to be part of
@onlinemarketingzone6794
@onlinemarketingzone6794 Жыл бұрын
Hey bro,! Just a hint. You´re too fast. Are you doing this for yourself or for us? I like your straight-to-the-point mood, but you don't have to rush. Keep it up with great content🙂
@sejammark4553
@sejammark4553 2 жыл бұрын
I think, you had created video after watching fast and furious.
@dakotadaniels8598
@dakotadaniels8598 2 жыл бұрын
a little feedback, SLOW DOWN
@AnalyticsMania
@AnalyticsMania 2 жыл бұрын
Easier said than done. That is how I speak. It is difficult for naturally fast speaking people control their speed
@ika6884
@ika6884 Жыл бұрын
No, don't slow down. Perfect pace. This person can slow the speed of the video if they are slow.
@marcosansalone
@marcosansalone 7 ай бұрын
Is it possible a method without GTM ?
@AnalyticsMania
@AnalyticsMania 7 ай бұрын
Ask a developer to track the buttons and send send the events with gtag to googlr analytics 4
@marcosansalone
@marcosansalone 7 ай бұрын
@@AnalyticsMania "send the events with gtag" you are suggesting Google Tag Manager where I would like to avoid that.
Google Tag Manager Tutorial for Beginners (2023)
1:02:12
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 68 М.
Click Element Variable in Google Tag Manager (how to use it correctly)
16:12
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 42 М.
1 класс vs 11 класс (неаккуратность)
01:00
БЕРТ
Рет қаралды 4,8 МЛН
How I prepare to meet the brothers Mbappé.. 🙈 @KylianMbappe
00:17
Celine Dept
Рет қаралды 55 МЛН
Button Click Tracking With GA4 and Google Tag Manager
17:26
Root & Branch Digital Marketing
Рет қаралды 21 М.
DOM element variable in Google Tag Manager
17:02
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 19 М.
Google Analytics 4 Click Tracking
19:22
Loves Data
Рет қаралды 26 М.
Track Video with Google Analytics 4 and Google Tag Manager (Youtube, Vimeo, and more)
17:34
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 45 М.
5 Advanced Google Tag Manager tips
21:08
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 13 М.
Track Clicks with Google Analytics 4 and Google Tag Manager
20:56
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 69 М.
Google Tag Manager Tutorial for Beginners (2024) with New Google Tag
1:01:26
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 160 М.
Track Single Page Applications with Google Tag Manager and Google Analytics 4 (3 methods)
29:29
Analytics Mania - Google Analytics & Tag Manager
Рет қаралды 50 М.
Эффект Карбонаро и бумажный телефон
1:01
История одного вокалиста
Рет қаралды 2,6 МЛН
POCO F6 PRO - ЛУЧШИЙ POCO НА ДАННЫЙ МОМЕНТ!
18:51
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 7 МЛН
ПК с Авито за 3000р
0:58
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 1,6 МЛН
Теперь это его телефон
0:21
Хорошие Новости
Рет қаралды 1,7 МЛН
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 951 М.