Troubleshooting Rule Issues

Troubleshooting Rule Issues:

Common issues encountered when working with rules are:

  • Rules firing in incorrect order
  • Rules firing inconsistently
  • Custom script does not trigger on Page load rule
  • Rule firing but Data Element not populating
  • Variables are not getting set in custom code section of Adobe Analytics during rule execution
  • Which tracking option to use while working with Event Based rule

My rule does not trigger at the desired condition

If your event-based rule does not fire, then there is likely an issue with the selector or condition of the rule. Locate the element on your site where the desired event action occurs, right click and select Inspect element. Inspect the highlighted script in the box that opens and ensure that you are targeting the correct element. Example:

Target element: <div class=’Button1’ style=’opacity: 1’>

In this scenario, the selector syntax is set as follows:

  • CSS Selector Syntax: div.Button1 OR div[class=’Button1’]
  • Manually assign attributes:
  • Element Tag: div, Property: class, Value: Button1

I suspect that my rules are firing in the incorrect order. Where can I find more information about the load order of rules?

It is important that rules fire in the correct order. Many problems with rules are the result of rules firing in the wrong order. For more information, see Load Order for Rules.

My rule fires inconsistently.

There are two possible reasons for a rule to fire inconsistently:

  • Does the event action incite a link to load? If so, it's possible the rule does not have enough time to fire before the new page loads. Check the box within the rule identifier indicating Delay link activation. Delaying the link keeps the activated link from loading until the rule has fired.
  • If the event does not incite a new page load, there could be an issue with bubbling. If the event action can occur on a child or parent item, ensure the button indicating Allow events on child elements to bubble is checked. Bubbling ensures that the rule fires whether the user interacts with the child or parent element or does not.

My third-party or custom script does not trigger when my page load rule fires.

Verify what type of script you are using and the load option you have chosen for the rule. If you use sequential HTML, your rule must be set to load at Bottom / Top of Page. The script will not work if the rule is set to load Onload or DOM ready.

My rule is firing, but my data element isn't populating.

There’s likely a timing issue. Check and see where the rule is loading. If it’s loading at Top of Page or Onload, then the data element is likely not available yet when the rule fires. Try switching the rule to load at Bottom of Page or DOM Ready. If the data element still does not populate, refer to method for the previous question to ensure that the data element is available on the page.

How can I debug a rule?

You can use the DTM Switch, browser plug-in for easy switching of debug mode and staging mode for dynamic tag management users. It is available for both Google Chrome and Mozilla Firefox. For more information, see Dynamic Tag Management plug-ins.

Why aren't the variables set in the custom code editor in the Adobe Analytics section of my rule executing?

When adding variables or events via the rule UI, linkTrackVars/linkTrackEvents are set automatically. However, when adding variables or events via the Custom Page Code editor it is added manually. For example:

s.linkTrackVars = s.eVar1
s.eVar1 = _satellite.getVar('Title Tag');

What tracking option i.e. s.t() or s.tl() should be used while working with Event Based rules?

When working with Event-based rules in Adobe Analytics section of a rule, there are two tracking options s.t() or s.tl(). Both tracking options have different use cases as highlighted below

  • s.t(): If you want to send data to Adobe Analytics from this rule, and you want to treat it as a page view.
  • s.tl(): If you want to send data to Adobe Analytics from this rule, and you do NOT want to treat it as a page view.

Generally, Event-based rules are used to track in-page interactions which would not count the page load. In most cases an s.tl() call would be used. In instances where the Event-based rule can be used to track the page load an s.t() call would be used instead.

 Adobe

Get help faster and easier

New user?