Some use cases:
You can either set up scripts to inject when creating a page, or later on by clicking "edit" when viewing the page results.
Edit the page
Expand the "Inject Scripts" section here:
Select or create a script
There are two types of scripts.
Scripts that run before the page starts loading let you set preconditions or configuration for your page.
Scripts that run after the page finished loading allow you to script interactions that cause more data to be captured about your page. For example, you can use this to make sure certain requests are part of your page archives.
When you create or edit a script you'll see a modal were you can enter your code snippet.
Save your page changes
After saving the script, click "Update" to save the page.