Not so much an answer as an inelegant work around. This works for BOTH of the broadband speed test add-ins I am trying.
Create a blank page - no headers, footers, not in your menus, etc.
Publish your site
Get the URL of the blank page you have created
Put the Javascript in the of just that blank page via the Add Custom Code route
Put an iFrame on whatever page you actually want the Javascript add-in to operate/appear to users
Set the website address/URL for the iFrame to the blank page / URL you created above.
Everything will work OK, except having to try to make the actual “appearance” of your iFrame look OK… That’s my next job, to see if I can find a way of making it “neat”. Not sure I can, but we can but try.