Button Click Tracking with Google Tag Manager - 3 methods

Ғылым және технология

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 KZread 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 KZread channel / @analyticsmania
#googletagmanager #googleanalytics4

Пікірлер: 99

  • @crazydevila
    @crazydevila3 жыл бұрын

    You are the best GA expert here. Thank you for all the videos and keep going!

  • @pikeconsultinggroupinc.5287
    @pikeconsultinggroupinc.52872 жыл бұрын

    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.

  • @jennygao7542
    @jennygao75422 жыл бұрын

    Nobody covered this button issue better than you! Can’t thank u enough

  • @codecontent9717
    @codecontent97172 жыл бұрын

    Your knowledge 7 understanding is unmatched. Amazing, thankx

  • @claudioduartesilva
    @claudioduartesilva2 жыл бұрын

    Great Video, that third method was just what I needed!

  • @yipgm1379
    @yipgm13792 жыл бұрын

    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

  • @DOUBLEECaDA
    @DOUBLEECaDA3 жыл бұрын

    Julius videos are real value! Cheers

  • @user-cq7zj7xs9d
    @user-cq7zj7xs9d4 ай бұрын

    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!

  • @rushiljain8574
    @rushiljain85742 жыл бұрын

    Wild card css selector was a game changer for me! Thanks so much 👍

  • @eduardozaccaro2519
    @eduardozaccaro25192 жыл бұрын

    Awesome video! The third option helped me a lot. Thank you very much.

  • @sergiimisiak2388
    @sergiimisiak2388 Жыл бұрын

    Your explanations are really helpful! Thanks a lot!

  • @RaviSingh-nv9bf
    @RaviSingh-nv9bf2 жыл бұрын

    Great video with very nice step by step explanation.

  • @yipgm1379
    @yipgm13792 жыл бұрын

    I really found the solutions for long long time. Cannot find the solutions until discovered your video! Great GTM expert

  • @asevero
    @asevero3 жыл бұрын

    Awesome! Your channel is the best! Thanks a lot.

  • @sl97
    @sl972 жыл бұрын

    very good explanation, especially the third way of tracking is important to know.

  • @manishjoshi1624
    @manishjoshi16242 жыл бұрын

    YOU ARE THE GOD OF ANALYTICS

  • @ryanyusuf3393
    @ryanyusuf33933 жыл бұрын

    You're awesome brother. Thank you! ❤️

  • @kawsarhossain7932
    @kawsarhossain7932 Жыл бұрын

    Excellent!! Keep it up.

  • @billbainivalu3487
    @billbainivalu34873 жыл бұрын

    Glad I found your channel ...

  • @learngrow9977
    @learngrow99772 жыл бұрын

    Thanks for sharing this informative tutorial. it will help me a lot in my work.👍

  • @calmingmusicstation6968
    @calmingmusicstation69682 жыл бұрын

    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?

  • @aminkh6872
    @aminkh687211 ай бұрын

    thank you it was really helpful

  • @rocmarkz6742
    @rocmarkz67422 жыл бұрын

    thank you so much for making this :)

  • @JohansSamsing
    @JohansSamsing Жыл бұрын

    Very helpful thx!

  • @RyanMendenhallSEO
    @RyanMendenhallSEO3 жыл бұрын

    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!

  • @besttravelservices2289
    @besttravelservices22892 жыл бұрын

    Unique Video, its worked🥰

  • @zobecookingcorner4391
    @zobecookingcorner4391 Жыл бұрын

    Love from Bangladesh boss!

  • @sampathvidanapathirana7698
    @sampathvidanapathirana7698 Жыл бұрын

    Thank you soooo much!

  • @sultanulmoeminin7155
    @sultanulmoeminin715510 ай бұрын

    Thank you so much.

  • @escapetothemoon9069
    @escapetothemoon90693 жыл бұрын

    Thank you so much!

  • @thomaskoch3788
    @thomaskoch3788 Жыл бұрын

    very useful tutorial*

  • @mdtanbir3723
    @mdtanbir37239 ай бұрын

    You are mentor💙

  • @ampliadigitalagency
    @ampliadigitalagency Жыл бұрын

    Thanks

  • @estebancoria2462
    @estebancoria24622 жыл бұрын

    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

  • @MartinBenesCreative
    @MartinBenesCreative3 жыл бұрын

    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.

  • @lazearteepublicidadedobras6594
    @lazearteepublicidadedobras65948 ай бұрын

    Thannnnks a lot

  • @sincere1115
    @sincere11152 жыл бұрын

    謝謝!

  • @akhilrawat3251
    @akhilrawat32512 жыл бұрын

    Thanu so much from india 🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳🇮🇳

  • @hectorcampbell8843
    @hectorcampbell88433 жыл бұрын

    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

  • @WeronikaSalach
    @WeronikaSalach10 ай бұрын

    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! :)

  • @stantan6130
    @stantan61303 жыл бұрын

    The third technique solved my issue. Thank you! Does the * select all child elements including multiple child levels deep?

  • @AnalyticsMania

    @AnalyticsMania

    3 жыл бұрын

    Yes

  • @nanajaeminbunny374
    @nanajaeminbunny3742 жыл бұрын

    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

  • @henrique7860
    @henrique78602 жыл бұрын

    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

  • @yeinnarayana2644
    @yeinnarayana26443 жыл бұрын

    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
    @ariskaparamitha963411 ай бұрын

    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..

  • @KevserKurt-os8ni
    @KevserKurt-os8ni3 ай бұрын

    can we use Click - All Elements for Click - Just Links

  • @amberhan4982
    @amberhan49822 жыл бұрын

    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

  • @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.

  • @derekcummings4780
    @derekcummings47802 жыл бұрын

    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?

  • @seniorseoIR
    @seniorseoIR3 жыл бұрын

    Greattttt

  • @sushiresource
    @sushiresource2 жыл бұрын

    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

  • @praveenchandrasekaran7064
    @praveenchandrasekaran70642 жыл бұрын

    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/

  • @gabz1989a
    @gabz1989a6 ай бұрын

    what if I have the link but it says tags not fired? and I have one for google tag

  • @yishay_yosef
    @yishay_yosef7 ай бұрын

    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

    7 ай бұрын

    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.

  • @yashsinojia6170
    @yashsinojia61702 жыл бұрын

    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?

  • @itskills1047
    @itskills10479 ай бұрын

    in google analytics where i can store click counts

  • @AnalyticsMania

    @AnalyticsMania

    9 ай бұрын

    If you are tracking click events, the counts are already stored in GA

  • @Tripwithadi
    @Tripwithadi2 жыл бұрын

    Why would tag fired, but status is failed..?

  • @nehauk9314
    @nehauk93142 жыл бұрын

    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.

  • @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

  • @shreekantshrivastava9764
    @shreekantshrivastava97643 жыл бұрын

    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.

  • @AndreMR
    @AndreMR10 ай бұрын

    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
    @nikssluk2 жыл бұрын

    ok, what if my tag is not firing?

  • @asevero
    @asevero2 жыл бұрын

    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.

  • @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🙂

  • @abdqz5370
    @abdqz53704 ай бұрын

    ok the first method and i havent click id i only have click url how can i resolve that

  • @AnalyticsMania

    @AnalyticsMania

    4 ай бұрын

    Check the other methods

  • @abdqz5370

    @abdqz5370

    4 ай бұрын

    @@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

  • @sejammark4553
    @sejammark45532 жыл бұрын

    I think, you had created video after watching fast and furious.

  • @anastasiyashevchenko3535
    @anastasiyashevchenko35352 жыл бұрын

    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/

  • @tomtao6098
    @tomtao60983 жыл бұрын

    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.

  • @dakotadaniels8598
    @dakotadaniels85982 жыл бұрын

    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
    @marcosansalone8 ай бұрын

    Is it possible a method without GTM ?

  • @AnalyticsMania

    @AnalyticsMania

    8 ай бұрын

    Ask a developer to track the buttons and send send the events with gtag to googlr analytics 4

  • @marcosansalone

    @marcosansalone

    8 ай бұрын

    @@AnalyticsMania "send the events with gtag" you are suggesting Google Tag Manager where I would like to avoid that.

Келесі