Tagged: Button Row, events, google tag manager
-
AuthorPosts
-
March 16, 2020 at 11:21 am #1193435
Hi, if I’ve added a class to a button row element (.hero-cta-buttons), how would I be able to target the individual buttons for Google Tag Manager event tracking?
I’m struggling to ‘connect’ with a button within a Button Row element.
Any advice on how to do this and to actually track the button as an event when clicked?
Many thanks
March 16, 2020 at 8:15 pm #1193606Hey johnosjourney,
Please have a look at the following thread:
Could you please give us a link to your website, we need more context to be able to help you to get the correct selector.
If you need further assistance please let us know.
Best regards,
VictoriaMarch 17, 2020 at 7:57 am #1193736Hi, yes sorry Victoria, that would be a good idea wouldn’t it! The website in question is http://www.gtautocentre.com
March 17, 2020 at 8:29 am #1193738The link that you gave me doesn’t really answer my question. I’m looking to be able to target a button within a Button Row element from the ALB modules.
My Button Row element has a class of .hero-cta-buttons assigned to it but I would like to then target each button so that I can set up tracking in Google Tag manager using the following Trigger Configuration: I’m currently trying to track the second button within the button row which is a Whatsapp button. I’d like to be able to assign the actual of the button a class of .whatsapp-cta
Click Classes > Equals > .whatsapp-cta
Does that make sense?
ThanksMarch 19, 2020 at 5:51 pm #1194484Hi johnosjourney,
Well, the way to id the buttons uniquely is this:
.hero-cta-buttons a[href="tel:+971043237106"] .hero-cta-buttons a[href="https://api.whatsapp.com/send?phone=971585877106&text=&source=&data="]
But if you change the links you will need to update the href value too.
Best regards,
VictoriaMarch 19, 2020 at 6:17 pm #1194495Wow, thats amazing Victoria. Thanks so much for this. I’m going to give it a whirl and let you know how I get on!
Thanks againMarch 19, 2020 at 9:02 pm #1194587Hi johnosjourney,
Great :)
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- You must be logged in to reply to this topic.