DTM Custom Event Not Firing | Adobe Higher Education
Skip to main content
November 11, 2018
Respondido

DTM Custom Event Not Firing

  • November 11, 2018
  • 1 resposta
  • 1913 Visualizações

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".

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?

Este tópico foi fechado para respostas.
Melhor resposta por Stewart_Schilling

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`



1 Resposta

Stewart_Schilling
Community Advisor
Community Advisor
November 19, 2018

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`