I tried to create event rule for click tracking of "a" tag which has specific property, but the rule fired even on all other links.
I investigated it and found SL.propertiesMatch function has a procedure might cause unintended behavior easily.
I intend to assign propery "data-tracking" with any value at "condition" area in DTM and set "data-tracking" = .* (RegExp).
Then I clarified it on staging website, every time i clicked anchor links, that rule fired.
When links which does NOT have specified property are clicked, DTM searches "data-tracking" property and returns null.
Then it checks if null(null) matches /.*/i (RegExp). It must be failed, but it returns TRUE because RegExp.test() method treats passed null as a string "null"!!
SL.propertiesMatch = function(e, t) { if (e) for (var n in e) if (e.hasOwnProperty(n)) { var i = e[n] , a = SL.getElementProperty(t, n); if ("string" == typeof i && i !== a) return !1; if (i instanceof RegExp && !i.test(a)) return !1 } return !0 }