Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #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

    #1193606

    Hey 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,
    Victoria

    #1193736

    Hi, yes sorry Victoria, that would be a good idea wouldn’t it! The website in question is http://www.gtautocentre.com

    #1193738

    The 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?
    Thanks

    #1194484

    Hi 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,
    Victoria

    #1194495

    Wow, 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 again

    #1194587

    Hi johnosjourney,

    Great :)

    If you need further assistance please let us know.
    Best regards,
    Victoria

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.