If the data element is setup correctly, then it is likely a timing issue. Check and see where the rule is loading (in the rule condition); if it’s loading at Top of Page or Onload, then the data element is likely not available on the page yet when the rule fires. Try switching the rule to load at Bottom of Page or DOM Ready so the data element has more time to populate before the rules fires.