How can I access we web variables inside custom code, the one that loads on initial page load

I want to access we web variables inside my custom code of a particular page on Load, how to achieve it its inside the body of the custom code of a particular pages body. Do check this and let me know.

scenario want to change id of video element as per the condition in my variable object

Hi @devika You can do that using this method available
wwLib.wwVariable.getValue(“variable_id”)
wwLib.wwVariable.updateValue(“variable_id”,newValue)
Also to find the any variable id you can simply fetch all the variable id’s or (details of collections,workflows etc) with this method
wwLib.$store._state.data.data.variables
wwLib.$store._state.data.data.collections
You can try above methods in the browser console as well or in the More > Development > Show dev information

Variable id are also available if you toogle the dev information