[Support request] Menu click classes not pulling through

Home Forums Support [Support request] Menu click classes not pulling through

Home Forums Support Menu click classes not pulling through

  • This topic has 3 replies, 2 voices, and was last updated 2 years ago by David.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2193372
    Michael

    Hi there,

    I’ve added optional css classes to our menu but they aren’t pulling through as GTM variables: https://www.goodsignals.com/

    Any ideas?

    #2193402
    David
    Staff
    Customer Support

    Hi there,

    how did you add the Class ? Was that in the Appearance > Menus ? If so those classes get added to the <li> list element not the <a> anchor so it may be the listener is only looking for links (?)

    #2193415
    Michael

    Yes, that’s correct via appearance > menus. Do you know another way to add class IDs to menu items?

    #2193432
    David
    Staff
    Customer Support

    Its been a while but when you define the trigger is there still a config for:

    Click Element -> Matches CSS Selector

    If so you should be able to use that and in the 3rd field do something like:

    .my-gtm-class a

    Then it should target the clicked element…. i think

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