Custom event rule not firing in Adobe DTM
up vote
1
down vote
favorite
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 my-widget-loaded on #documentument
But it never fires my rule, I never see a message like:
SATELLITE: Rule "My Custom Rule" fired.
I have verified that I can create custom event handlers within the console and they fire just fine.
What can I do to make my rule fire? Why isn't it working?
adobe-analytics adobe-dtm
add a comment |
up vote
1
down vote
favorite
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 my-widget-loaded on #documentument
But it never fires my rule, I never see a message like:
SATELLITE: Rule "My Custom Rule" fired.
I have verified that I can create custom event handlers within the console and they fire just fine.
What can I do to make my rule fire? Why isn't it working?
adobe-analytics adobe-dtm
1
"my-widget-loaded" vs "wtb-load", you sure you have the right event name?
– BrettAHale
Nov 12 at 3:54
@BrettAHale that was a typo, fixed it!
– Scott Coates
Nov 13 at 17:03
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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 my-widget-loaded on #documentument
But it never fires my rule, I never see a message like:
SATELLITE: Rule "My Custom Rule" fired.
I have verified that I can create custom event handlers within the console and they fire just fine.
What can I do to make my rule fire? Why isn't it working?
adobe-analytics adobe-dtm
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 my-widget-loaded on #documentument
But it never fires my rule, I never see a message like:
SATELLITE: Rule "My Custom Rule" fired.
I have verified that I can create custom event handlers within the console and they fire just fine.
What can I do to make my rule fire? Why isn't it working?
adobe-analytics adobe-dtm
adobe-analytics adobe-dtm
edited Nov 13 at 17:02
asked Nov 11 at 18:53
Scott Coates
1,26421833
1,26421833
1
"my-widget-loaded" vs "wtb-load", you sure you have the right event name?
– BrettAHale
Nov 12 at 3:54
@BrettAHale that was a typo, fixed it!
– Scott Coates
Nov 13 at 17:03
add a comment |
1
"my-widget-loaded" vs "wtb-load", you sure you have the right event name?
– BrettAHale
Nov 12 at 3:54
@BrettAHale that was a typo, fixed it!
– Scott Coates
Nov 13 at 17:03
1
1
"my-widget-loaded" vs "wtb-load", you sure you have the right event name?
– BrettAHale
Nov 12 at 3:54
"my-widget-loaded" vs "wtb-load", you sure you have the right event name?
– BrettAHale
Nov 12 at 3:54
@BrettAHale that was a typo, fixed it!
– Scott Coates
Nov 13 at 17:03
@BrettAHale that was a typo, fixed it!
– Scott Coates
Nov 13 at 17:03
add a comment |
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
DTM (and Launch) does not properly listen for custom events when using document
as the Element or Tag Selector. Use body
(and document.body.dispatchEvent
) instead.
This is correct. Changing tobody
worked. Is there any documentation for this? This would have saved some time. Additionally, I had to check the boxApply event handler directly to element
.
– Scott Coates
Nov 13 at 17:04
Not that I know of. I just found out from dealing with similar issue and poked at the DTM library to see what it did.
– Crayon Violent
Nov 14 at 3:37
That's impressive! I was digging in their minified code and wasn't getting anywhere.
– Scott Coates
Nov 15 at 4:06
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
DTM (and Launch) does not properly listen for custom events when using document
as the Element or Tag Selector. Use body
(and document.body.dispatchEvent
) instead.
This is correct. Changing tobody
worked. Is there any documentation for this? This would have saved some time. Additionally, I had to check the boxApply event handler directly to element
.
– Scott Coates
Nov 13 at 17:04
Not that I know of. I just found out from dealing with similar issue and poked at the DTM library to see what it did.
– Crayon Violent
Nov 14 at 3:37
That's impressive! I was digging in their minified code and wasn't getting anywhere.
– Scott Coates
Nov 15 at 4:06
add a comment |
up vote
1
down vote
accepted
DTM (and Launch) does not properly listen for custom events when using document
as the Element or Tag Selector. Use body
(and document.body.dispatchEvent
) instead.
This is correct. Changing tobody
worked. Is there any documentation for this? This would have saved some time. Additionally, I had to check the boxApply event handler directly to element
.
– Scott Coates
Nov 13 at 17:04
Not that I know of. I just found out from dealing with similar issue and poked at the DTM library to see what it did.
– Crayon Violent
Nov 14 at 3:37
That's impressive! I was digging in their minified code and wasn't getting anywhere.
– Scott Coates
Nov 15 at 4:06
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
DTM (and Launch) does not properly listen for custom events when using document
as the Element or Tag Selector. Use body
(and document.body.dispatchEvent
) instead.
DTM (and Launch) does not properly listen for custom events when using document
as the Element or Tag Selector. Use body
(and document.body.dispatchEvent
) instead.
answered Nov 13 at 3:18
Crayon Violent
26.9k34267
26.9k34267
This is correct. Changing tobody
worked. Is there any documentation for this? This would have saved some time. Additionally, I had to check the boxApply event handler directly to element
.
– Scott Coates
Nov 13 at 17:04
Not that I know of. I just found out from dealing with similar issue and poked at the DTM library to see what it did.
– Crayon Violent
Nov 14 at 3:37
That's impressive! I was digging in their minified code and wasn't getting anywhere.
– Scott Coates
Nov 15 at 4:06
add a comment |
This is correct. Changing tobody
worked. Is there any documentation for this? This would have saved some time. Additionally, I had to check the boxApply event handler directly to element
.
– Scott Coates
Nov 13 at 17:04
Not that I know of. I just found out from dealing with similar issue and poked at the DTM library to see what it did.
– Crayon Violent
Nov 14 at 3:37
That's impressive! I was digging in their minified code and wasn't getting anywhere.
– Scott Coates
Nov 15 at 4:06
This is correct. Changing to
body
worked. Is there any documentation for this? This would have saved some time. Additionally, I had to check the box Apply event handler directly to element
.– Scott Coates
Nov 13 at 17:04
This is correct. Changing to
body
worked. Is there any documentation for this? This would have saved some time. Additionally, I had to check the box Apply event handler directly to element
.– Scott Coates
Nov 13 at 17:04
Not that I know of. I just found out from dealing with similar issue and poked at the DTM library to see what it did.
– Crayon Violent
Nov 14 at 3:37
Not that I know of. I just found out from dealing with similar issue and poked at the DTM library to see what it did.
– Crayon Violent
Nov 14 at 3:37
That's impressive! I was digging in their minified code and wasn't getting anywhere.
– Scott Coates
Nov 15 at 4:06
That's impressive! I was digging in their minified code and wasn't getting anywhere.
– Scott Coates
Nov 15 at 4:06
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53252064%2fcustom-event-rule-not-firing-in-adobe-dtm%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
"my-widget-loaded" vs "wtb-load", you sure you have the right event name?
– BrettAHale
Nov 12 at 3:54
@BrettAHale that was a typo, fixed it!
– Scott Coates
Nov 13 at 17:03