HI @VaishuNP
sure, the value in my example was just a dummy value to demonstrate how you can set a cookie with code.
In your case, in the rule that is sending the page view, I would use the code to persist the current analytics pageName as last action in the rule.
About your screenshot above: sin...