How to save opacity as data input for latch image setting?

I have a latched image (turns opacity 50% on/off) when clicked, however I can’t seem to save its condition into a data point, I wish to save its state with a respective user that’s logged into my website… Any help on this would be highly appreciated!

Can you just save it as a yes/no and have a conditional rule to do 50% opacity when true?