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

EVENT BASED RULES in DTM

  • October 16, 2015
  • 13 replies
  • 5749 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

New Participant
October 16, 2015

Hi Joel,

yes this plugin is very helpful, thanks

you are right about timing issue. However, as I said I tried many different options for the delay and nothing worked (even more than 1000 ms) and as you wrote a few messages earlier that I need to return some custom code for firing only once. So I wonder how to turn around this. I am currently aiming at the <h1> tag (it's inside <a> tag), Ill try the rule to <a> tag and I will let you know, maybe it will help

 

Regards, 

Alexander

New Participant
October 16, 2015

Now nothing works at all as I have the issue in the screenshot I've attached.

I'll be scrutinizing it tomorrow (that's odd, I didn't change the code) but maybe you know by chance what could be the culprit?

 

Alexander

Ron_Coffman_102
New Participant
October 16, 2015

I'm seeing the same issue - variables that were added via the UI are included in the event-based request, and the "list1" variable I set via the Custom Page Code editor is not.

Unfortunately I can't set a list variable via the UI...