You can wrap the code w/ a <script> put the code here </script> and put it in a Hook element.
You then set the Hook element’s to either wp_head or wp_footer depending on where the script should be added and set the display rule location to the page where this script is supposed to load. 😀