I am pretty new to this side of Adobe Analytics so please be gentle as I might be saying or doing most things completely wrong.
I am currently trying to fire an event through an event based rule. Since I was unable to do it by myself I have been searching the web and this forum in search for a working solution. On this very forum, I bumped accross a lovely post by @SarahEOwen (Track clicks on button using DTM ) which I have followed to the letter to no avail. I even followed the validation part of Sarah's post and believe it or not I did manage to get the prompt alert to fire on the console but I was never able to get the success event to fire hence me creating this post!
I am trying to get the event to fire on this site https://www.madridfusion.net/en/ on the SUBSCRIBE TO OUR NEWSLETTER module. Here is the tricky bit (at least it is for me ) Once you placed a bogus email (sort of firstname.lastname@example.org) in the email field you get a modal layer with a second clickable element. The first element is a button, the second one is type submit. Both of them have got an attribute by the name of data-voc-vtm-id so tried to get it to fire the rule using [data-voc-vtm-id^='btnsuscribirse-'] as shown below.
I also tried duplicating the rules one for click one for submit to no avail. Last thing I'd like to point out is that when using jQuery("[data-voc-vtm-id^='btnsuscribirse-']") on the console does indeed gets me back some results.
Anything that makes us go forward will be greatly appreciated.
I am still unable to get it to fire as expected. I've tried every posibility I can think of and it is getting really frustrating by now . Thanks very much for your input as this seems more complicated than meets the eye and it is becoming clear to me I woun't be able to do it by myself.
Bare in mind that the modal dialog is not a botom click but a input submit instead and that the solution will best work as earlier stated using the atribute data-voc-vtm-id and the value btnsuscribirse-:
I've tried all sorts of combinations including with and without Apply event handler directly to element as well as all possible combinations as regards to bubbling to no avail.
Thanks very much for your reply. Thing is... there so many sites that use this functionality across our organisation where every widget is implemented in their own way. That's why I was trying to use an attribute that is remains the same accross all sites. Also, using this methodology (attribute based) with the only modifiation required within this method would be the need to remove those atributes on page 1 and leaving them as they are on the confirmation page modal.
Since the only element that does not change is an attribute that has a value with a prefix I wanted to give it a go using this sentence: [data-voc-vtm-id^='btnsuscribirse-'] but I am not able to make it work.