In general, the snippet is correct and conforms to the example provided in the Crossrider docs.
Upon testing your specific script URL (that you provided elsewhere for privacy reasons) I can see in the console that that there is an error in the second script called in the callback function, i.e. the script.js in the example snippet you provided. Once you fix this error, you can proceed to complete your extension.
[Disclaimer: I am a Crossrider employee]