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



DTM Manager



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?










share|improve this question




















  • 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















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



DTM Manager



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?










share|improve this question




















  • 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













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



DTM Manager



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?










share|improve this question















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



DTM Manager



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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








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














  • 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












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.






share|improve this answer





















  • 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










  • That's impressive! I was digging in their minified code and wasn't getting anywhere.
    – Scott Coates
    Nov 15 at 4:06











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















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

























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.






share|improve this answer





















  • 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










  • That's impressive! I was digging in their minified code and wasn't getting anywhere.
    – Scott Coates
    Nov 15 at 4:06















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.






share|improve this answer





















  • 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










  • That's impressive! I was digging in their minified code and wasn't getting anywhere.
    – Scott Coates
    Nov 15 at 4:06













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.






share|improve this answer












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.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 13 at 3:18









Crayon Violent

26.9k34267




26.9k34267












  • 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










  • 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












  • 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


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














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





















































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







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Can I use Tabulator js library in my java Spring + Thymeleaf project?