How to embed a AWS Lex chatbot on iframe widgit into wix site.

I’m trying to embed my AWS Lex chatbot into my wix site and when I try and insert my JS code to create the iframe with the chatbot into the wix website masterPage .JS it gives me a ‘Parsing Error: Unexpected Token <’. The script src url contains a json file that has all the config. details on the chatbot and iframe parameters. I have tried to find a work around to change the code to remove the parsing error I am unable to find an alternative that does not give me another parsing error. I am confident my JS code I am inserting is good because I’m able to use it other external locations without an error.

Any help or guidance would be appreciated.

Here is the JS snippet I’m attempting to add to create a iframe widget containing the chatbot.