Is there a way to set the rule condition to the current URL instead of path URL? For example, I want the click event to fire on a page with /products in the current URL. If I use "path" as my condition, the click event will fire only if the NEXT page that loads has /products in the URL.
I'm not sure that I understand your issue. URL > Path (and other components) is based off the current URL (the window.location object).
I will make a sidenote that for DTM, Path actually means location.pathname+location.search. For this reason, I have a data element named location_pathname that returns location.pathname. In any case, maybe there is some kind of conflict with your value vs. this?
My next guess is maybe you have timing issues because of some pushState/hashchange on your site.
But.. all of this is just throwing darts in the dark since you have not provided full details.
The only stable way I have found to solve for timing issues with rules vs. pushState/hashchange is to have the devs explicitly call something (e.g. a Direct Call Rule) before the pushState/hashchange is executed.
Your guess is actually correct. I find this issue on my site which is a single page application using pushState/hashchange rules. The timing issue I'm encountering is for a click event with /products included in the path. I want the rule to fire on any page with /products in the URL but it seems to fire only if it NEXT page has /products in the URL. Any workaround or resolution would be appreciated. Thanks!