Any idea why DTM won't fire more than once for me on the "Element Exists" rule? There is a span element that pops up whenever I want this rule to fire, and DTM's own notifications detects its existence, but for some reason the rule won't fire after the first time.
I've tried every combination of Bubbling options I can think of.
Take a look at my console notifications:
The part highlighted in Red is the part I want to fire each time. See how the same sequence later stops with DTM saying to me: "yep, it's there..."
Thanks for your help!
Thanks for reaching out to Adobe Community.
Please accept my apologies for the inconvenience caused. I would request you to kindly go through the below troubleshooting article and see if that helps:
It did not help. That document is very generic, and the inconsistencies it addresses are those where the code doesn't have time to fire (such as when you're capturing data on a click). There is no click here, we're just looking for the rule to fire when the element exists. It happens the first time it's detected, and then when it's detected again, it does not happen.
Is there a url where we can see this happening ?
Feel free to give me a call, and I can walk you through it. Search through your email archive for "cscribner"; I know I sent you an email that has my phone number in it.
Going from something on Search Discovery's FAQ, it looks like the elementexists may only fire when an element enters the DOM (otherwise, the rule would probably just firing over and over since it continues to exist). It's hard to tell without seeing your code, but if the .errorflag element is already in the DOM from the first trigger, maybe that could prevent it from triggering the rule again?
Could you also maybe approach it the other way and make whatever is triggering the error span to appear also kick a direct rule call (_satellite.track)?
Mike, I wish I understood what the Direct Rules were for. I can't find any documentation on it, or sufficient explanation of when or why it should be used. Can you be my sensei? I would love to learn what you know.
The most important problem I'm facing from DTM is that I want to trigger events *not* by what the user does (clicks, hovers, etc), but rather by what my site is showing the user. So much of the experience changes dynamically on the pages that the URL is no good to me. I've been using a lot of Element Exists rules, but they don't fire as reliably as I need them to, and so I've been resorting to my own set of jQuery listeners.
So what I'm really looking for is a way to send something to the page that will trigger my DTM events. I can tell my developers to populate data layer variables in a certain scenario, but that doesn't necessarily trigger anything on DTM's side, so the data just sits there unsent.
Yes, that's exactly what the direct calls do.
The training video gives a little background: https://outv.omniture.com/?v=tvaTY4ZzoJ087ioJpJptl9npM_8QGDxU
Mike, Thank you so much for pointing me to this. Let me tell you what kind of trouble you just caused: I just completed the most hectic week of my life, because we switched 180 degrees from an Event-Based Rule implementation to a Direct Call Rule implementation. It was *absolutely* the right thing to do, and I'm so grateful for you turning me onto it.
I even wrote a blog post about that switch, and why I'll never go back to Event-Based rules in any TMS. There's a shout-out to you in it (I didn't call you out by name, but I will if you want).