WP site hosting platform WPEngine does not support feature to create or access Session and Cookie variable due to security reason. So while seeking alternative to store and access different values across the site I found localStorage.
localStorage is a attribute of browser that allows sites to preserve value in a browser. Such data stored will be available even after the browser’s window is closed. Continue reading localstorage as alternative of Session and Cookie