Hi,
For resolving errors see Basic Troubleshooting
We have a built in feature for Custom Javascript that you can add to a page, just like adding a content feature. Then in the settings you can set the url for the js file or embed raw script
Hope that helps,
Joe