I run a membership site and have a script that shows an opt-in pop up form after visitors are on the page for more than 10 seconds. However, this pop-up shows up for public uses as well as our paid members.
How can I wrap the pop-up <script>
in some custom JavaScript code to detect the presence of the "logged-in" body class? If it is found, the script should not fire.