Hi All
I am trying to set some variables on a particular page. Page can be identifiable by document.title only.
So I did the following: created a load rule and chose in the Conditions "custom" where I tried to place different versions of the code:
return ((document.title.match("1.3.3-make-a-payment")? true : false) return (document.title.match("1.3.3-make-a-payment")) ? true : false; return (document.title==“1.3.3-make-a-payment") ? true : false;
return ((document.title.match("1.3.3-make-a-payment"))? true : false);
return ((document.title.match("1.3.3-make-a-payment"))? true : false)
return ((document.title=="1.3.3-make-a-payment"))? true : false)
The last one returns 'true' in the console but does not work in DTM.
if (document.title =="1.3.3-make-a-payment"){ var zho = true;} else { var zho= false;} return zho;
Which one is correct?
Did I use a correct approach?