EVENT BASED RULES in DTM | Community
Skip to main content
Level 2
October 16, 2015
Solved

EVENT BASED RULES in DTM

  • October 16, 2015
  • 13 replies
  • 5762 views

Hi everyone, I have 2 questions regarding DTM indeed. Any help would be appreciated.

1. event based rules

in Adobe Analytics section if I use partly interface for eVars/props/event and partly code it never works, it takes only values from interface, if I remove everything from interface and leave only code, it will pass everything like s.t() despite the box s.tl() is checked. That's pretty weird. What should I do as I need to use code in Open Editor for some logic

2. page load rules

I've noticed that page names are never overriden. For example if I set page-load rule with populating page names on the "bottom page" level and then on the "onload" or "dom" levels another page rule overriden the pagename, it will never override.

So for me it seems that the only possible case to set the custom page name for the specific page is - to create a page rule on the bottom level while setting the general rule for populating pages in the page load rule on the "onload" stage

Am I right?

 

Thanks in advance

Alexander

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by jstachowicz

Hi Alexander,

This still looks like a timing issue from what I can see. The custom code does not appear to be firing in time to get passed with the s.tl() call. Here are a few things to check.

First, if you are targeting anchor tags, then check the "delay link activation" box next to the "click" event in the rule conditions. This provides a default 100ms delay to allow processing of the code prior to activating the tools and custom code. You can control the amount of time in the delay by going to the "edit property" button on the "overview" tab and clicking on the "advanced" options. Then just adjust the anchor delay time as necessary. This only works on anchor tags, so you will not see an effect if you are targeting clicks on different elements.

Next, if the situation persists, then validate that the custom code is firing correctly. Add some code like this to the custom code area and check to see if the debug messages show up in the javascript console.

_satellite.notify('setting prop6',1);
s.prop6="debug 1";

Type "s" in the console and see if prop6 ever gets set. If it does then there is a timing issue and the s.tl() is firing too quickly for the code to process. There can be a number of factors that can contribute to this situation, but if it does happen and you can't identify the appropriate delay points for the element then I would suggest using the DTM best practice of setting a data element equal to the value that you would like to set and referencing it in the UI portion of the rule. This will make sure that the value is referenced in time and processed correctly. Data elements also allow for very complex code to be evaluated prior to inclusion in a rule and make reuse simple between rules. This reduces processing time and improves the user experience.

Hope that helps. Let us know if that resolves the issue for you or if you would like some additional assistance.

-Joel

13 replies

jstachowiczAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

Hi Alexander,

This still looks like a timing issue from what I can see. The custom code does not appear to be firing in time to get passed with the s.tl() call. Here are a few things to check.

First, if you are targeting anchor tags, then check the "delay link activation" box next to the "click" event in the rule conditions. This provides a default 100ms delay to allow processing of the code prior to activating the tools and custom code. You can control the amount of time in the delay by going to the "edit property" button on the "overview" tab and clicking on the "advanced" options. Then just adjust the anchor delay time as necessary. This only works on anchor tags, so you will not see an effect if you are targeting clicks on different elements.

Next, if the situation persists, then validate that the custom code is firing correctly. Add some code like this to the custom code area and check to see if the debug messages show up in the javascript console.

_satellite.notify('setting prop6',1);
s.prop6="debug 1";

Type "s" in the console and see if prop6 ever gets set. If it does then there is a timing issue and the s.tl() is firing too quickly for the code to process. There can be a number of factors that can contribute to this situation, but if it does happen and you can't identify the appropriate delay points for the element then I would suggest using the DTM best practice of setting a data element equal to the value that you would like to set and referencing it in the UI portion of the rule. This will make sure that the value is referenced in time and processed correctly. Data elements also allow for very complex code to be evaluated prior to inclusion in a rule and make reuse simple between rules. This reduces processing time and improves the user experience.

Hope that helps. Let us know if that resolves the issue for you or if you would like some additional assistance.

-Joel

Level 2
October 16, 2015

Hi Joel,

thanks for reply, sorry for late response, I've been on holidays.

However using third-party js doesn't help

I am attaching a screenshot that will help to shed light on what I mean. You can see that in one event based rule I am adding some variables by using the interface (event11 and also some eVars, I just cut off the screen to make it more readable) and I am also using the code where I set prop6 variable. This is a s.tl() event based rule.

However, when this rule is fired I can see that only variables set by the interface are passed. We need to make it able to write conditions partly in the interface, partly in the code window.

I also tried to create two separate event based rules where in one of them I use only the interface and in another one I use only the window code dialogue. However the second rule (when only window dialogue code conditions) triggers s.t() despite s.tl() is set.

 

Regards, 

Alexander

Adobe Employee
October 16, 2015

Hi Alexander,

In both the global Analytics custom code section and in the individual rule Analytics custom code, the code should be fired immediately prior to the beacon request. Have you tried entering the entire code block for the event based rule into a sequential third-party javascript to make sure that it fires correctly independent of the UI? There may be something else going on that we can investigate, but eliminate the UI first to rule that out as an issue.

Timing is probably the challenge for the page load rule. Take a look at the DTM timing sequence to make sure that the page name sets are occurring in the order that you expect. https://microsite.omniture.com/t2/help/en_US/dtm/#Load_Order_for_Rules

If you are still having issues after checking those options then just post back to this thread and we'll investigate further.

- Joel