Search code examples
google-tag-manager

Finding the correct CSS Selector to put in a Trigger


I am trying to add the correct CSS selector for Click Element in (Google Tag Manager)

This is for the following action:

https://aurumiceland.com/pages/join-our-insider-list-newsletter

Click on the button Subscribe.

I tried adding the class from the Thank you Message but it either doesnt trigger at all or it triggers when just opening the page.


Solution

  • I will propose this CSS selector

    div[class*='klaviyo-form'] form button
    

    But just wonder did you already try some CSS selector first?


    Not sure why it won't work in your end.

    I test it with my GTM container and looks like it's working

    Here is the trigger setting

    enter image description here