Hi @Eoin_citizien ,
Could you please share a bit more about your scenario?
Do you want to add a custom JavaScript in your web page?
Based on the JavaScript code that you mentioned, I think there may have something wrong with it. Please consider try the following JS code:
$(document).ready(function(){
window.alert('Alert Info......')
})

then go to your Portal Designer, then click "Sync Configuration"-> "Browser website", to make the changes you made in your Portal Management take effect.
If the issue still exists, please consider take a try with @the365bit 's solution, open the Localized content of your Web page in your Portal Management:

then switch to "Advanced" tab in the opening Content page, then type above JS code inside the JavaScript section part, then click "Save" button. Then go to Portal Designer, click "Sync Configuration"-> "Browser website" to update your Portal changes.

Please try above solution, hopes it could solve your problem.
Best regards,