DTM Custom Event Not Firing

Avatar

Avatar
Validate 1
Level 1
scottc30992367
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
scottc30992367
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
scottc30992367
Level 1

10-11-2018

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?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
StewSchilling
MVP

Likes

342 likes

Total Posts

278 posts

Correct reply

85 solutions
Top badges earned
Coach
Give Back 25
Springboard
Bedrock
Validate 1
View profile

Avatar
Coach
MVP
StewSchilling
MVP

Likes

342 likes

Total Posts

278 posts

Correct reply

85 solutions
Top badges earned
Coach
Give Back 25
Springboard
Bedrock
Validate 1
View profile
StewSchilling
MVP

19-11-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`



Answers (0)