It is a Core-click event rule with no conditions and needs to fire on any element. There are no console errors. I tried setting prop or eVar but it didn't help too. It might be a s object problem, but how do we verify I am able to access the s object from the rule?
I tired setting events directly from the UI instead of custom code and it worked fine.
Also, from my understanding, you should still be able to access the s object from the custom code section of the Analytics extension. Which custom code section are you trying to set the events in? Are you using the custom section in the actions portion of the rule? If so, what extension are you using in your action configuration?
So if you weren't able to set any variables on the s object, it's likely a scoping issue. Can I ask why you are trying to set variables in the custom code section to begin with? If you are just setting events, the UI should be able to handle that without any problem.