Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

DTM Custom Event Not Firing

Avatar

Level 1

I'm using DTM to listen for an event-based rule, named "My Custom Rule". The event type is "custom", as I'm using custom events to track actions from a 3rd party widget. This is my configuration below. It's fairly bland, and I have no conditions (yet). The custom event name is "my-widget-loaded".

Screen Shot 2018-11-10 at 6.45.00 PM.png

Within my 3rd party widget, I trigger my custom event:

document.dispatchEvent(new CustomEvent('my-widget-loaded'));

In the console, I see:

SATELLITE: detected wtb-load on #documentument

But it never fires my rule, I never see a message like:

SATELLITE: Rule "My Custom Rule" fired.

What can I do to make my rule fire? Why isn't it working?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Try dispatching it on document.body

document.body.dispatchEvent(new CustomEvent('my-widget-loaded'));

Also, update your rule setting `Element Tag or Selector` to `body`



View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Try dispatching it on document.body

document.body.dispatchEvent(new CustomEvent('my-widget-loaded'));

Also, update your rule setting `Element Tag or Selector` to `body`